.travis.yml 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. language: android
  2. before_script:
  3. - mkdir deploy
  4. matrix:
  5. fast_finish: true
  6. include:
  7. - os: linux
  8. env: TARGET=Linux
  9. dist: trusty
  10. language: c
  11. addons:
  12. apt:
  13. packages:
  14. - libsdl2-dev
  15. - libfltk1.3-dev
  16. script:
  17. - cd unix
  18. - make
  19. - cp sdlpal ../deploy
  20. - make clean
  21. - make check
  22. - cd ..
  23. - os: linux
  24. env: TARGET=MinGW32
  25. dist: trusty
  26. language: c
  27. addons:
  28. apt:
  29. packages:
  30. - binutils-mingw-w64-i686
  31. - gcc-mingw-w64-i686
  32. - g++-mingw-w64-i686
  33. before_install:
  34. - cd SDL2
  35. - wget http://libsdl.org/release/SDL2-devel-2.0.5-mingw.tar.gz
  36. - tar xvf SDL2-devel-2.0.5-mingw.tar.gz
  37. - mv SDL2-2.0.5/* .
  38. - sed -i "s@/usr/local/cross-tools@$(pwd)@g" i686-w64-mingw32/bin/sdl2-config
  39. - sed -i "/#include <intrin.h>/d" i686-w64-mingw32/include/SDL2/SDL_cpuinfo.h #dirty hack
  40. - export PATH=$PATH:$(pwd)/i686-w64-mingw32/bin
  41. - cd ..
  42. script:
  43. - cd win32
  44. - make HOST=i686-w64-mingw32-
  45. - i686-w64-mingw32-strip sdlpal.exe
  46. - cp sdlpal.exe ../deploy/sdlpal-mingw.exe
  47. - cd ..
  48. - os: linux
  49. env: TARGET=Android NDK_VERSION=r10e
  50. dist: precise
  51. language: android
  52. android:
  53. components:
  54. - build-tools-22.0.1
  55. - android-22
  56. before_install:
  57. - wget http://dl.google.com/android/ndk/android-ndk-$NDK_VERSION-linux-x86_64.bin
  58. - chmod +x android-ndk-$NDK_VERSION-linux-x86_64.bin
  59. - ./android-ndk-$NDK_VERSION-linux-x86_64.bin | egrep -v ^Extracting
  60. - export ANDROID_NDK_HOME=`pwd`/android-ndk-$NDK_VERSION
  61. - export PATH=${PATH}:${ANDROID_NDK_HOME}
  62. - cd SDL2
  63. - wget https://www.libsdl.org/release/SDL2-2.0.5.zip
  64. - unzip SDL2-2.0.5.zip
  65. - mv SDL2-2.0.5/* .
  66. - cd ..
  67. script:
  68. - cd android/jni
  69. - ndk-build
  70. - cd ..
  71. - sed -i 's/android-24/android-22/g' project.properties
  72. - ant debug
  73. - mv bin/SDLActivity-debug.apk ../deploy/sdlpal-debug.apk
  74. - cd ..
  75. - os: osx
  76. env: TARGET=iOS
  77. language: c
  78. before_install:
  79. - cd SDL2
  80. - wget https://www.libsdl.org/release/SDL2-2.0.5.zip
  81. - unzip SDL2-2.0.5.zip
  82. - mv SDL2-2.0.5/* .
  83. - cd ..
  84. script:
  85. - cd ios/SDLPal
  86. - xcodebuild ONLY_ACTIVE_ARCH=NO CODE_SIGNING_ALLOWED="NO"
  87. - mkdir -p Payload
  88. - mv build/Release-iphoneos/SDLPal.app Payload
  89. - zip ../../deploy/sdlpal-impactor.ipa -r Payload
  90. - cd ../..
  91. - os: osx
  92. env: TARGET=macOS
  93. language: c
  94. before_install:
  95. - wget https://www.libsdl.org/release/SDL2-2.0.5.dmg
  96. - hdiutil attach SDL2-2.0.5.dmg;
  97. - sudo cp -a /Volumes/SDL2/SDL2.framework /Library/Frameworks/
  98. script:
  99. - cd macos
  100. - xcodebuild
  101. - hdiutil create -srcfolder build/Release/Pal.app -volname "SDLPal" ../deploy/sdlpal-macos.dmg
  102. - #xcodebuild test -scheme PalTests #disabled since always fail in travis-ci
  103. - cd ..
  104. deploy:
  105. provider: releases
  106. api_key:
  107. secure: FFV8UBcz6GkeSoGRbrL9tnTpVqXoFjFK2QtW0Ml8YvvqaHhxOaIWs2nAabOGsW1mJop/QlpuUNw1TfLl7TokcUDgOHrFRdC8hVY7K1uSWMnt7m4ZRPatVybIkzgrnItHlnMrL4uJK2xXb6Jc5+cSrU5jRMcmTZjaOKLTBwF97+6AgqpdmKUCVYZJzQYg0Jn9GfaL1EOGl7ISt/VEgi/tKFzJvJVxJBU3NuKyxXlfEwkTiSOFuGoD5qWDjCE+aGxTR6RQefsADPIDfeU3TJHTJE/ORGy9gl+Y41JgU0Bfgipcqg1RSwNclclmxgi8lo/XNUiZAMTyQrXjByBWcvYovk+H4h9mbvJlrVSjI8Wxb5ICcYkhDVkNxtEXX7AsIk4yHiNTi1MAW0qJJKinaFxLmK2U3LGEK3DudXl/0eVRoQATmRcXLdBQezISt2CWpTktCxlQmtz/GsoHv0PcWdkJYL4qbbRrBRFj9++VjlnCI124YZnbVjC3+jtWN1Zluxynj0GDBY3r7EdLWWKZo5XnygPOZ8+uaTMYfqmTvQWPc5GRRRdVJowQFQhb48hzKyWYqsf8eyS3VuZ9b/DwES3dutOaX7sIL9Vkg3DlQYOEz938MB4VbTGizUUrBbrIP4Kz/+WOZ9pxM9X+qsgMYkw8FvHqn2TvCWxPDCgqq3zUWig=
  108. file_glob: true
  109. file: deploy/*
  110. skip_cleanup: true
  111. overwrite: true
  112. on:
  113. all_branches: true
  114. tags: true