build.yml 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. name: build
  2. on: [push, pull_request]
  3. jobs:
  4. linux:
  5. timeout-minutes: 10
  6. strategy:
  7. matrix:
  8. compiler: [
  9. g++-7, g++-8, g++-9, g++,
  10. clang++-8, clang++-9, clang++
  11. ]
  12. runs-on: ubuntu-latest
  13. steps:
  14. - uses: actions/checkout@v2
  15. - name: Install g++-7
  16. if: ${{ matrix.compiler == 'g++-7' }}
  17. run: sudo apt install g++-7
  18. - name: Install g++-8
  19. if: ${{ matrix.compiler == 'g++-8' }}
  20. run: sudo apt install g++-8
  21. - name: Install clang-8
  22. if: ${{ matrix.compiler == 'clang++-8' }}
  23. run: sudo apt install clang-8
  24. - name: Compile tests
  25. working-directory: build
  26. env:
  27. CXX: ${{ matrix.compiler }}
  28. run: |
  29. cmake -DENTT_BUILD_TESTING=ON -DENTT_BUILD_LIB=ON -DENTT_BUILD_EXAMPLE=ON ..
  30. make -j4
  31. - name: Run tests
  32. working-directory: build
  33. env:
  34. CTEST_OUTPUT_ON_FAILURE: 1
  35. run: ctest --timeout 10 -C Debug -j4
  36. windows:
  37. timeout-minutes: 10
  38. strategy:
  39. matrix:
  40. os: [windows-latest, windows-2016]
  41. toolset: [clang-cl, default, v141]
  42. include:
  43. - toolset: clang-cl
  44. toolset_option: -T"ClangCl"
  45. - toolset: v141
  46. toolset_option: -T"v141"
  47. exclude:
  48. - os: windows-2016
  49. toolset: clang-cl
  50. - os: windows-2016
  51. toolset: v141
  52. runs-on: ${{ matrix.os }}
  53. steps:
  54. - uses: actions/checkout@v2
  55. - name: Compile tests
  56. working-directory: build
  57. run: |
  58. cmake -DENTT_BUILD_TESTING=ON -DENTT_BUILD_LIB=ON -DENTT_BUILD_EXAMPLE=ON ${{ matrix.toolset_option }} ..
  59. cmake --build . -j 4
  60. - name: Run tests
  61. working-directory: build
  62. env:
  63. CTEST_OUTPUT_ON_FAILURE: 1
  64. run: ctest --timeout 10 -C Debug -j4
  65. macos:
  66. timeout-minutes: 10
  67. runs-on: macOS-latest
  68. steps:
  69. - uses: actions/checkout@v2
  70. - name: Compile tests
  71. working-directory: build
  72. run: |
  73. cmake -DENTT_BUILD_TESTING=ON -DENTT_BUILD_LIB=ON -DENTT_BUILD_EXAMPLE=ON ..
  74. make -j4
  75. - name: Run tests
  76. working-directory: build
  77. env:
  78. CTEST_OUTPUT_ON_FAILURE: 1
  79. run: ctest --timeout 10 -C Debug -j4