build.yml 2.3 KB

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