build.yml 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. name: Build
  2. on:
  3. push:
  4. branches: [ master ]
  5. paths-ignore:
  6. - 'Docs/**'
  7. - '**.md'
  8. pull_request:
  9. branches: [ master ]
  10. paths-ignore:
  11. - 'Docs/**'
  12. - '**.md'
  13. jobs:
  14. linux-clang:
  15. runs-on: ubuntu-22.04
  16. name: Linux Clang
  17. strategy:
  18. fail-fast: false
  19. matrix:
  20. build_type: [Debug, Release, Distribution, ReleaseASAN, ReleaseUBSAN]
  21. clang_version: [clang++-12, clang++-14]
  22. steps:
  23. - name: Checkout Code
  24. uses: actions/checkout@v3
  25. - name: Configure CMake
  26. run: cmake -B ${{github.workspace}}/Build/Linux_${{matrix.build_type}}_${{matrix.clang_version}} -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DCMAKE_CXX_COMPILER=${{matrix.clang_version}} Build
  27. - name: Build
  28. run: cmake --build ${{github.workspace}}/Build/Linux_${{matrix.build_type}}_${{matrix.clang_version}} -j 2
  29. - name: Test
  30. working-directory: ${{github.workspace}}/Build/Linux_${{matrix.build_type}}_${{matrix.clang_version}}
  31. run: ctest --output-on-failure
  32. linux-gcc:
  33. runs-on: ubuntu-22.04
  34. name: Linux GCC
  35. strategy:
  36. fail-fast: false
  37. matrix:
  38. build_type: [Debug, Release, Distribution]
  39. clang_version: [g++]
  40. steps:
  41. - name: Checkout Code
  42. uses: actions/checkout@v3
  43. - name: Configure CMake
  44. run: cmake -B ${{github.workspace}}/Build/Linux_${{matrix.build_type}}_${{matrix.clang_version}} -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DCMAKE_CXX_COMPILER=${{matrix.clang_version}} Build
  45. - name: Build
  46. run: cmake --build ${{github.workspace}}/Build/Linux_${{matrix.build_type}}_${{matrix.clang_version}} -j 2
  47. - name: Test
  48. working-directory: ${{github.workspace}}/Build/Linux_${{matrix.build_type}}_${{matrix.clang_version}}
  49. run: ctest --output-on-failure
  50. msys2_mingw_gcc:
  51. runs-on: windows-latest
  52. defaults:
  53. run:
  54. shell: msys2 {0}
  55. name: MSYS2 MinGW GCC
  56. strategy:
  57. fail-fast: false
  58. matrix:
  59. build_type: [Debug, Release]
  60. steps:
  61. - name: Checkout Code
  62. uses: actions/checkout@v3
  63. - name: Setup MSYS2
  64. uses: msys2/setup-msys2@v2
  65. with:
  66. msystem: mingw64
  67. install: mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake
  68. update: true
  69. - name: Configure CMake
  70. run: cmake -B Build/MSYS2_MinGW_GCC -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=${{matrix.build_type}} Build
  71. - name: Build
  72. run: cmake --build Build/MSYS2_MinGW_GCC -j 2
  73. - name: Test
  74. working-directory: Build/MSYS2_MinGW_GCC
  75. run: ctest --output-on-failure
  76. msvc_cl:
  77. runs-on: windows-latest
  78. name: Visual Studio CL
  79. strategy:
  80. fail-fast: false
  81. matrix:
  82. build_type: [Debug, Release, Distribution]
  83. steps:
  84. - name: Checkout Code
  85. uses: actions/checkout@v3
  86. - name: Add msbuild to PATH
  87. uses: microsoft/[email protected]
  88. - name: Configure CMake
  89. run: cmake -B ${{github.workspace}}/Build/VS2022_CL -G "Visual Studio 17 2022" -A x64 Build
  90. - name: Build
  91. run: msbuild Build\VS2022_CL\JoltPhysics.sln /property:Configuration=${{matrix.build_type}}
  92. - name: Test
  93. working-directory: ${{github.workspace}}/Build/VS2022_CL/${{matrix.build_type}}
  94. run: ./UnitTests.exe
  95. msvc_cl_32_bit:
  96. runs-on: windows-latest
  97. name: Visual Studio CL 32-bit
  98. strategy:
  99. fail-fast: false
  100. matrix:
  101. build_type: [Debug, Release]
  102. steps:
  103. - name: Checkout Code
  104. uses: actions/checkout@v3
  105. - name: Add msbuild to PATH
  106. uses: microsoft/[email protected]
  107. - name: Configure CMake
  108. run: cmake -B ${{github.workspace}}/Build/VS2022_CL_32_BIT -G "Visual Studio 17 2022" -A Win32 -DUSE_SSE4_1=OFF -DUSE_SSE4_2=OFF -DUSE_AVX=OFF -DUSE_AVX2=OFF -DUSE_AVX512=OFF -DUSE_LZCNT=OFF -DUSE_TZCNT=OFF -DUSE_F16C=OFF -DUSE_FMADD=OFF Build
  109. - name: Build
  110. run: msbuild Build\VS2022_CL_32_BIT\JoltPhysics.sln /property:Configuration=${{matrix.build_type}}
  111. - name: Test
  112. working-directory: ${{github.workspace}}/Build/VS2022_CL_32_BIT/${{matrix.build_type}}
  113. run: ./UnitTests.exe
  114. msvc_cl_arm:
  115. runs-on: windows-latest
  116. name: Visual Studio CL ARM
  117. strategy:
  118. fail-fast: false
  119. matrix:
  120. build_type: [Debug, Release]
  121. steps:
  122. - name: Checkout Code
  123. uses: actions/checkout@v3
  124. - name: Add msbuild to PATH
  125. uses: microsoft/[email protected]
  126. - name: Configure CMake
  127. run: cmake -B ${{github.workspace}}/Build/VS2022_CL_ARM -G "Visual Studio 17 2022" -A ARM64 Build
  128. - name: Build
  129. run: msbuild Build\VS2022_CL_ARM\JoltPhysics.sln /property:Configuration=${{matrix.build_type}}
  130. msvc_cl_arm_32_bit:
  131. runs-on: windows-latest
  132. name: Visual Studio CL ARM 32-bit
  133. strategy:
  134. fail-fast: false
  135. matrix:
  136. build_type: [Debug, Release]
  137. steps:
  138. - name: Checkout Code
  139. uses: actions/checkout@v3
  140. - name: Add msbuild to PATH
  141. uses: microsoft/[email protected]
  142. - name: Configure CMake
  143. run: cmake -B ${{github.workspace}}/Build/VS2022_CL_ARM_32_BIT -G "Visual Studio 17 2022" -A ARM Build
  144. - name: Build
  145. run: msbuild Build\VS2022_CL_ARM_32_BIT\JoltPhysics.sln /property:Configuration=${{matrix.build_type}}
  146. macos:
  147. runs-on: macos-latest
  148. name: macOS
  149. strategy:
  150. fail-fast: false
  151. matrix:
  152. build_type: [Debug, Release, Distribution]
  153. clang_version: [clang++]
  154. steps:
  155. - name: Checkout Code
  156. uses: actions/checkout@v3
  157. - name: Configure CMake
  158. # github macos-latest runs on a 2013 Ivy Bridge CPU so doesn't have AVX2, LZCNT, TZCNT or FMADD
  159. run: cmake -B ${{github.workspace}}/Build/MacOS_${{matrix.build_type}}_${{matrix.clang_version}} -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DCMAKE_CXX_COMPILER=${{matrix.clang_version}} -DUSE_AVX2=OFF -DUSE_AVX512=OFF -DUSE_LZCNT=OFF -DUSE_TZCNT=OFF -DUSE_FMADD=OFF Build
  160. - name: Build
  161. run: cmake --build ${{github.workspace}}/Build/MacOS_${{matrix.build_type}}_${{matrix.clang_version}} -j 2
  162. - name: Test
  163. working-directory: ${{github.workspace}}/Build/MacOS_${{matrix.build_type}}_${{matrix.clang_version}}
  164. run: ctest --output-on-failure
  165. android:
  166. runs-on: ubuntu-22.04
  167. name: Android
  168. strategy:
  169. fail-fast: false
  170. steps:
  171. - name: Checkout Code
  172. uses: actions/checkout@v3
  173. - name: Gradle Build
  174. working-directory: ${{github.workspace}}/Build/Android
  175. run: ./gradlew build
  176. ios:
  177. runs-on: macos-latest
  178. name: iOS
  179. strategy:
  180. fail-fast: false
  181. steps:
  182. - name: Checkout Code
  183. uses: actions/checkout@v3
  184. - name: Configure CMake
  185. run: cmake -B ${{github.workspace}}/Build/XCode_iOS -DTARGET_HELLO_WORLD=OFF -DTARGET_PERFORMANCE_TEST=OFF -DCMAKE_SYSTEM_NAME=iOS -GXcode Build
  186. - name: Build
  187. run: cmake --build ${{github.workspace}}/Build/XCode_iOS -- -sdk iphonesimulator -arch x86_64