build.yml 4.6 KB

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