build.yml 4.4 KB

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