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