build.yml 4.0 KB

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