2
0

main.yml 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. name: CI
  2. concurrency:
  3. group: ${{ github.ref }}
  4. cancel-in-progress: true
  5. on:
  6. push:
  7. pull_request:
  8. jobs:
  9. msvc:
  10. strategy:
  11. fail-fast: true
  12. matrix:
  13. include: [
  14. { config: Debug, platform: Win32, bindir: 'win32_vs2019' },
  15. { config: Debug, platform: x64, bindir: 'win64_vs2019' },
  16. { config: Release, platform: Win32, bindir: 'win32_vs2019' },
  17. { config: Release, platform: x64, bindir: 'win64_vs2019' },
  18. ]
  19. name: msvc-${{ matrix.config }}-${{ matrix.platform }}
  20. runs-on: windows-2019
  21. steps:
  22. - name: Checkout bgfx
  23. uses: actions/checkout@v3
  24. with:
  25. path: bgfx
  26. - name: Checkout bx
  27. uses: actions/checkout@v3
  28. with:
  29. repository: bkaradzic/bx
  30. path: bx
  31. - name: Checkout bimg
  32. uses: actions/checkout@v3
  33. with:
  34. repository: bkaradzic/bimg
  35. path: bimg
  36. - name: Prepare
  37. uses: microsoft/[email protected]
  38. - name: Build
  39. shell: cmd
  40. run: |
  41. cd bgfx
  42. ..\bx\tools\bin\windows\genie.exe --with-tools --with-combined-examples --with-shared-lib vs2019
  43. msbuild ".build/projects/vs2019/bgfx.sln" /m /v:minimal /p:Configuration=${{ matrix.config }} /p:Platform=${{ matrix.platform }}
  44. - name: Check
  45. shell: cmd
  46. run: |
  47. cd bgfx
  48. dir /s ".build\${{ matrix.bindir }}\bin"
  49. ".build\${{ matrix.bindir }}\bin\geometryc${{ matrix.config }}.exe" --version
  50. ".build\${{ matrix.bindir }}\bin\shaderc${{ matrix.config }}.exe" --version
  51. ".build\${{ matrix.bindir }}\bin\texturec${{ matrix.config }}.exe" --version
  52. mingw:
  53. strategy:
  54. fail-fast: true
  55. matrix:
  56. include: [
  57. { msystem: MINGW64, project: 'mingw-gcc', bindir: 'win64_mingw-gcc' },
  58. { msystem: CLANG64, project: 'mingw-clang', bindir: 'win64_mingw-clang' },
  59. ]
  60. name: mingw-${{ matrix.msystem }}
  61. runs-on: windows-latest
  62. steps:
  63. - name: Checkout bgfx
  64. uses: actions/checkout@v3
  65. with:
  66. path: bgfx
  67. - name: Checkout bx
  68. uses: actions/checkout@v3
  69. with:
  70. repository: bkaradzic/bx
  71. path: bx
  72. - name: Checkout bimg
  73. uses: actions/checkout@v3
  74. with:
  75. repository: bkaradzic/bimg
  76. path: bimg
  77. - name: Prepare
  78. uses: msys2/setup-msys2@v2
  79. with:
  80. msystem: ${{ matrix.msystem }}
  81. update: true
  82. install: make
  83. pacboy: cc:p
  84. - name: Build
  85. shell: msys2 {0}
  86. run: |
  87. cd bgfx
  88. make ${{ matrix.project }}-release64 -j$(nproc) AR=ar CC=cc CXX=c++ MINGW=$MINGW_PREFIX
  89. - name: Check
  90. shell: cmd
  91. run: |
  92. cd bgfx
  93. dir /s ".build\${{ matrix.bindir }}\bin"
  94. ".build\${{ matrix.bindir }}\bin\geometrycRelease.exe" --version
  95. ".build\${{ matrix.bindir }}\bin\shadercRelease.exe" --version
  96. ".build\${{ matrix.bindir }}\bin\texturecRelease.exe" --version
  97. linux:
  98. strategy:
  99. fail-fast: true
  100. matrix:
  101. include: [
  102. { config: debug, binsuffix: Debug },
  103. { config: release, binsuffix: Release },
  104. ]
  105. name: linux-${{ matrix.config }}64
  106. runs-on: ubuntu-22.04
  107. steps:
  108. - name: Checkout bgfx
  109. uses: actions/checkout@v3
  110. with:
  111. path: bgfx
  112. - name: Checkout bx
  113. uses: actions/checkout@v3
  114. with:
  115. repository: bkaradzic/bx
  116. path: bx
  117. - name: Checkout bimg
  118. uses: actions/checkout@v3
  119. with:
  120. repository: bkaradzic/bimg
  121. path: bimg
  122. - name: Build
  123. run: |
  124. sudo apt install libgl-dev
  125. cd bgfx
  126. make -j$(nproc) linux-${{ matrix.config }}64
  127. - name: Check
  128. run: |
  129. cd bgfx
  130. ls -lash ".build/linux64_gcc/bin"
  131. ".build/linux64_gcc/bin/geometryc${{ matrix.binsuffix}}" --version
  132. ".build/linux64_gcc/bin/shaderc${{ matrix.binsuffix}}" --version
  133. ".build/linux64_gcc/bin/texturec${{ matrix.binsuffix}}" --version
  134. osx:
  135. strategy:
  136. fail-fast: true
  137. matrix:
  138. include: [
  139. { config: debug, binsuffix: Debug },
  140. { config: release, binsuffix: Release },
  141. ]
  142. name: osx-x64-${{ matrix.config }}
  143. runs-on: macos-latest
  144. steps:
  145. - name: Checkout bgfx
  146. uses: actions/checkout@v3
  147. with:
  148. path: bgfx
  149. - name: Checkout bx
  150. uses: actions/checkout@v3
  151. with:
  152. repository: bkaradzic/bx
  153. path: bx
  154. - name: Checkout bimg
  155. uses: actions/checkout@v3
  156. with:
  157. repository: bkaradzic/bimg
  158. path: bimg
  159. - name: Build
  160. run: |
  161. cd bgfx
  162. make -j$(sysctl -n hw.physicalcpu) osx-x64-${{ matrix.config }}
  163. - name: Check
  164. run: |
  165. cd bgfx
  166. ls -lash ".build/osx-x64/bin"
  167. ".build/osx-x64/bin/geometryc${{ matrix.binsuffix}}" --version
  168. ".build/osx-x64/bin/shaderc${{ matrix.binsuffix}}" --version
  169. ".build/osx-x64/bin/texturec${{ matrix.binsuffix}}" --version
  170. android:
  171. strategy:
  172. fail-fast: true
  173. matrix:
  174. include: [
  175. { platform: arm64 },
  176. ]
  177. name: android-${{ matrix.platform }}
  178. runs-on: ubuntu-22.04
  179. steps:
  180. - uses: nttld/setup-ndk@v1
  181. id: setup-ndk
  182. with:
  183. ndk-version: r25b
  184. add-to-path: false
  185. - name: Checkout bgfx
  186. uses: actions/checkout@v3
  187. with:
  188. path: bgfx
  189. - name: Checkout bx
  190. uses: actions/checkout@v3
  191. with:
  192. repository: bkaradzic/bx
  193. path: bx
  194. - name: Checkout bimg
  195. uses: actions/checkout@v3
  196. with:
  197. repository: bkaradzic/bimg
  198. path: bimg
  199. - name: Build
  200. run: |
  201. cd bgfx
  202. make -j$(sysctl -n hw.physicalcpu) android-${{ matrix.platform }}
  203. env:
  204. ANDROID_NDK_ROOT: ${{ steps.setup-ndk.outputs.ndk-path }}
  205. - name: Check
  206. run: |
  207. cd bgfx
  208. ls -lash ".build/android-${{ matrix.platform }}/bin"