|
| 1 | +name: Tests |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - main |
| 7 | + - ci/** |
| 8 | + pull_request: |
| 9 | + branches: |
| 10 | + - main |
| 11 | + |
| 12 | +jobs: |
| 13 | + test-on-msvc: |
| 14 | + strategy: |
| 15 | + fail-fast: false |
| 16 | + |
| 17 | + matrix: |
| 18 | + os: [windows-2019, windows-2022] |
| 19 | + cppstd: ['17', '20', '23'] |
| 20 | + build-type: [Debug, Release] |
| 21 | + exclude: |
| 22 | + - os: windows-2019 |
| 23 | + cppstd: '23' |
| 24 | + include: |
| 25 | + - os: windows-2019 |
| 26 | + msvc-version: 142 |
| 27 | + - os: windows-2022 |
| 28 | + msvc-version: 143 |
| 29 | + - build-type: Debug |
| 30 | + cmake-preset: conan-debug |
| 31 | + - build-type: Release |
| 32 | + cmake-preset: conan-release |
| 33 | + |
| 34 | + name: MSVC ${{ matrix.msvc-version }} - C++${{ matrix.cppstd }} - ${{ matrix.build-type }} |
| 35 | + |
| 36 | + runs-on: ${{ matrix.os }} |
| 37 | + |
| 38 | + steps: |
| 39 | + - uses: actions/checkout@v4 |
| 40 | + |
| 41 | + - name: Install Conan |
| 42 | + uses: turtlebrowser/get-conan@main |
| 43 | + |
| 44 | + - name: Setup Conan |
| 45 | + run: | |
| 46 | + conan --version |
| 47 | + conan profile detect |
| 48 | +
|
| 49 | + - name: Install CMake |
| 50 | + uses: lukka/get-cmake@latest |
| 51 | + |
| 52 | + - name: Install dependencies |
| 53 | + run: > |
| 54 | + conan install . |
| 55 | + -s compiler.cppstd=${{ matrix.cppstd }} |
| 56 | + -s build_type=${{ matrix.build-type }} |
| 57 | + -b missing |
| 58 | +
|
| 59 | + - name: CMake Configure |
| 60 | + run: | |
| 61 | + cmake --list-presets |
| 62 | + cmake --preset conan-default |
| 63 | +
|
| 64 | + - name: Build |
| 65 | + run: | |
| 66 | + cmake --build --list-presets |
| 67 | + cmake --build --preset ${{ matrix.cmake-preset }} |
| 68 | +
|
| 69 | + - name: Test |
| 70 | + run: | |
| 71 | + ctest --list-presets |
| 72 | + ctest --preset ${{ matrix.cmake-preset }} |
| 73 | +
|
| 74 | + test-on-gcc: |
| 75 | + strategy: |
| 76 | + fail-fast: false |
| 77 | + |
| 78 | + matrix: |
| 79 | + os: [ubuntu-22.04, ubuntu-24.04] |
| 80 | + cppstd: ['17', '20', '23'] |
| 81 | + build-type: [Debug, Release] |
| 82 | + include: |
| 83 | + - os: ubuntu-22.04 |
| 84 | + gcc-version: 11 |
| 85 | + - os: ubuntu-24.04 |
| 86 | + gcc-version: 13 |
| 87 | + - build-type: Debug |
| 88 | + cmake-preset: conan-debug |
| 89 | + - build-type: Release |
| 90 | + cmake-preset: conan-release |
| 91 | + |
| 92 | + name: GCC ${{ matrix.gcc-version }} - C++${{ matrix.cppstd }} - ${{ matrix.build-type }} |
| 93 | + |
| 94 | + runs-on: ${{ matrix.os }} |
| 95 | + |
| 96 | + steps: |
| 97 | + - uses: actions/checkout@v4 |
| 98 | + |
| 99 | + - name: Check GCC Version |
| 100 | + shell: bash |
| 101 | + run: | |
| 102 | + gcc -dumpversion |
| 103 | + (( $(gcc -dumpversion | cut -d. -f1) == ${{ matrix.gcc-version }} )) |
| 104 | +
|
| 105 | + - name: Install Conan |
| 106 | + uses: turtlebrowser/get-conan@main |
| 107 | + |
| 108 | + - name: Setup Conan |
| 109 | + run: | |
| 110 | + conan --version |
| 111 | + conan profile detect |
| 112 | +
|
| 113 | + - name: Install CMake |
| 114 | + uses: lukka/get-cmake@latest |
| 115 | + |
| 116 | + - name: Install dependencies |
| 117 | + run: > |
| 118 | + conan install . |
| 119 | + -s compiler.cppstd=${{ matrix.cppstd }} |
| 120 | + -s build_type=${{ matrix.build-type }} |
| 121 | + -b missing |
| 122 | +
|
| 123 | + - name: CMake Configure |
| 124 | + run: | |
| 125 | + cmake --list-presets |
| 126 | + cmake --preset ${{ matrix.cmake-preset }} |
| 127 | +
|
| 128 | + - name: Build |
| 129 | + run: | |
| 130 | + cmake --build --list-presets |
| 131 | + cmake --build --preset ${{ matrix.cmake-preset }} |
| 132 | +
|
| 133 | + - name: Test |
| 134 | + run: | |
| 135 | + ctest --list-presets |
| 136 | + ctest --preset ${{ matrix.cmake-preset }} |
| 137 | +
|
| 138 | + test-on-old-gcc: |
| 139 | + strategy: |
| 140 | + fail-fast: false |
| 141 | + |
| 142 | + matrix: |
| 143 | + os: [ubuntu-22.04] |
| 144 | + gcc-version: [9] |
| 145 | + cppstd: ['17', '20'] |
| 146 | + build-type: [Debug, Release] |
| 147 | + include: |
| 148 | + - build-type: Debug |
| 149 | + cmake-preset: conan-debug |
| 150 | + - build-type: Release |
| 151 | + cmake-preset: conan-release |
| 152 | + |
| 153 | + name: GCC ${{ matrix.gcc-version }} - C++${{ matrix.cppstd }} - ${{ matrix.build-type }} |
| 154 | + |
| 155 | + runs-on: ${{ matrix.os }} |
| 156 | + |
| 157 | + steps: |
| 158 | + - uses: actions/checkout@v4 |
| 159 | + |
| 160 | + - name: Setup GCC |
| 161 | + uses: egor-tensin/setup-gcc@v1 |
| 162 | + with: |
| 163 | + version: ${{ matrix.gcc-version }} |
| 164 | + |
| 165 | + - name: Check GCC Version |
| 166 | + shell: bash |
| 167 | + run: | |
| 168 | + gcc -dumpversion |
| 169 | + (( $(gcc -dumpversion | cut -d. -f1) == ${{ matrix.gcc-version }} )) |
| 170 | +
|
| 171 | + - name: Install Conan |
| 172 | + uses: turtlebrowser/get-conan@main |
| 173 | + |
| 174 | + - name: Setup Conan |
| 175 | + run: | |
| 176 | + conan --version |
| 177 | + conan profile detect |
| 178 | +
|
| 179 | + - name: Install CMake |
| 180 | + uses: lukka/get-cmake@latest |
| 181 | + |
| 182 | + - name: Install dependencies |
| 183 | + run: > |
| 184 | + conan install . |
| 185 | + -s compiler.cppstd=${{ matrix.cppstd }} |
| 186 | + -s build_type=${{ matrix.build-type }} |
| 187 | + -b missing |
| 188 | +
|
| 189 | + - name: CMake Configure |
| 190 | + run: | |
| 191 | + cmake --list-presets |
| 192 | + cmake --preset ${{ matrix.cmake-preset }} |
| 193 | +
|
| 194 | + - name: Build |
| 195 | + run: | |
| 196 | + cmake --build --list-presets |
| 197 | + cmake --build --preset ${{ matrix.cmake-preset }} |
| 198 | +
|
| 199 | + - name: Test |
| 200 | + run: | |
| 201 | + ctest --list-presets |
| 202 | + ctest --preset ${{ matrix.cmake-preset }} |
0 commit comments