|
7 | 7 | MYSQL_USER: 'ragnarok' |
8 | 8 | MYSQL_PASSWORD: 'ragnarok' |
9 | 9 | MYSQL_ALLOW_EMPTY_PASSWORD: 'yes' |
10 | | - DEBIAN_COMMON_PACKAGES: python3 python3-pip |
| 10 | + DEBIAN_COMMON_PACKAGES: python3 python3-pip python3-venv cmake make git gcc g++ |
11 | 11 |
|
12 | 12 | jobs: |
13 | 13 | build: |
14 | 14 | runs-on: ubuntu-latest |
| 15 | + defaults: |
| 16 | + run: |
| 17 | + shell: bash |
| 18 | + strategy: |
| 19 | + matrix: |
| 20 | + CC: ["clang-21", "gcc-15"] |
| 21 | + include: |
| 22 | + - CXX: 'g++-15' |
| 23 | + CC: 'gcc-15' |
| 24 | + - CXX: 'clang++-21' |
| 25 | + CC: 'clang-21' |
15 | 26 |
|
16 | 27 | # github.head_ref will stop previous runs in the same PR (if in a PR) |
17 | 28 | # github.run_id is a fallback when outside a PR (e.g. every merge in master will run, and previous won't stop) |
18 | 29 | concurrency: |
19 | | - group: tools-${{ github.head_ref || github.run_id }} |
| 30 | + group: tools-linux-${{ github.head_ref || github.run_id }}_${{ matrix.CC }} |
20 | 31 | cancel-in-progress: true |
21 | 32 |
|
22 | 33 | container: |
23 | | - image: debian:unstable |
| 34 | + image: ubuntu:26.04 |
24 | 35 | steps: |
25 | 36 | - uses: actions/checkout@v6 |
26 | 37 | with: |
|
33 | 44 | - name: install packages |
34 | 45 | run: | |
35 | 46 | ./tools/ci/retry.sh apt-get update |
36 | | - ./tools/ci/retry.sh apt-get install -y -qq $INSTALL_PACKAGES $DEBIAN_COMMON_PACKAGES |
| 47 | + ./tools/ci/retry.sh apt-get install -y -qq $INSTALL_PACKAGES $DEBIAN_COMMON_PACKAGES ${{ matrix.CC }} ${{ matrix.CXX }} |
37 | 48 | pip3 install sqlfluff --break-system-packages |
38 | 49 |
|
| 50 | + - uses: actions/cache/restore@v6 # We're restoring first so if a cache already exists from previous CI run, it's used and step finishes quicker. |
| 51 | + name: restore conan cache |
| 52 | + id: cache-restore |
| 53 | + with: |
| 54 | + path: ~/.conan2 |
| 55 | + key: ${{ runner.os }}-${{ matrix.CC }}-${{ hashFiles('conanfile.py') }} |
| 56 | + |
| 57 | + - name: run cmake first run |
| 58 | + if: steps.cache-restore.outputs.cache-hit != 'true' |
| 59 | + run: | |
| 60 | + ./tools/ci/travis.sh prepareenv |
| 61 | + source .venv/bin/activate |
| 62 | + cmake -S . -B build -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=cmake_modules/conan_provider.cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=${{ matrix.CC }} -DCMAKE_CXX_COMPILER=${{ matrix.CXX }} |
| 63 | +
|
| 64 | + - uses: actions/cache/save@v6 |
| 65 | + if: steps.cache-restore.outputs.cache-hit != 'true' |
| 66 | + name: save conan cache |
| 67 | + id: cache_save |
| 68 | + with: |
| 69 | + path: ~/.conan2 |
| 70 | + key: ${{ runner.os }}-${{ matrix.CC }}-${{ hashFiles('conanfile.py') }} |
| 71 | + |
39 | 72 | - name: check sql syntax |
40 | 73 | run: | |
41 | 74 | ./tools/ci/retry.sh python3 tools/validate_sql-files.py |
|
0 commit comments