build.yml 7.7 KB

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