main.yml 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  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: x64, bindir: 'win64_vs2022' },
  15. { config: Release, platform: x64, bindir: 'win64_vs2022' },
  16. ]
  17. name: msvc-${{ matrix.config }}-${{ matrix.platform }}
  18. runs-on: windows-2022
  19. steps:
  20. - name: Checkout bx
  21. uses: actions/checkout@v4
  22. with:
  23. repository: bkaradzic/bx
  24. path: bx
  25. - name: Prepare
  26. uses: microsoft/setup-msbuild@v2
  27. - name: Build
  28. shell: cmd
  29. run: |
  30. cd bx
  31. tools\bin\windows\genie.exe vs2022
  32. msbuild ".build/projects/vs2022/bx.sln" /m /v:minimal /p:Configuration=${{ matrix.config }} /p:Platform=${{ matrix.platform }}
  33. - name: Check
  34. shell: cmd
  35. run: |
  36. cd bx
  37. ".build\${{ matrix.bindir }}\bin\bx.test${{ matrix.config }}.exe" -d yes
  38. mingw:
  39. strategy:
  40. fail-fast: true
  41. matrix:
  42. include: [
  43. { msystem: MINGW64, project: 'mingw-gcc', bindir: 'win64_mingw-gcc' },
  44. { msystem: CLANG64, project: 'mingw-clang', bindir: 'win64_mingw-clang' },
  45. ]
  46. name: mingw-${{ matrix.msystem }}
  47. runs-on: windows-2022
  48. steps:
  49. - name: Checkout bx
  50. uses: actions/checkout@v4
  51. with:
  52. repository: bkaradzic/bx
  53. path: bx
  54. - name: Prepare
  55. uses: msys2/setup-msys2@v2
  56. with:
  57. msystem: ${{ matrix.msystem }}
  58. update: true
  59. install: make
  60. pacboy: cc:p
  61. - name: Build
  62. shell: msys2 {0}
  63. run: |
  64. cd bx
  65. tools/bin/windows/genie.exe --gcc=${{ matrix.project }} gmake
  66. make -R -C .build/projects/gmake-${{ matrix.project }} config=release64 -j$(nproc) AR=ar CC=cc CXX=c++ MINGW=$MINGW_PREFIX
  67. - name: Check
  68. shell: cmd
  69. run: |
  70. cd bx
  71. ".build\${{ matrix.bindir }}\bin\bx.testRelease.exe" -d yes
  72. linux:
  73. strategy:
  74. fail-fast: true
  75. matrix:
  76. include: [
  77. { config: debug, binsuffix: Debug },
  78. { config: release, binsuffix: Release },
  79. ]
  80. name: linux-gcc-${{ matrix.config }}64
  81. runs-on: ubuntu-24.04
  82. steps:
  83. - name: Checkout bx
  84. uses: actions/checkout@v4
  85. with:
  86. repository: bkaradzic/bx
  87. path: bx
  88. - name: Build
  89. run: |
  90. cd bx
  91. tools/bin/linux/genie --gcc=linux-gcc gmake
  92. make -R -C .build/projects/gmake-linux-gcc config=${{ matrix.config }}64 -j$(nproc)
  93. - name: Check
  94. run: |
  95. cd bx
  96. ".build/linux64_gcc/bin/bx.test${{ matrix.binsuffix}}" -d yes
  97. osx:
  98. strategy:
  99. fail-fast: true
  100. matrix:
  101. include: [
  102. { config: debug, binsuffix: Debug },
  103. { config: release, binsuffix: Release },
  104. ]
  105. name: osx-x64-${{ matrix.config }}
  106. runs-on: macos-14
  107. steps:
  108. - name: Checkout bx
  109. uses: actions/checkout@v4
  110. with:
  111. repository: bkaradzic/bx
  112. path: bx
  113. - name: Build
  114. run: |
  115. cd bx
  116. tools/bin/darwin/genie --gcc=osx-x64 gmake
  117. make -C .build/projects/gmake-osx-x64 config=${{ matrix.config }} -j$(sysctl -n hw.physicalcpu)
  118. - name: Check
  119. run: |
  120. cd bx
  121. ".build/osx-x64/bin/bx.test${{ matrix.binsuffix}}" -d yes
  122. emscripten:
  123. strategy:
  124. fail-fast: true
  125. matrix:
  126. include: [
  127. { config: debug, binsuffix: Debug },
  128. { config: release, binsuffix: Release },
  129. ]
  130. name: wasm-${{ matrix.config }}
  131. runs-on: ubuntu-24.04
  132. steps:
  133. - name: Checkout bx
  134. uses: actions/checkout@v4
  135. with:
  136. repository: bkaradzic/bx
  137. path: bx
  138. - uses: mymindstorm/setup-emsdk@v14
  139. - uses: browser-actions/setup-chrome@v1
  140. - name: Build
  141. run: |
  142. cd bx
  143. tools/bin/linux/genie --gcc=wasm gmake
  144. make -C .build/projects/gmake-wasm config=${{ matrix.config }} -j$(nproc) EMSCRIPTEN=$EMSDK/upstream/emscripten
  145. - name: Check
  146. run: |
  147. cd bx
  148. # npx http-server -o .build/wasm/bin/ & chromium http://127.0.0.1:8080/.build/wasm/bin/bx.testRelease.html