build.yml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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, v143, clang-cl]
  38. include:
  39. - toolset: v143
  40. toolset_option: -T"v143"
  41. - toolset: clang-cl
  42. toolset_option: -T"ClangCl"
  43. timeout-minutes: 15
  44. runs-on: windows-latest
  45. steps:
  46. - uses: actions/checkout@v4
  47. - name: Compile tests
  48. working-directory: build
  49. run: |
  50. cmake -DENTT_BUILD_TESTING=ON -DENTT_BUILD_LIB=ON -DENTT_BUILD_EXAMPLE=ON ${{ matrix.toolset_option }} ..
  51. cmake --build . -j 4
  52. - name: Run tests
  53. working-directory: build
  54. env:
  55. CTEST_OUTPUT_ON_FAILURE: 1
  56. run: ctest -C Debug -j4
  57. macos:
  58. timeout-minutes: 15
  59. runs-on: macOS-latest
  60. steps:
  61. - uses: actions/checkout@v4
  62. - name: Compile tests
  63. working-directory: build
  64. run: |
  65. cmake -DENTT_BUILD_TESTING=ON -DENTT_BUILD_LIB=ON -DENTT_BUILD_EXAMPLE=ON ..
  66. make -j4
  67. - name: Run tests
  68. working-directory: build
  69. env:
  70. CTEST_OUTPUT_ON_FAILURE: 1
  71. run: ctest -C Debug -j4
  72. extra:
  73. strategy:
  74. matrix:
  75. os: [windows-latest, macOS-latest, ubuntu-latest]
  76. id_type: ["std::uint32_t", "std::uint64_t"]
  77. cxx_std: [cxx_std_20, cxx_std_23]
  78. timeout-minutes: 15
  79. runs-on: ${{ matrix.os }}
  80. steps:
  81. - uses: actions/checkout@v4
  82. - name: Compile tests
  83. working-directory: build
  84. run: |
  85. cmake -DENTT_BUILD_TESTING=ON -DENTT_CXX_STD=${{ matrix.cxx_std }} -DENTT_ID_TYPE=${{ matrix.id_type }} ..
  86. cmake --build . -j 4
  87. - name: Run tests
  88. working-directory: build
  89. env:
  90. CTEST_OUTPUT_ON_FAILURE: 1
  91. run: ctest -C Debug -j4