build.yml 2.7 KB

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