build.yml 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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:
  17. runs-on: ubuntu-latest
  18. name: Linux
  19. strategy:
  20. fail-fast: false
  21. matrix:
  22. build_type: [Debug, Release, Distribution, ReleaseASAN, ReleaseUBSAN]
  23. clang_version: [clang++-10, clang++-11, 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. msvc_cl:
  35. runs-on: windows-latest
  36. name: Visual Studio CL
  37. strategy:
  38. fail-fast: false
  39. matrix:
  40. build_type: [Debug, Release, Distribution]
  41. steps:
  42. - name: Checkout Code
  43. uses: actions/checkout@v2
  44. - name: Add msbuild to PATH
  45. uses: microsoft/[email protected]
  46. - name: Configure CMake
  47. run: cmake -B ${{github.workspace}}/Build/VS2019_CL -G "Visual Studio 16 2019" -A x64 Build
  48. - name: Build
  49. run: msbuild Build\VS2019_CL\JoltPhysics.sln /property:Configuration=${{matrix.build_type}}
  50. - name: Test
  51. working-directory: ${{github.workspace}}/Build/VS2019_CL/${{matrix.build_type}}
  52. run: ./UnitTests.exe
  53. android:
  54. runs-on: ubuntu-latest
  55. name: Android
  56. strategy:
  57. fail-fast: false
  58. steps:
  59. - name: Checkout Code
  60. uses: actions/checkout@v2
  61. - name: Gradle Build
  62. working-directory: ${{github.workspace}}/Build/Android
  63. run: ./gradlew build