build.yml 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  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. runs-on: ubuntu-latest
  26. steps:
  27. - uses: actions/checkout@v2
  28. - name: Install compiler
  29. run: |
  30. sudo apt-get update
  31. sudo apt-get install ${{ matrix.compiler.pkg }} -y
  32. - name: Compile tests
  33. working-directory: build
  34. env:
  35. CXX: ${{ matrix.compiler.exe }}
  36. run: |
  37. cmake -DENTT_BUILD_TESTING=ON -DENTT_BUILD_LIB=ON -DENTT_BUILD_EXAMPLE=ON ..
  38. make -j4
  39. - name: Run tests
  40. working-directory: build
  41. env:
  42. CTEST_OUTPUT_ON_FAILURE: 1
  43. run: ctest --timeout 30 -C Debug -j4
  44. linux-extra:
  45. timeout-minutes: 10
  46. strategy:
  47. matrix:
  48. compiler: [g++, clang++]
  49. id_type: [uint32, uint64]
  50. cxx_std: [cxx_std_17, cxx_std_20]
  51. include:
  52. - id_type: uint64
  53. id_type_variable: -DENTT_ID_TYPE=std::uint64_t
  54. - cxx_std: cxx_std_20
  55. cxx_std_variable: -DENTT_CXX_STD=cxx_std_20
  56. runs-on: ubuntu-latest
  57. steps:
  58. - uses: actions/checkout@v2
  59. - name: Compile tests
  60. working-directory: build
  61. env:
  62. CXX: ${{ matrix.compiler }}
  63. run: |
  64. cmake -DENTT_BUILD_TESTING=ON ${{ matrix.id_type_variable }} ${{ matrix.cxx_std_variable }} ..
  65. make -j4
  66. - name: Run tests
  67. working-directory: build
  68. env:
  69. CTEST_OUTPUT_ON_FAILURE: 1
  70. run: ctest --timeout 30 -C Debug -j4
  71. windows:
  72. timeout-minutes: 10
  73. strategy:
  74. matrix:
  75. os: [windows-latest, windows-2016]
  76. toolset: [clang-cl, default, v141]
  77. include:
  78. - toolset: clang-cl
  79. toolset_option: -T"ClangCl"
  80. - toolset: v141
  81. toolset_option: -T"v141"
  82. exclude:
  83. - os: windows-2016
  84. toolset: clang-cl
  85. - os: windows-2016
  86. toolset: v141
  87. runs-on: ${{ matrix.os }}
  88. steps:
  89. - uses: actions/checkout@v2
  90. - name: Compile tests
  91. working-directory: build
  92. run: |
  93. cmake -DENTT_BUILD_TESTING=ON -DENTT_BUILD_LIB=ON -DENTT_BUILD_EXAMPLE=ON ${{ matrix.toolset_option }} ..
  94. cmake --build . -j 4
  95. - name: Run tests
  96. working-directory: build
  97. env:
  98. CTEST_OUTPUT_ON_FAILURE: 1
  99. run: ctest --timeout 30 -C Debug -j4
  100. windows-extra:
  101. timeout-minutes: 10
  102. strategy:
  103. matrix:
  104. id_type: [uint32, uint64]
  105. cxx_std: [cxx_std_17, cxx_std_20]
  106. include:
  107. - id_type: uint64
  108. id_type_variable: -DENTT_ID_TYPE=std::uint64_t
  109. - cxx_std: cxx_std_20
  110. cxx_std_variable: -DENTT_CXX_STD=cxx_std_20
  111. runs-on: windows-latest
  112. steps:
  113. - uses: actions/checkout@v2
  114. - name: Compile tests
  115. working-directory: build
  116. run: |
  117. cmake -DENTT_BUILD_TESTING=ON ${{ matrix.id_type_variable }} ${{ matrix.cxx_std_variable }} ..
  118. cmake --build . -j 4
  119. - name: Run tests
  120. working-directory: build
  121. env:
  122. CTEST_OUTPUT_ON_FAILURE: 1
  123. run: ctest --timeout 30 -C Debug -j4
  124. macos:
  125. timeout-minutes: 10
  126. runs-on: macOS-latest
  127. steps:
  128. - uses: actions/checkout@v2
  129. - name: Compile tests
  130. working-directory: build
  131. run: |
  132. cmake -DENTT_BUILD_TESTING=ON -DENTT_BUILD_LIB=ON -DENTT_BUILD_EXAMPLE=ON ..
  133. make -j4
  134. - name: Run tests
  135. working-directory: build
  136. env:
  137. CTEST_OUTPUT_ON_FAILURE: 1
  138. run: ctest --timeout 30 -C Debug -j4
  139. macos-extra:
  140. timeout-minutes: 10
  141. strategy:
  142. matrix:
  143. id_type: [uint32, uint64]
  144. cxx_std: [cxx_std_17, cxx_std_20]
  145. include:
  146. - id_type: uint64
  147. id_type_variable: -DENTT_ID_TYPE=std::uint64_t
  148. - cxx_std: cxx_std_20
  149. cxx_std_variable: -DENTT_CXX_STD=cxx_std_20
  150. runs-on: macOS-latest
  151. steps:
  152. - uses: actions/checkout@v2
  153. - name: Compile tests
  154. working-directory: build
  155. run: |
  156. cmake -DENTT_BUILD_TESTING=ON ${{ matrix.id_type_variable }} ${{ matrix.cxx_std_variable }} ..
  157. make -j4
  158. - name: Run tests
  159. working-directory: build
  160. env:
  161. CTEST_OUTPUT_ON_FAILURE: 1
  162. run: ctest --timeout 30 -C Debug -j4