main.yml 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  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_vs2022' },
  15. { config: Debug, platform: x64, bindir: 'win64_vs2022' },
  16. { config: Release, platform: Win32, bindir: 'win32_vs2022' },
  17. { config: Release, platform: x64, bindir: 'win64_vs2022' },
  18. ]
  19. name: msvc-${{ matrix.config }}-${{ matrix.platform }}
  20. runs-on: windows-2022
  21. steps:
  22. - name: Checkout bx
  23. uses: actions/checkout@v4
  24. with:
  25. repository: bkaradzic/bx
  26. path: bx
  27. - name: Checkout bimg
  28. uses: actions/checkout@v4
  29. with:
  30. repository: bkaradzic/bimg
  31. path: bimg
  32. - name: Prepare
  33. uses: microsoft/[email protected]
  34. - name: Build
  35. shell: cmd
  36. run: |
  37. cd bimg
  38. ..\bx\tools\bin\windows\genie.exe --with-tools --with-shared-lib vs2022
  39. msbuild ".build/projects/vs2022/bimg.sln" /m /v:minimal /p:Configuration=${{ matrix.config }} /p:Platform=${{ matrix.platform }}
  40. - name: Check
  41. shell: cmd
  42. run: |
  43. cd bimg
  44. dir /s ".build\${{ matrix.bindir }}\bin"
  45. ".build\${{ matrix.bindir }}\bin\texturec${{ matrix.config }}.exe" --version
  46. mingw:
  47. strategy:
  48. fail-fast: true
  49. matrix:
  50. include: [
  51. { msystem: MINGW64, project: 'mingw-gcc', bindir: 'win64_mingw-gcc' },
  52. # { msystem: CLANG64, project: 'mingw-clang', bindir: 'win64_mingw-clang' },
  53. ]
  54. name: mingw-${{ matrix.msystem }}
  55. runs-on: windows-2022
  56. steps:
  57. - name: Checkout bx
  58. uses: actions/checkout@v4
  59. with:
  60. repository: bkaradzic/bx
  61. path: bx
  62. - name: Checkout bimg
  63. uses: actions/checkout@v4
  64. with:
  65. repository: bkaradzic/bimg
  66. path: bimg
  67. - name: Prepare
  68. uses: msys2/setup-msys2@v2
  69. with:
  70. msystem: ${{ matrix.msystem }}
  71. update: true
  72. install: make
  73. pacboy: cc:p
  74. - name: Build
  75. shell: msys2 {0}
  76. run: |
  77. cd bimg
  78. make ${{ matrix.project }}-release64 -j$(nproc) AR=ar CC=cc CXX=c++ MINGW=$MINGW_PREFIX
  79. - name: Check
  80. shell: cmd
  81. run: |
  82. cd bimg
  83. dir /s ".build\${{ matrix.bindir }}\bin"
  84. ".build\${{ matrix.bindir }}\bin\texturecRelease.exe" --version
  85. linux:
  86. strategy:
  87. fail-fast: true
  88. matrix:
  89. include: [
  90. { config: debug, binsuffix: Debug },
  91. { config: release, binsuffix: Release },
  92. ]
  93. name: linux-gcc-${{ matrix.config }}64
  94. runs-on: ubuntu-24.04
  95. steps:
  96. - name: Checkout bx
  97. uses: actions/checkout@v4
  98. with:
  99. repository: bkaradzic/bx
  100. path: bx
  101. - name: Checkout bimg
  102. uses: actions/checkout@v4
  103. with:
  104. repository: bkaradzic/bimg
  105. path: bimg
  106. - name: Build
  107. run: |
  108. sudo apt install libgl-dev
  109. cd bimg
  110. make -j$(nproc) linux-gcc-${{ matrix.config }}64
  111. - name: Check
  112. run: |
  113. cd bimg
  114. ls -lash ".build/linux64_gcc/bin"
  115. ".build/linux64_gcc/bin/texturec${{ matrix.binsuffix}}" --version
  116. osx:
  117. strategy:
  118. fail-fast: true
  119. matrix:
  120. include: [
  121. { config: debug, binsuffix: Debug },
  122. { config: release, binsuffix: Release },
  123. ]
  124. name: osx-arm64-${{ matrix.config }}
  125. runs-on: macos-14
  126. steps:
  127. - name: Checkout bx
  128. uses: actions/checkout@v4
  129. with:
  130. repository: bkaradzic/bx
  131. path: bx
  132. - name: Checkout bimg
  133. uses: actions/checkout@v4
  134. with:
  135. repository: bkaradzic/bimg
  136. path: bimg
  137. - name: Build
  138. run: |
  139. cd bimg
  140. make -j$(sysctl -n hw.physicalcpu) osx-arm64-${{ matrix.config }}
  141. - name: Check
  142. run: |
  143. cd bimg
  144. ls -lash ".build/osx-arm64/bin"
  145. ".build/osx-arm64/bin/texturec${{ matrix.binsuffix}}" --version
  146. android:
  147. strategy:
  148. fail-fast: true
  149. matrix:
  150. include: [
  151. { platform: arm64 },
  152. ]
  153. name: android-${{ matrix.platform }}
  154. runs-on: ubuntu-24.04
  155. steps:
  156. - uses: nttld/setup-ndk@v1
  157. id: setup-ndk
  158. with:
  159. ndk-version: r25b
  160. add-to-path: false
  161. - name: Checkout bx
  162. uses: actions/checkout@v4
  163. with:
  164. repository: bkaradzic/bx
  165. path: bx
  166. - name: Checkout bimg
  167. uses: actions/checkout@v4
  168. with:
  169. repository: bkaradzic/bimg
  170. path: bimg
  171. - name: Build
  172. run: |
  173. cd bimg
  174. make -j$(sysctl -n hw.physicalcpu) android-${{ matrix.platform }}
  175. env:
  176. ANDROID_NDK_ROOT: ${{ steps.setup-ndk.outputs.ndk-path }}
  177. - name: Check
  178. run: |
  179. cd bimg
  180. ls -lash ".build/android-${{ matrix.platform }}/bin"