build.yml 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  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. toolset: [clang-cl, default, v141]
  76. include:
  77. - toolset: clang-cl
  78. toolset_option: -T"ClangCl"
  79. - toolset: v141
  80. toolset_option: -T"v141"
  81. runs-on: windows-latest
  82. steps:
  83. - uses: actions/checkout@v2
  84. - name: Compile tests
  85. working-directory: build
  86. run: |
  87. cmake -DENTT_BUILD_TESTING=ON -DENTT_BUILD_LIB=ON -DENTT_BUILD_EXAMPLE=ON ${{ matrix.toolset_option }} ..
  88. cmake --build . -j 4
  89. - name: Run tests
  90. working-directory: build
  91. env:
  92. CTEST_OUTPUT_ON_FAILURE: 1
  93. run: ctest --timeout 30 -C Debug -j4
  94. windows-extra:
  95. timeout-minutes: 10
  96. strategy:
  97. matrix:
  98. id_type: [uint32, uint64]
  99. cxx_std: [cxx_std_17, cxx_std_20]
  100. include:
  101. - id_type: uint64
  102. id_type_variable: -DENTT_ID_TYPE=std::uint64_t
  103. - cxx_std: cxx_std_20
  104. cxx_std_variable: -DENTT_CXX_STD=cxx_std_20
  105. runs-on: windows-latest
  106. steps:
  107. - uses: actions/checkout@v2
  108. - name: Compile tests
  109. working-directory: build
  110. run: |
  111. cmake -DENTT_BUILD_TESTING=ON ${{ matrix.id_type_variable }} ${{ matrix.cxx_std_variable }} ..
  112. cmake --build . -j 4
  113. - name: Run tests
  114. working-directory: build
  115. env:
  116. CTEST_OUTPUT_ON_FAILURE: 1
  117. run: ctest --timeout 30 -C Debug -j4
  118. macos:
  119. timeout-minutes: 10
  120. runs-on: macOS-latest
  121. steps:
  122. - uses: actions/checkout@v2
  123. - name: Compile tests
  124. working-directory: build
  125. run: |
  126. cmake -DENTT_BUILD_TESTING=ON -DENTT_BUILD_LIB=ON -DENTT_BUILD_EXAMPLE=ON ..
  127. make -j4
  128. - name: Run tests
  129. working-directory: build
  130. env:
  131. CTEST_OUTPUT_ON_FAILURE: 1
  132. run: ctest --timeout 30 -C Debug -j4
  133. macos-extra:
  134. timeout-minutes: 10
  135. strategy:
  136. matrix:
  137. id_type: [uint32, uint64]
  138. cxx_std: [cxx_std_17, cxx_std_20]
  139. include:
  140. - id_type: uint64
  141. id_type_variable: -DENTT_ID_TYPE=std::uint64_t
  142. - cxx_std: cxx_std_20
  143. cxx_std_variable: -DENTT_CXX_STD=cxx_std_20
  144. runs-on: macOS-latest
  145. steps:
  146. - uses: actions/checkout@v2
  147. - name: Compile tests
  148. working-directory: build
  149. run: |
  150. cmake -DENTT_BUILD_TESTING=ON ${{ matrix.id_type_variable }} ${{ matrix.cxx_std_variable }} ..
  151. make -j4
  152. - name: Run tests
  153. working-directory: build
  154. env:
  155. CTEST_OUTPUT_ON_FAILURE: 1
  156. run: ctest --timeout 30 -C Debug -j4