build.yml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. name: build
  2. on: [push, pull_request]
  3. jobs:
  4. linux:
  5. timeout-minutes: 10
  6. strategy:
  7. matrix:
  8. compiler:
  9. - pkg: g++-7
  10. exe: g++-7
  11. - pkg: g++-8
  12. exe: g++-8
  13. - pkg: g++-9
  14. exe: g++-9
  15. - pkg: g++
  16. exe: g++
  17. - pkg: clang-8
  18. exe: clang++-8
  19. - pkg: clang-9
  20. exe: clang++-9
  21. - pkg: clang-10
  22. exe: clang++-10
  23. - pkg: clang
  24. exe: clang++
  25. id_type: [uint32, uint64]
  26. include:
  27. - id_type: uint64
  28. id_type_option: -DENTT_BUILD_UINT64=ON
  29. runs-on: ubuntu-latest
  30. steps:
  31. - uses: actions/checkout@v2
  32. - name: Install compiler
  33. run: |
  34. sudo apt-get update
  35. sudo apt-get install ${{ matrix.compiler.pkg }} -y
  36. - name: Compile tests
  37. working-directory: build
  38. env:
  39. CXX: ${{ matrix.compiler.exe }}
  40. run: |
  41. cmake -DENTT_BUILD_TESTING=ON -DENTT_BUILD_LIB=ON -DENTT_BUILD_EXAMPLE=ON ${{ matrix.id_type_option }} ..
  42. make -j4
  43. - name: Run tests
  44. working-directory: build
  45. env:
  46. CTEST_OUTPUT_ON_FAILURE: 1
  47. run: ctest --timeout 10 -C Debug -j4
  48. windows:
  49. timeout-minutes: 10
  50. strategy:
  51. matrix:
  52. os: [windows-latest, windows-2016]
  53. toolset: [clang-cl, default, v141]
  54. id_type: [uint32, uint64]
  55. include:
  56. - toolset: clang-cl
  57. toolset_option: -T"ClangCl"
  58. - toolset: v141
  59. toolset_option: -T"v141"
  60. - id_type: uint64
  61. id_type_option: -DENTT_BUILD_UINT64=ON
  62. exclude:
  63. - os: windows-2016
  64. toolset: clang-cl
  65. - os: windows-2016
  66. toolset: v141
  67. runs-on: ${{ matrix.os }}
  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 ${{ matrix.id_type_option }} ${{ matrix.toolset_option }} ..
  74. cmake --build . -j 4
  75. - name: Run tests
  76. working-directory: build
  77. env:
  78. CTEST_OUTPUT_ON_FAILURE: 1
  79. run: ctest --timeout 10 -C Debug -j4
  80. macos:
  81. timeout-minutes: 10
  82. strategy:
  83. matrix:
  84. id_type: [uint32, uint64]
  85. include:
  86. - id_type: uint64
  87. id_type_option: -DENTT_BUILD_UINT64=ON
  88. runs-on: macOS-latest
  89. steps:
  90. - uses: actions/checkout@v2
  91. - name: Compile tests
  92. working-directory: build
  93. run: |
  94. cmake -DENTT_BUILD_TESTING=ON -DENTT_BUILD_LIB=ON -DENTT_BUILD_EXAMPLE=ON ${{ matrix.id_type_option }} ..
  95. make -j4
  96. - name: Run tests
  97. working-directory: build
  98. env:
  99. CTEST_OUTPUT_ON_FAILURE: 1
  100. run: ctest --timeout 10 -C Debug -j4