main.yml 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. name: CI
  2. on: [push, pull_request]
  3. jobs:
  4. cancel:
  5. name: "Cancel previous runs"
  6. runs-on: ubuntu-latest
  7. timeout-minutes: 3
  8. steps:
  9. - uses: styfle/[email protected]
  10. with:
  11. workflow_id: 1447568
  12. access_token: ${{ github.token }}
  13. windows64-build:
  14. runs-on: windows-latest
  15. env:
  16. PLATFORM: windows64
  17. OPAMYES: 1
  18. CYG_MIRROR: http://mirrors.kernel.org/sourceware/cygwin/
  19. ARCH: 64
  20. MINGW_ARCH: x86_64
  21. CYGWIN_SETUP: https://cygwin.com/setup-x86_64.exe
  22. CYG_ROOT: C:/cygwin64
  23. steps:
  24. - uses: actions/checkout@master
  25. with:
  26. submodules: recursive
  27. @import install-neko-windows.yml
  28. @import build-windows.yml
  29. windows-build:
  30. runs-on: windows-latest
  31. env:
  32. PLATFORM: windows
  33. OPAMYES: 1
  34. CYG_MIRROR: http://mirrors.kernel.org/sourceware/cygwin/
  35. ARCH: 32
  36. MINGW_ARCH: i686
  37. CYGWIN_SETUP: https://cygwin.com/setup-x86.exe
  38. CYG_ROOT: C:/cygwin
  39. steps:
  40. - uses: actions/checkout@master
  41. with:
  42. submodules: recursive
  43. @import install-neko-windows.yml
  44. @import build-windows.yml
  45. linux-build:
  46. runs-on: ubuntu-latest
  47. env:
  48. PLATFORM: linux64
  49. OPAMYES: 1
  50. steps:
  51. - uses: actions/checkout@master
  52. with:
  53. submodules: recursive
  54. @import build-linux.yml
  55. mac-build:
  56. runs-on: macos-latest
  57. env:
  58. PLATFORM: mac
  59. OPAMYES: 1
  60. steps:
  61. - uses: actions/checkout@master
  62. with:
  63. submodules: recursive
  64. @import install-neko-mac.yml
  65. @import build-mac.yml
  66. windows64-test:
  67. needs: windows64-build
  68. runs-on: windows-latest
  69. env:
  70. PLATFORM: windows64
  71. TEST: ${{matrix.target}}
  72. HXCPP_COMPILE_CACHE: ~/hxcache
  73. ARCH: 64
  74. strategy:
  75. fail-fast: false
  76. matrix:
  77. # TODO enable lua after https://github.com/HaxeFoundation/haxe/issues/5024
  78. target: [macro, js, hl, cpp, 'java,jvm', cs, php, python, neko]
  79. steps:
  80. - uses: actions/checkout@master
  81. with:
  82. submodules: recursive
  83. - uses: actions/download-artifact@v1
  84. with:
  85. name: win${{env.ARCH}}Binaries
  86. @import install-neko-windows.yml
  87. @import test-windows.yml
  88. windows-test:
  89. needs: windows-build
  90. runs-on: windows-latest
  91. env:
  92. PLATFORM: windows
  93. TEST: ${{matrix.target}}
  94. HXCPP_COMPILE_CACHE: ~/hxcache
  95. ARCH: 32
  96. strategy:
  97. fail-fast: false
  98. matrix:
  99. # TODO jvm: https://github.com/HaxeFoundation/haxe/issues/8601
  100. # TODO enable lua after https://github.com/HaxeFoundation/haxe/issues/5024
  101. target: [macro, js, hl, cpp, java, cs, php, python, neko]
  102. steps:
  103. - uses: actions/checkout@master
  104. with:
  105. submodules: recursive
  106. - uses: actions/download-artifact@v1
  107. with:
  108. name: win${{env.ARCH}}Binaries
  109. @import install-neko-windows.yml
  110. @import test-windows.yml
  111. linux-test:
  112. needs: linux-build
  113. runs-on: ubuntu-latest
  114. env:
  115. PLATFORM: linux64
  116. TEST: ${{matrix.target}}
  117. HXCPP_COMPILE_CACHE: ~/hxcache
  118. strategy:
  119. fail-fast: false
  120. matrix:
  121. target: [macro, js, hl, cpp, 'java,jvm', cs, php, python, lua, flash9, neko]
  122. include:
  123. - target: js
  124. # SAUCE: 1
  125. # SAUCE_TUNNEL_ID: 'linux-test'
  126. # SAUCE_BUILD: '${{env.GITHUB_RUN_NUMBER}}' # $(Build.BuildNumber)
  127. - target: hl
  128. APT_PACKAGES: cmake ninja-build libturbojpeg-dev
  129. - target: cpp
  130. APT_PACKAGES: gcc-multilib g++-multilib
  131. - target: lua
  132. APT_PACKAGES: ncurses-dev
  133. - target: flash9
  134. APT_PACKAGES: libglib2.0 libfreetype6 xvfb
  135. steps:
  136. - uses: actions/checkout@master
  137. with:
  138. submodules: recursive
  139. - uses: actions/download-artifact@v1
  140. with:
  141. name: linuxBinaries
  142. @import install-neko-linux.yml
  143. @import test-linux.yml
  144. mac-test:
  145. needs: mac-build
  146. runs-on: macos-latest
  147. env:
  148. PLATFORM: mac
  149. TEST: ${{matrix.target}}
  150. HXCPP_COMPILE_CACHE: ~/hxcache
  151. strategy:
  152. fail-fast: false
  153. matrix:
  154. target: [macro, js, hl, cpp, 'java,jvm', cs, php, python, lua, flash9, neko]
  155. include:
  156. - target: hl
  157. BREW_PACKAGES: ninja
  158. steps:
  159. - uses: actions/checkout@master
  160. with:
  161. submodules: recursive
  162. - uses: actions/download-artifact@v1
  163. with:
  164. name: macBinaries
  165. @import install-neko-mac.yml
  166. @import test-mac.yml