build.yml 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  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: ["std::uint32_t", "std::uint64_t"]
  50. cxx_std: [cxx_std_17, cxx_std_20]
  51. runs-on: ubuntu-latest
  52. steps:
  53. - uses: actions/checkout@v2
  54. - name: Compile tests
  55. working-directory: build
  56. env:
  57. CXX: ${{ matrix.compiler }}
  58. run: |
  59. cmake -DENTT_BUILD_TESTING=ON -DENTT_CXX_STD=${{ matrix.cxx_std }} -DENTT_ID_TYPE=${{ matrix.id_type }} ..
  60. make -j4
  61. - name: Run tests
  62. working-directory: build
  63. env:
  64. CTEST_OUTPUT_ON_FAILURE: 1
  65. run: ctest --timeout 30 -C Debug -j4
  66. windows:
  67. timeout-minutes: 10
  68. strategy:
  69. matrix:
  70. toolset: [clang-cl, default, v141]
  71. include:
  72. - toolset: clang-cl
  73. toolset_option: -T"ClangCl"
  74. - toolset: v141
  75. toolset_option: -T"v141"
  76. runs-on: windows-latest
  77. steps:
  78. - uses: actions/checkout@v2
  79. - name: Compile tests
  80. working-directory: build
  81. run: |
  82. cmake -DENTT_BUILD_TESTING=ON -DENTT_BUILD_LIB=ON -DENTT_BUILD_EXAMPLE=ON ${{ matrix.toolset_option }} ..
  83. cmake --build . -j 4
  84. - name: Run tests
  85. working-directory: build
  86. env:
  87. CTEST_OUTPUT_ON_FAILURE: 1
  88. run: ctest --timeout 30 -C Debug -j4
  89. windows-extra:
  90. timeout-minutes: 10
  91. strategy:
  92. matrix:
  93. id_type: ["std::uint32_t", "std::uint64_t"]
  94. cxx_std: [cxx_std_17, cxx_std_20]
  95. runs-on: windows-latest
  96. steps:
  97. - uses: actions/checkout@v2
  98. - name: Compile tests
  99. working-directory: build
  100. run: |
  101. cmake -DENTT_BUILD_TESTING=ON -DENTT_CXX_STD=${{ matrix.cxx_std }} -DENTT_ID_TYPE=${{ matrix.id_type }} ..
  102. cmake --build . -j 4
  103. - name: Run tests
  104. working-directory: build
  105. env:
  106. CTEST_OUTPUT_ON_FAILURE: 1
  107. run: ctest --timeout 30 -C Debug -j4
  108. macos:
  109. timeout-minutes: 10
  110. runs-on: macOS-latest
  111. steps:
  112. - uses: actions/checkout@v2
  113. - name: Compile tests
  114. working-directory: build
  115. run: |
  116. cmake -DENTT_BUILD_TESTING=ON -DENTT_BUILD_LIB=ON -DENTT_BUILD_EXAMPLE=ON ..
  117. make -j4
  118. - name: Run tests
  119. working-directory: build
  120. env:
  121. CTEST_OUTPUT_ON_FAILURE: 1
  122. run: ctest --timeout 30 -C Debug -j4
  123. macos-extra:
  124. timeout-minutes: 10
  125. strategy:
  126. matrix:
  127. id_type: ["std::uint32_t", "std::uint64_t"]
  128. cxx_std: [cxx_std_17, cxx_std_20]
  129. runs-on: macOS-latest
  130. steps:
  131. - uses: actions/checkout@v2
  132. - name: Compile tests
  133. working-directory: build
  134. run: |
  135. cmake -DENTT_BUILD_TESTING=ON -DENTT_CXX_STD=${{ matrix.cxx_std }} -DENTT_ID_TYPE=${{ matrix.id_type }} ..
  136. make -j4
  137. - name: Run tests
  138. working-directory: build
  139. env:
  140. CTEST_OUTPUT_ON_FAILURE: 1
  141. run: ctest --timeout 30 -C Debug -j4