build.yml 2.8 KB

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