Run tests on Qt 5.12.12 & Qt 6.2.4 in CI (#4703)

This commit is contained in:
pajlada 2023-06-24 23:48:29 +02:00 committed by GitHub
parent 44cc1e256e
commit 2f2c187f18
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -18,8 +18,13 @@ jobs:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:
matrix: matrix:
os: [ubuntu-20.04] include:
qt-version: [5.15.2] - os: "ubuntu-20.04"
qt-version: "5.15.2"
- os: "ubuntu-20.04"
qt-version: "5.12.12"
- os: "ubuntu-22.04"
qt-version: "6.2.4"
fail-fast: false fail-fast: false
steps: steps:
@ -27,20 +32,28 @@ jobs:
with: with:
submodules: recursive submodules: recursive
- name: Cache Qt - name: Set BUILD_WITH_QT6
id: cache-qt if: startsWith(matrix.qt-version, '6.')
uses: actions/cache@v3 run: |
with: echo "C2_BUILD_WITH_QT6=ON" >> "$GITHUB_ENV"
path: "${{ github.workspace }}/qt/" shell: bash
key: ${{ runner.os }}-QtCache-${{ matrix.qt-version }}
- name: Install Qt - name: Install Qt5
if: startsWith(matrix.qt-version, '5.')
uses: jurplel/install-qt-action@v3.2.1 uses: jurplel/install-qt-action@v3.2.1
with: with:
cache: true cache: true
cache-key-prefix: ${{ runner.os }}-QtCache-${{ matrix.qt-version }} cache-key-prefix: ${{ runner.os }}-QtCache-${{ matrix.qt-version }}-v2
version: ${{ matrix.qt-version }}
- name: Install Qt6
if: startsWith(matrix.qt-version, '6.')
uses: jurplel/install-qt-action@v3.2.1
with:
cache: true
cache-key-prefix: ${{ runner.os }}-QtCache-${{ matrix.qt-version }}-v2
modules: qt5compat qtimageformats
version: ${{ matrix.qt-version }} version: ${{ matrix.qt-version }}
dir: "${{ github.workspace }}/qt/"
# LINUX # LINUX
- name: Install dependencies (Ubuntu) - name: Install dependencies (Ubuntu)
@ -74,7 +87,11 @@ jobs:
- name: Build (Ubuntu) - name: Build (Ubuntu)
if: startsWith(matrix.os, 'ubuntu') if: startsWith(matrix.os, 'ubuntu')
run: | run: |
cmake -DBUILD_TESTS=On -DBUILD_APP=OFF .. cmake \
-DBUILD_TESTS=On \
-DBUILD_APP=OFF \
-DBUILD_WITH_QT6="$C2_BUILD_WITH_QT6" \
..
cmake --build . cmake --build .
working-directory: build-test working-directory: build-test
shell: bash shell: bash