Daan De Meyer | f972602 | 2019-10-10 22:16:49 +0200 | [diff] [blame] | 1 | name: CI |
| 2 | |
Stefan | 2ef137d | 2022-01-11 20:33:39 +0100 | [diff] [blame] | 3 | on: |
| 4 | push: |
| 5 | paths-ignore: |
| 6 | - 'doc/**' |
| 7 | - 'scripts/**' |
| 8 | - 'LICENSE.txt' |
| 9 | - 'README.md' |
Stefan | aaa7253 | 2022-01-18 00:16:44 +0100 | [diff] [blame] | 10 | pull_request: |
Salvage | a212438 | 2022-01-24 21:32:39 +0100 | [diff] [blame] | 11 | paths-ignore: |
| 12 | - 'doc/**' |
| 13 | - 'scripts/**' |
| 14 | - 'LICENSE.txt' |
| 15 | - 'README.md' |
Daan De Meyer | f972602 | 2019-10-10 22:16:49 +0200 | [diff] [blame] | 16 | |
Stefan | ff693f7 | 2022-01-10 15:08:50 +0100 | [diff] [blame] | 17 | env: |
| 18 | CTEST_OUTPUT_ON_FAILURE: ON |
| 19 | CTEST_PARALLEL_LEVEL: 2 |
| 20 | |
Daan De Meyer | f972602 | 2019-10-10 22:16:49 +0200 | [diff] [blame] | 21 | jobs: |
Stefan | bf037c1 | 2022-01-20 13:06:51 +0100 | [diff] [blame] | 22 | coverage: |
Stefan | bf037c1 | 2022-01-20 13:06:51 +0100 | [diff] [blame] | 23 | runs-on: ubuntu-latest |
Stefan | db758e0 | 2022-06-06 03:42:02 +0200 | [diff] [blame] | 24 | |
Stefan | bf037c1 | 2022-01-20 13:06:51 +0100 | [diff] [blame] | 25 | steps: |
| 26 | - uses: actions/checkout@v2 |
Stefan | db758e0 | 2022-06-06 03:42:02 +0200 | [diff] [blame] | 27 | |
Stefan | bf037c1 | 2022-01-20 13:06:51 +0100 | [diff] [blame] | 28 | - name: Install |
| 29 | run: sudo apt-get install -y ninja-build lcov |
Stefan | db758e0 | 2022-06-06 03:42:02 +0200 | [diff] [blame] | 30 | |
Stefan | bf037c1 | 2022-01-20 13:06:51 +0100 | [diff] [blame] | 31 | - name: Generate |
| 32 | run: cmake -B build -S . -G Ninja -D CMAKE_CXX_FLAGS="-fprofile-arcs -ftest-coverage" |
| 33 | |
| 34 | - name: Build |
| 35 | run: cmake --build build |
| 36 | |
| 37 | - name: Test |
| 38 | run: ctest --test-dir build --no-tests=error |
Stefan | db758e0 | 2022-06-06 03:42:02 +0200 | [diff] [blame] | 39 | |
Stefan | bf037c1 | 2022-01-20 13:06:51 +0100 | [diff] [blame] | 40 | - name: LCOV |
| 41 | run: | |
| 42 | mkdir coverage |
| 43 | lcov -c -d build/ -o coverage/lcov.info --include "*doctest/parts*" |
Stefan | db758e0 | 2022-06-06 03:42:02 +0200 | [diff] [blame] | 44 | |
Stefan | bf037c1 | 2022-01-20 13:06:51 +0100 | [diff] [blame] | 45 | - name: Codecov |
| 46 | uses: codecov/codecov-action@v2 |
| 47 | with: |
| 48 | files: ./coverage/lcov.info |
| 49 | fail_ci_if_error: true |
| 50 | |
Stefan | db758e0 | 2022-06-06 03:42:02 +0200 | [diff] [blame] | 51 | clang-tidy: |
| 52 | if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository |
| 53 | runs-on: ubuntu-22.04 |
| 54 | |
| 55 | steps: |
| 56 | - uses: actions/checkout@v2 |
| 57 | |
| 58 | - name: Install |
| 59 | run: sudo apt-get install -y ninja-build clang-tidy-14 |
| 60 | |
| 61 | - name: Generate |
| 62 | run: cmake -B build -S . -G Ninja -D CMAKE_CXX_COMPILER=clang++ -D CMAKE_EXPORT_COMPILE_COMMANDS=ON -D CMAKE_CXX_CLANG_TIDY="clang-tidy-14;-warnings-as-errors=*" |
| 63 | |
| 64 | - name: Build |
| 65 | run: cmake --build build |
| 66 | |
Benbuck Nason | 4ba20f9 | 2022-10-03 07:45:43 -0700 | [diff] [blame] | 67 | sanitizers: |
| 68 | if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository |
| 69 | runs-on: ubuntu-22.04 |
| 70 | |
| 71 | strategy: |
| 72 | fail-fast: false |
| 73 | matrix: |
| 74 | sanitizers: ["address", "thread", "undefined", "integer", "implicit-conversion", "nullability", "safe-stack"] |
| 75 | |
| 76 | steps: |
| 77 | - uses: actions/checkout@v2 |
| 78 | |
| 79 | - name: Install |
| 80 | run: sudo apt-get install -y ninja-build |
| 81 | |
| 82 | - name: Generate |
| 83 | run: cmake -B build -S . -G Ninja -D CMAKE_CXX_COMPILER=clang++ -D CMAKE_EXPORT_COMPILE_COMMANDS=ON -D CMAKE_CXX_FLAGS="-fsanitize=${{ matrix.sanitizers }}" |
| 84 | |
| 85 | - name: Build |
| 86 | run: cmake --build build |
| 87 | |
| 88 | - name: Test |
| 89 | run: ctest --test-dir build --no-tests=error |
| 90 | |
Daan De Meyer | f972602 | 2019-10-10 22:16:49 +0200 | [diff] [blame] | 91 | ci: |
Stefan | 76cc137 | 2022-01-18 00:17:46 +0100 | [diff] [blame] | 92 | if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository |
Daan De Meyer | f972602 | 2019-10-10 22:16:49 +0200 | [diff] [blame] | 93 | runs-on: ${{ matrix.os }} |
| 94 | |
| 95 | env: |
| 96 | CMAKE_GENERATOR: Ninja |
| 97 | ASAN_OPTIONS: strict_string_checks=true:detect_odr_violation=2:detect_stack_use_after_return=true:check_initialization_order=true:strict_init_order=true |
| 98 | TSAN_OPTIONS: force_seq_cst_atomics=1 |
| 99 | |
| 100 | strategy: |
| 101 | fail-fast: false |
| 102 | matrix: |
Stefan | ff693f7 | 2022-01-10 15:08:50 +0100 | [diff] [blame] | 103 | os: ["windows-2019", "windows-2022"] |
| 104 | compiler: ["cl", "clang", "clang-cl"] |
Daan De Meyer | f972602 | 2019-10-10 22:16:49 +0200 | [diff] [blame] | 105 | |
| 106 | include: |
Stefan | ff693f7 | 2022-01-10 15:08:50 +0100 | [diff] [blame] | 107 | - os: ubuntu-18.04 |
Daan De Meyer | f972602 | 2019-10-10 22:16:49 +0200 | [diff] [blame] | 108 | compiler: gcc |
| 109 | version: "4.8" |
| 110 | |
Stefan | ff693f7 | 2022-01-10 15:08:50 +0100 | [diff] [blame] | 111 | - os: ubuntu-18.04 |
Daan De Meyer | f972602 | 2019-10-10 22:16:49 +0200 | [diff] [blame] | 112 | compiler: gcc |
| 113 | version: "4.9" |
| 114 | |
Stefan | ff693f7 | 2022-01-10 15:08:50 +0100 | [diff] [blame] | 115 | - os: ubuntu-18.04 |
Daan De Meyer | f972602 | 2019-10-10 22:16:49 +0200 | [diff] [blame] | 116 | compiler: gcc |
| 117 | version: "5" |
| 118 | |
Stefan | ff693f7 | 2022-01-10 15:08:50 +0100 | [diff] [blame] | 119 | - os: ubuntu-18.04 |
Daan De Meyer | f972602 | 2019-10-10 22:16:49 +0200 | [diff] [blame] | 120 | compiler: gcc |
| 121 | version: "6" |
| 122 | |
Stefan | ff693f7 | 2022-01-10 15:08:50 +0100 | [diff] [blame] | 123 | - os: ubuntu-18.04 |
Daan De Meyer | f972602 | 2019-10-10 22:16:49 +0200 | [diff] [blame] | 124 | compiler: gcc |
| 125 | version: "7" |
| 126 | |
Stefan | ff693f7 | 2022-01-10 15:08:50 +0100 | [diff] [blame] | 127 | - os: ubuntu-18.04 |
Daan De Meyer | f972602 | 2019-10-10 22:16:49 +0200 | [diff] [blame] | 128 | compiler: gcc |
| 129 | version: "8" |
| 130 | |
Stefan | ff693f7 | 2022-01-10 15:08:50 +0100 | [diff] [blame] | 131 | - os: ubuntu-latest |
Daan De Meyer | f972602 | 2019-10-10 22:16:49 +0200 | [diff] [blame] | 132 | compiler: gcc |
| 133 | version: "9" |
| 134 | |
Stefan | ff693f7 | 2022-01-10 15:08:50 +0100 | [diff] [blame] | 135 | - os: ubuntu-latest |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 136 | compiler: gcc |
| 137 | version: "10" |
| 138 | |
Stefan | ff693f7 | 2022-01-10 15:08:50 +0100 | [diff] [blame] | 139 | - os: ubuntu-latest |
| 140 | compiler: gcc |
| 141 | version: "11" |
| 142 | |
| 143 | - os: ubuntu-18.04 |
Daan De Meyer | f972602 | 2019-10-10 22:16:49 +0200 | [diff] [blame] | 144 | compiler: clang |
| 145 | version: "3.5" |
| 146 | |
Stefan | ff693f7 | 2022-01-10 15:08:50 +0100 | [diff] [blame] | 147 | - os: ubuntu-18.04 |
Daan De Meyer | f972602 | 2019-10-10 22:16:49 +0200 | [diff] [blame] | 148 | compiler: clang |
| 149 | version: "3.6" |
| 150 | |
Stefan | ff693f7 | 2022-01-10 15:08:50 +0100 | [diff] [blame] | 151 | - os: ubuntu-18.04 |
Daan De Meyer | f972602 | 2019-10-10 22:16:49 +0200 | [diff] [blame] | 152 | compiler: clang |
| 153 | version: "3.7" |
| 154 | |
Stefan | ff693f7 | 2022-01-10 15:08:50 +0100 | [diff] [blame] | 155 | - os: ubuntu-18.04 |
Daan De Meyer | f972602 | 2019-10-10 22:16:49 +0200 | [diff] [blame] | 156 | compiler: clang |
| 157 | version: "3.8" |
| 158 | |
Stefan | ff693f7 | 2022-01-10 15:08:50 +0100 | [diff] [blame] | 159 | - os: ubuntu-18.04 |
Daan De Meyer | f972602 | 2019-10-10 22:16:49 +0200 | [diff] [blame] | 160 | compiler: clang |
| 161 | version: "3.9" |
| 162 | |
Stefan | ff693f7 | 2022-01-10 15:08:50 +0100 | [diff] [blame] | 163 | - os: ubuntu-18.04 |
Daan De Meyer | f972602 | 2019-10-10 22:16:49 +0200 | [diff] [blame] | 164 | compiler: clang |
| 165 | version: "4.0" |
| 166 | |
Stefan | ff693f7 | 2022-01-10 15:08:50 +0100 | [diff] [blame] | 167 | - os: ubuntu-18.04 |
Daan De Meyer | f972602 | 2019-10-10 22:16:49 +0200 | [diff] [blame] | 168 | compiler: clang |
| 169 | version: "5.0" |
| 170 | |
Stefan | ff693f7 | 2022-01-10 15:08:50 +0100 | [diff] [blame] | 171 | - os: ubuntu-18.04 |
Daan De Meyer | f972602 | 2019-10-10 22:16:49 +0200 | [diff] [blame] | 172 | compiler: clang |
| 173 | version: "6.0" |
| 174 | |
Stefan | ff693f7 | 2022-01-10 15:08:50 +0100 | [diff] [blame] | 175 | - os: ubuntu-18.04 |
Daan De Meyer | f972602 | 2019-10-10 22:16:49 +0200 | [diff] [blame] | 176 | compiler: clang |
| 177 | version: "7" |
| 178 | |
Stefan | ff693f7 | 2022-01-10 15:08:50 +0100 | [diff] [blame] | 179 | - os: ubuntu-18.04 |
Daan De Meyer | f972602 | 2019-10-10 22:16:49 +0200 | [diff] [blame] | 180 | compiler: clang |
| 181 | version: "8" |
| 182 | |
Stefan | ff693f7 | 2022-01-10 15:08:50 +0100 | [diff] [blame] | 183 | - os: ubuntu-latest |
| 184 | compiler: clang |
| 185 | version: "9" |
Daan De Meyer | f972602 | 2019-10-10 22:16:49 +0200 | [diff] [blame] | 186 | |
Stefan | ff693f7 | 2022-01-10 15:08:50 +0100 | [diff] [blame] | 187 | - os: ubuntu-latest |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 188 | compiler: clang |
| 189 | version: "10" |
| 190 | |
Stefan | ff693f7 | 2022-01-10 15:08:50 +0100 | [diff] [blame] | 191 | - os: ubuntu-latest |
Daan De Meyer | f972602 | 2019-10-10 22:16:49 +0200 | [diff] [blame] | 192 | compiler: clang |
Stefan | ff693f7 | 2022-01-10 15:08:50 +0100 | [diff] [blame] | 193 | version: "11" |
Daan De Meyer | f972602 | 2019-10-10 22:16:49 +0200 | [diff] [blame] | 194 | |
Stefan | ff693f7 | 2022-01-10 15:08:50 +0100 | [diff] [blame] | 195 | - os: ubuntu-latest |
Daan De Meyer | f972602 | 2019-10-10 22:16:49 +0200 | [diff] [blame] | 196 | compiler: clang |
Stefan | ff693f7 | 2022-01-10 15:08:50 +0100 | [diff] [blame] | 197 | version: "12" |
Daan De Meyer | f972602 | 2019-10-10 22:16:49 +0200 | [diff] [blame] | 198 | |
Stefan | ff693f7 | 2022-01-10 15:08:50 +0100 | [diff] [blame] | 199 | - os: ubuntu-latest |
| 200 | compiler: clang |
| 201 | version: "13" |
Stefan | 9d04270 | 2022-10-08 00:55:25 +0200 | [diff] [blame] | 202 | |
| 203 | - os: ubuntu-latest |
| 204 | compiler: clang |
| 205 | version: "14" |
| 206 | |
| 207 | - os: ubuntu-latest |
| 208 | compiler: clang |
| 209 | version: "15" |
| 210 | |
Stefan | ff693f7 | 2022-01-10 15:08:50 +0100 | [diff] [blame] | 211 | - os: macOS-10.15 |
Clare Macrae | 8df12f2 | 2020-02-19 14:27:14 +0000 | [diff] [blame] | 212 | compiler: xcode |
Stefan | ff693f7 | 2022-01-10 15:08:50 +0100 | [diff] [blame] | 213 | version: "10.3" |
| 214 | |
| 215 | - os: macOS-latest |
| 216 | compiler: xcode |
| 217 | version: "11.7" |
| 218 | |
| 219 | - os: macOS-latest |
| 220 | compiler: xcode |
| 221 | version: "12.5.1" |
| 222 | |
| 223 | - os: macOS-latest |
| 224 | compiler: xcode |
| 225 | version: "13.2.1" |
Stefan | 9d04270 | 2022-10-08 00:55:25 +0200 | [diff] [blame] | 226 | |
| 227 | - os: macos-12 |
| 228 | compiler: xcode |
| 229 | version: "14.0.1" |
Stefan | ff693f7 | 2022-01-10 15:08:50 +0100 | [diff] [blame] | 230 | |
| 231 | - os: macOS-latest |
| 232 | compiler: gcc |
| 233 | version: "11" |
Daan De Meyer | f972602 | 2019-10-10 22:16:49 +0200 | [diff] [blame] | 234 | |
| 235 | steps: |
Stefan | ff693f7 | 2022-01-10 15:08:50 +0100 | [diff] [blame] | 236 | - uses: actions/checkout@v2 |
Daan De Meyer | f972602 | 2019-10-10 22:16:49 +0200 | [diff] [blame] | 237 | |
| 238 | - name: Install (Linux) |
| 239 | if: runner.os == 'Linux' |
| 240 | run: | |
Daan De Meyer | 2e3d265 | 2019-10-12 16:10:46 +0200 | [diff] [blame] | 241 | # Required for libc6-dbg:i386 and g++-multilib packages which are |
Daan De Meyer | f972602 | 2019-10-10 22:16:49 +0200 | [diff] [blame] | 242 | # needed for x86 builds. |
| 243 | sudo dpkg --add-architecture i386 |
| 244 | |
| 245 | # clang-3.7 and earlier are not available in Bionic anymore so we get |
| 246 | # them from the Xenial repositories instead. |
| 247 | sudo add-apt-repository "deb http://dk.archive.ubuntu.com/ubuntu/ xenial main" |
| 248 | sudo add-apt-repository "deb http://dk.archive.ubuntu.com/ubuntu/ xenial universe" |
Daan De Meyer | 2e3d265 | 2019-10-12 16:10:46 +0200 | [diff] [blame] | 249 | |
Stefan | ff693f7 | 2022-01-10 15:08:50 +0100 | [diff] [blame] | 250 | # clang->=13 is not currently available by default |
| 251 | if [ "${{ matrix.compiler }}" = "clang" -a ${{ matrix.version }} -ge 13 ]; then |
| 252 | wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - |
| 253 | sudo add-apt-repository "deb https://apt.llvm.org/focal/ llvm-toolchain-focal-${{ matrix.version }} main" |
Daan De Meyer | f972602 | 2019-10-10 22:16:49 +0200 | [diff] [blame] | 254 | fi |
| 255 | |
| 256 | sudo apt-get update |
| 257 | |
| 258 | # libc6-dbg:i386 is required for running valgrind on x86. |
| 259 | sudo apt-get install -y ninja-build valgrind libc6-dbg:i386 |
| 260 | |
| 261 | if [ "${{ matrix.compiler }}" = "gcc" ]; then |
| 262 | sudo apt-get install -y g++-${{ matrix.version }} g++-${{ matrix.version }}-multilib |
Daan De Meyer | f972602 | 2019-10-10 22:16:49 +0200 | [diff] [blame] | 263 | else |
| 264 | sudo apt-get install -y clang-${{ matrix.version }} g++-multilib |
Daan De Meyer | f972602 | 2019-10-10 22:16:49 +0200 | [diff] [blame] | 265 | fi |
| 266 | |
| 267 | - name: Install (macOS) |
| 268 | if: runner.os == 'macOS' |
| 269 | run: | |
Stefan | ff693f7 | 2022-01-10 15:08:50 +0100 | [diff] [blame] | 270 | brew install ninja |
| 271 | if [ "${{ matrix.compiler }}" = "xcode" ]; then |
| 272 | sudo xcode-select -switch /Applications/Xcode_${{ matrix.version }}.app |
| 273 | fi |
Daan De Meyer | f972602 | 2019-10-10 22:16:49 +0200 | [diff] [blame] | 274 | |
| 275 | - name: Configure x64 |
Stefan | ff693f7 | 2022-01-10 15:08:50 +0100 | [diff] [blame] | 276 | uses: ilammy/msvc-dev-cmd@v1 |
Daan De Meyer | f972602 | 2019-10-10 22:16:49 +0200 | [diff] [blame] | 277 | |
Stefan | ff693f7 | 2022-01-10 15:08:50 +0100 | [diff] [blame] | 278 | - name: Build & Test x64 |
| 279 | run: python3 .github/workflows/build_and_test.py ${{ runner.os }} x64 ${{ matrix.compiler }} ${{ matrix.version }} |
Daan De Meyer | f972602 | 2019-10-10 22:16:49 +0200 | [diff] [blame] | 280 | |
| 281 | - name: Configure x86 |
Stefan | ff693f7 | 2022-01-10 15:08:50 +0100 | [diff] [blame] | 282 | uses: ilammy/msvc-dev-cmd@v1 |
| 283 | with: |
| 284 | arch: x86 |
Daan De Meyer | f972602 | 2019-10-10 22:16:49 +0200 | [diff] [blame] | 285 | |
Stefan | ff693f7 | 2022-01-10 15:08:50 +0100 | [diff] [blame] | 286 | # MacOS doesn't support x86 from Xcode 10 onwards. |
Daan De Meyer | f972602 | 2019-10-10 22:16:49 +0200 | [diff] [blame] | 287 | |
Stefan | ff693f7 | 2022-01-10 15:08:50 +0100 | [diff] [blame] | 288 | - name: Build & Test x86 |
| 289 | if: runner.os == 'Linux' || runner.os == 'Windows' && matrix.compiler != 'clang-cl' |
| 290 | run: python3 .github/workflows/build_and_test.py ${{ runner.os }} x86 ${{ matrix.compiler }} ${{ matrix.version }} |
Daan De Meyer | f972602 | 2019-10-10 22:16:49 +0200 | [diff] [blame] | 291 | |
Stefan | ff693f7 | 2022-01-10 15:08:50 +0100 | [diff] [blame] | 292 | ci-min-gw: |
Stefan | 76cc137 | 2022-01-18 00:17:46 +0100 | [diff] [blame] | 293 | if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository |
Stefan | ff693f7 | 2022-01-10 15:08:50 +0100 | [diff] [blame] | 294 | runs-on: windows-latest |
Daan De Meyer | f972602 | 2019-10-10 22:16:49 +0200 | [diff] [blame] | 295 | |
Stefan | ff693f7 | 2022-01-10 15:08:50 +0100 | [diff] [blame] | 296 | strategy: |
| 297 | fail-fast: false |
| 298 | matrix: |
| 299 | configuration: ["Debug", "Release"] |
Daan De Meyer | f972602 | 2019-10-10 22:16:49 +0200 | [diff] [blame] | 300 | |
Stefan | ff693f7 | 2022-01-10 15:08:50 +0100 | [diff] [blame] | 301 | steps: |
| 302 | - uses: actions/checkout@v2 |
| 303 | |
| 304 | - name: Set up MinGW |
| 305 | uses: egor-tensin/setup-mingw@v2 |
| 306 | |
| 307 | - name: Generate |
| 308 | run: cmake -B build -S . -G "MinGW Makefiles" -D CMAKE_BUILD_TYPE=${{ matrix.configuration }} |
| 309 | |
| 310 | - name: Build |
| 311 | run: cmake --build build |
| 312 | |
| 313 | - name: Test |
| 314 | run: ctest --test-dir build --no-tests=error |
| 315 | |
| 316 | ci-msvs: |
Stefan | 76cc137 | 2022-01-18 00:17:46 +0100 | [diff] [blame] | 317 | if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository |
Stefan | f54a4e4 | 2022-02-14 18:22:45 +0100 | [diff] [blame] | 318 | runs-on: ${{ matrix.toolset == 'v143' && 'windows-2022' || 'windows-2019' }} |
Stefan | ff693f7 | 2022-01-10 15:08:50 +0100 | [diff] [blame] | 319 | |
| 320 | strategy: |
| 321 | fail-fast: false |
| 322 | matrix: |
| 323 | toolset: ["v140", "v141", "v142", "v143", "ClangCl"] |
| 324 | architecture: ["Win32", "x64"] |
| 325 | configuration: ["Debug", "Release"] |
| 326 | |
| 327 | steps: |
| 328 | - uses: actions/checkout@v2 |
Stefan | db758e0 | 2022-06-06 03:42:02 +0200 | [diff] [blame] | 329 | |
Stefan | ff693f7 | 2022-01-10 15:08:50 +0100 | [diff] [blame] | 330 | - name: Generate |
| 331 | run: cmake -B build -S . -G "${{ matrix.toolset == 'v143' && 'Visual Studio 17 2022' || 'Visual Studio 16 2019' }}" \ |
| 332 | -A ${{ matrix.architecture }} -T ${{ matrix.toolset }} |
| 333 | |
| 334 | - name: Build |
| 335 | run: cmake --build build --config ${{ matrix.configuration }} |
| 336 | |
| 337 | - name: Test |
| 338 | run: ctest -C ${{ matrix.configuration }} --test-dir build --no-tests=error |
Ilya Isaev | 28d9d38 | 2022-12-17 01:32:33 +0100 | [diff] [blame] | 339 | |
| 340 | ci-icpc: |
| 341 | if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository |
| 342 | runs-on: ubuntu-latest |
| 343 | |
| 344 | strategy: |
| 345 | fail-fast: false |
| 346 | matrix: |
| 347 | configuration: ["Debug", "Release"] |
| 348 | |
| 349 | steps: |
| 350 | - uses: actions/checkout@v2 |
| 351 | |
| 352 | - name: Install |
| 353 | run: | |
| 354 | wget -O - https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | sudo apt-key add - |
| 355 | sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main" |
| 356 | sudo apt-get update |
| 357 | sudo apt-get install -y intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic ninja-build |
| 358 | |
| 359 | - name: Generate |
| 360 | run: | |
| 361 | . /opt/intel/oneapi/setvars.sh |
| 362 | cmake -B build -S . -G Ninja -D CMAKE_CXX_COMPILER=icc -D CMAKE_C_COMPILER=icc -D CMAKE_CXX_COMPILER=icpc -D CMAKE_BUILD_TYPE=${{ matrix.configuration }} -D CMAKE_CXX_FLAGS="-w2 -Wcheck -Werror -diag-disable=10441 -D DOCTEST_CONFIG_NO_CONTRADICTING_INLINE" |
| 363 | |
| 364 | - name: Build |
| 365 | run: | |
| 366 | . /opt/intel/oneapi/setvars.sh |
| 367 | cmake --build build --config ${{ matrix.configuration }} |
| 368 | - name: Test |
| 369 | run: | |
| 370 | . /opt/intel/oneapi/setvars.sh |
| 371 | ctest -C ${{ matrix.configuration }} --test-dir build --no-tests=error |