2
0

build.yml 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. name: Build
  2. on:
  3. push:
  4. branches: [ master ]
  5. paths-ignore:
  6. - 'Docs/**'
  7. - '**.md'
  8. - '**.txt'
  9. pull_request:
  10. branches: [ master ]
  11. paths-ignore:
  12. - 'Docs/**'
  13. - '**.md'
  14. - '**.txt'
  15. jobs:
  16. linux-clang:
  17. runs-on: ubuntu-latest
  18. name: Linux Clang
  19. strategy:
  20. fail-fast: false
  21. matrix:
  22. build_type: [Debug, Release, Distribution, ReleaseASAN, ReleaseUBSAN]
  23. clang_version: [clang++-10, clang++-12]
  24. steps:
  25. - name: Checkout Code
  26. uses: actions/checkout@v2
  27. - name: Configure CMake
  28. 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
  29. - name: Build
  30. run: cmake --build ${{github.workspace}}/Build/Linux_${{matrix.build_type}}_${{matrix.clang_version}} --config ${{matrix.build_type}}
  31. - name: Test
  32. working-directory: ${{github.workspace}}/Build/Linux_${{matrix.build_type}}_${{matrix.clang_version}}
  33. run: ctest --output-on-failure
  34. linux-gcc:
  35. runs-on: ubuntu-latest
  36. name: Linux GCC
  37. strategy:
  38. fail-fast: false
  39. matrix:
  40. build_type: [Debug, Release, Distribution]
  41. clang_version: [g++]
  42. steps:
  43. - name: Checkout Code
  44. uses: actions/checkout@v2
  45. - name: Configure CMake
  46. 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
  47. - name: Build
  48. run: cmake --build ${{github.workspace}}/Build/Linux_${{matrix.build_type}}_${{matrix.clang_version}} --config ${{matrix.build_type}}
  49. - name: Test
  50. working-directory: ${{github.workspace}}/Build/Linux_${{matrix.build_type}}_${{matrix.clang_version}}
  51. run: ctest --output-on-failure
  52. msvc_cl:
  53. runs-on: windows-latest
  54. name: Visual Studio CL
  55. strategy:
  56. fail-fast: false
  57. matrix:
  58. build_type: [Debug, Release, Distribution]
  59. steps:
  60. - name: Checkout Code
  61. uses: actions/checkout@v2
  62. - name: Add msbuild to PATH
  63. uses: microsoft/[email protected]
  64. - name: Configure CMake
  65. run: cmake -B ${{github.workspace}}/Build/VS2022_CL -G "Visual Studio 17 2022" -A x64 Build
  66. - name: Build
  67. run: msbuild Build\VS2022_CL\JoltPhysics.sln /property:Configuration=${{matrix.build_type}}
  68. - name: Test
  69. working-directory: ${{github.workspace}}/Build/VS2022_CL/${{matrix.build_type}}
  70. run: ./UnitTests.exe
  71. macos:
  72. runs-on: macos-latest
  73. name: MacOS
  74. strategy:
  75. fail-fast: false
  76. matrix:
  77. build_type: [Debug, Release, Distribution]
  78. clang_version: [clang++]
  79. steps:
  80. - name: Checkout Code
  81. uses: actions/checkout@v2
  82. - name: Configure CMake
  83. # github macos-latest runs on a 2013 Ivy Bridge CPU so doesn't have AVX2, LZCNT, TZCNT or FMADD
  84. 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_LZCNT=OFF -DUSE_TZCNT=OFF -DUSE_FMADD=OFF Build
  85. - name: Build
  86. run: cmake --build ${{github.workspace}}/Build/MacOS_${{matrix.build_type}}_${{matrix.clang_version}} --config ${{matrix.build_type}}
  87. - name: Test
  88. working-directory: ${{github.workspace}}/Build/MacOS_${{matrix.build_type}}_${{matrix.clang_version}}
  89. run: ctest --output-on-failure
  90. android:
  91. runs-on: ubuntu-latest
  92. name: Android
  93. strategy:
  94. fail-fast: false
  95. steps:
  96. - name: Checkout Code
  97. uses: actions/checkout@v2
  98. - name: Gradle Build
  99. working-directory: ${{github.workspace}}/Build/Android
  100. run: ./gradlew build
  101. ios:
  102. runs-on: macos-latest
  103. name: iOS
  104. strategy:
  105. fail-fast: false
  106. steps:
  107. - name: Checkout Code
  108. uses: actions/checkout@v2
  109. - name: Configure CMake
  110. run: cmake -B ${{github.workspace}}/Build/XCode_iOS -DTARGET_HELLO_WORLD=OFF -DTARGET_PERFORMANCE_TEST=OFF -DCMAKE_SYSTEM_NAME=iOS -GXcode Build
  111. - name: Build
  112. run: cmake --build ${{github.workspace}}/Build/XCode_iOS -- -sdk iphonesimulator -arch x86_64