.travis.yml 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  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=r13b TERM=dumb
  50. android:
  51. components:
  52. - platform-tools
  53. - tools
  54. - build-tools-25.0.2
  55. - android-24
  56. jdk: oraclejdk8
  57. before_install:
  58. - wget http://dl.google.com/android/repository/android-ndk-$NDK_VERSION-linux-x86_64.zip
  59. - unzip android-ndk-$NDK_VERSION-linux-x86_64.zip > /dev/null
  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
  69. - ./gradlew assembleDebug
  70. - mv app/build/outputs/apk/app-debug.apk ../deploy/sdlpal-debug.apk
  71. - cd ..
  72. - os: osx
  73. env: TARGET=iOS
  74. language: c
  75. before_install:
  76. - cd SDL2
  77. - wget https://www.libsdl.org/release/SDL2-2.0.5.zip
  78. - unzip SDL2-2.0.5.zip
  79. - mv SDL2-2.0.5/* .
  80. - cd ..
  81. script:
  82. - cd ios/SDLPal
  83. - xcodebuild ONLY_ACTIVE_ARCH=NO CODE_SIGNING_ALLOWED="NO"
  84. - mkdir -p Payload
  85. - mv build/Release-iphoneos/SDLPal.app Payload
  86. - zip ../../deploy/sdlpal-impactor.ipa -r Payload
  87. - cd ../..
  88. - os: osx
  89. env: TARGET=macOS
  90. language: c
  91. before_install:
  92. - wget https://www.libsdl.org/release/SDL2-2.0.5.dmg
  93. - hdiutil attach SDL2-2.0.5.dmg;
  94. - sudo cp -a /Volumes/SDL2/SDL2.framework /Library/Frameworks/
  95. script:
  96. - cd macos
  97. - xcodebuild
  98. - hdiutil create -srcfolder build/Release/Pal.app -volname "SDLPal" ../deploy/sdlpal-macos.dmg
  99. - #xcodebuild test -scheme PalTests #disabled since always fail in travis-ci
  100. - cd ..
  101. deploy:
  102. provider: releases
  103. api_key:
  104. secure: FFV8UBcz6GkeSoGRbrL9tnTpVqXoFjFK2QtW0Ml8YvvqaHhxOaIWs2nAabOGsW1mJop/QlpuUNw1TfLl7TokcUDgOHrFRdC8hVY7K1uSWMnt7m4ZRPatVybIkzgrnItHlnMrL4uJK2xXb6Jc5+cSrU5jRMcmTZjaOKLTBwF97+6AgqpdmKUCVYZJzQYg0Jn9GfaL1EOGl7ISt/VEgi/tKFzJvJVxJBU3NuKyxXlfEwkTiSOFuGoD5qWDjCE+aGxTR6RQefsADPIDfeU3TJHTJE/ORGy9gl+Y41JgU0Bfgipcqg1RSwNclclmxgi8lo/XNUiZAMTyQrXjByBWcvYovk+H4h9mbvJlrVSjI8Wxb5ICcYkhDVkNxtEXX7AsIk4yHiNTi1MAW0qJJKinaFxLmK2U3LGEK3DudXl/0eVRoQATmRcXLdBQezISt2CWpTktCxlQmtz/GsoHv0PcWdkJYL4qbbRrBRFj9++VjlnCI124YZnbVjC3+jtWN1Zluxynj0GDBY3r7EdLWWKZo5XnygPOZ8+uaTMYfqmTvQWPc5GRRRdVJowQFQhb48hzKyWYqsf8eyS3VuZ9b/DwES3dutOaX7sIL9Vkg3DlQYOEz938MB4VbTGizUUrBbrIP4Kz/+WOZ9pxM9X+qsgMYkw8FvHqn2TvCWxPDCgqq3zUWig=
  105. file_glob: true
  106. file: deploy/*
  107. skip_cleanup: true
  108. overwrite: true
  109. on:
  110. all_branches: true
  111. tags: true
  112. notifications:
  113. webhooks:
  114. urls:
  115. - https://webhooks.gitter.im/e/922838d6727e919df50e
  116. on_success: change # options: [always|never|change] default: always
  117. on_failure: always # options: [always|never|change] default: always
  118. on_start: never # options: [always|never|change] default: always