build.yml 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. name: build
  2. on: [push, pull_request]
  3. jobs:
  4. linux:
  5. timeout-minutes: 15
  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++-10
  16. exe: g++-10
  17. - pkg: g++-11
  18. exe: g++-11
  19. - pkg: clang-8
  20. exe: clang++-8
  21. - pkg: clang-9
  22. exe: clang++-9
  23. - pkg: clang-10
  24. exe: clang++-10
  25. - pkg: clang-11
  26. exe: clang++-11
  27. - pkg: clang-12
  28. exe: clang++-12
  29. runs-on: ubuntu-latest
  30. steps:
  31. - uses: actions/checkout@v3
  32. - name: Install compiler
  33. run: |
  34. sudo apt update
  35. sudo apt install -y ${{ matrix.compiler.pkg }}
  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 ..
  42. make -j4
  43. - name: Run tests
  44. working-directory: build
  45. env:
  46. CTEST_OUTPUT_ON_FAILURE: 1
  47. run: ctest --timeout 30 -C Debug -j4
  48. linux-extra:
  49. timeout-minutes: 15
  50. strategy:
  51. matrix:
  52. compiler: [g++, clang++]
  53. id_type: ["std::uint32_t", "std::uint64_t"]
  54. cxx_std: [cxx_std_17, cxx_std_20]
  55. runs-on: ubuntu-latest
  56. steps:
  57. - uses: actions/checkout@v3
  58. - name: Compile tests
  59. working-directory: build
  60. env:
  61. CXX: ${{ matrix.compiler }}
  62. run: |
  63. cmake -DENTT_BUILD_TESTING=ON -DENTT_CXX_STD=${{ matrix.cxx_std }} -DENTT_ID_TYPE=${{ matrix.id_type }} ..
  64. make -j4
  65. - name: Run tests
  66. working-directory: build
  67. env:
  68. CTEST_OUTPUT_ON_FAILURE: 1
  69. run: ctest --timeout 30 -C Debug -j4
  70. windows:
  71. timeout-minutes: 15
  72. strategy:
  73. matrix:
  74. toolset: [default, v141, v142, clang-cl]
  75. include:
  76. - toolset: v141
  77. toolset_option: -T"v141"
  78. - toolset: v142
  79. toolset_option: -T"v142"
  80. - toolset: clang-cl
  81. toolset_option: -T"ClangCl"
  82. runs-on: windows-latest
  83. steps:
  84. - uses: actions/checkout@v3
  85. - name: Compile tests
  86. working-directory: build
  87. run: |
  88. cmake -DENTT_BUILD_TESTING=ON -DENTT_BUILD_LIB=ON -DENTT_BUILD_EXAMPLE=ON ${{ matrix.toolset_option }} ..
  89. cmake --build . -j 4
  90. - name: Run tests
  91. working-directory: build
  92. env:
  93. CTEST_OUTPUT_ON_FAILURE: 1
  94. run: ctest --timeout 30 -C Debug -j4
  95. windows-extra:
  96. timeout-minutes: 15
  97. strategy:
  98. matrix:
  99. id_type: ["std::uint32_t", "std::uint64_t"]
  100. cxx_std: [cxx_std_17, cxx_std_20]
  101. runs-on: windows-latest
  102. steps:
  103. - uses: actions/checkout@v3
  104. - name: Compile tests
  105. working-directory: build
  106. run: |
  107. cmake -DENTT_BUILD_TESTING=ON -DENTT_CXX_STD=${{ matrix.cxx_std }} -DENTT_ID_TYPE=${{ matrix.id_type }} ..
  108. cmake --build . -j 4
  109. - name: Run tests
  110. working-directory: build
  111. env:
  112. CTEST_OUTPUT_ON_FAILURE: 1
  113. run: ctest --timeout 30 -C Debug -j4
  114. macos:
  115. timeout-minutes: 15
  116. runs-on: macOS-latest
  117. steps:
  118. - uses: actions/checkout@v3
  119. - name: Compile tests
  120. working-directory: build
  121. run: |
  122. cmake -DENTT_BUILD_TESTING=ON -DENTT_BUILD_LIB=ON -DENTT_BUILD_EXAMPLE=ON ..
  123. make -j4
  124. - name: Run tests
  125. working-directory: build
  126. env:
  127. CTEST_OUTPUT_ON_FAILURE: 1
  128. run: ctest --timeout 30 -C Debug -j4
  129. macos-extra:
  130. timeout-minutes: 15
  131. strategy:
  132. matrix:
  133. id_type: ["std::uint32_t", "std::uint64_t"]
  134. cxx_std: [cxx_std_17, cxx_std_20]
  135. runs-on: macOS-latest
  136. steps:
  137. - uses: actions/checkout@v3
  138. - name: Compile tests
  139. working-directory: build
  140. run: |
  141. cmake -DENTT_BUILD_TESTING=ON -DENTT_CXX_STD=${{ matrix.cxx_std }} -DENTT_ID_TYPE=${{ matrix.id_type }} ..
  142. make -j4
  143. - name: Run tests
  144. working-directory: build
  145. env:
  146. CTEST_OUTPUT_ON_FAILURE: 1
  147. run: ctest --timeout 30 -C Debug -j4