build.yml 4.2 KB

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