build.yml 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  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, v141, v142, clang-cl]
  80. include:
  81. - toolset: v141
  82. toolset_option: -T"v141"
  83. - toolset: v142
  84. toolset_option: -T"v142"
  85. - toolset: clang-cl
  86. toolset_option: -T"ClangCl"
  87. runs-on: windows-latest
  88. steps:
  89. - uses: actions/checkout@v4
  90. - name: Compile tests
  91. working-directory: build
  92. run: |
  93. cmake -DENTT_BUILD_TESTING=ON -DENTT_BUILD_LIB=ON -DENTT_BUILD_EXAMPLE=ON ${{ matrix.toolset_option }} ..
  94. cmake --build . -j 4
  95. - name: Run tests
  96. working-directory: build
  97. env:
  98. CTEST_OUTPUT_ON_FAILURE: 1
  99. run: ctest -C Debug -j4
  100. macos:
  101. timeout-minutes: 15
  102. runs-on: macOS-latest
  103. steps:
  104. - uses: actions/checkout@v4
  105. - name: Compile tests
  106. working-directory: build
  107. run: |
  108. cmake -DENTT_BUILD_TESTING=ON -DENTT_BUILD_LIB=ON -DENTT_BUILD_EXAMPLE=ON ..
  109. make -j4
  110. - name: Run tests
  111. working-directory: build
  112. env:
  113. CTEST_OUTPUT_ON_FAILURE: 1
  114. run: ctest -C Debug -j4
  115. extra:
  116. timeout-minutes: 15
  117. strategy:
  118. matrix:
  119. os: [windows-latest, macOS-latest, ubuntu-latest]
  120. id_type: ["std::uint32_t", "std::uint64_t"]
  121. cxx_std: [cxx_std_17, cxx_std_20]
  122. runs-on: ${{ matrix.os }}
  123. steps:
  124. - uses: actions/checkout@v4
  125. - name: Compile tests
  126. working-directory: build
  127. run: |
  128. cmake -DENTT_BUILD_TESTING=ON -DENTT_CXX_STD=${{ matrix.cxx_std }} -DENTT_ID_TYPE=${{ matrix.id_type }} ..
  129. cmake --build . -j 4
  130. - name: Run tests
  131. working-directory: build
  132. env:
  133. CTEST_OUTPUT_ON_FAILURE: 1
  134. run: ctest -C Debug -j4