Skip to content

Commit 7f31c1c

Browse files
committed
Try using static Qt builds for unit tests
1 parent 1bfe1b2 commit 7f31c1c

3 files changed

Lines changed: 11 additions & 12 deletions

File tree

.github/actions/qt-setup-taskcluster/action.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ inputs:
44
toolchain-alias:
55
description: 'Taskcluster toolchain alias'
66
required: false
7-
default: ${{ runner.os == 'Windows' && 'qt-windows-x86_64-6.10' || 'qt-macos-6.10' }}
7+
default: |
8+
${{ case(runner.os == 'Windows', 'qt-windows-x86_64-6.10',
9+
runner.os == 'macOS', 'qt-macos-6.10',
10+
'qt-linux') }}
811
cache:
912
description: 'Cache Qt toolchain artifacts'
1013
required: false
@@ -14,11 +17,6 @@ inputs:
1417
required: false
1518
default: true
1619

17-
outputs:
18-
cmake-prefix-path:
19-
description: 'Path to Qt CMake files for CMAKE_PREFIX_PATH'
20-
value: ${{ steps.get-cmake-path.outputs.cmake-prefix-path }}
21-
2220
runs:
2321
using: "composite"
2422
steps:
@@ -76,7 +74,8 @@ runs:
7674
id: get-cmake-path
7775
working-directory: ${{ steps.set-dest.outputs.path }}/${{ steps.resolve.outputs.toolchain-path }}
7876
shell: bash
79-
run: echo "cmake-prefix-path=$(pwd)/lib/cmake" >> $GITHUB_OUTPUT
77+
run: |
78+
echo "CMAKE_PREFIX_PATH=$(pwd)/lib/cmake" >> $GITHUB_ENV
8079
8180
- name: Save Qt toolchain
8281
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4

.github/workflows/macos_tests.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ jobs:
8585
- name: Compile test client
8686
env:
8787
SDKROOT: ${{ steps.set-sdkroot.outputs.SDKROOT }}
88-
CMAKE_PREFIX_PATH: ${{ steps.setup-qt.outputs.cmake-prefix-path }}
8988
run: |
9089
mkdir -p build/cmake
9190
cmake -S $(pwd) -B build/cmake -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo \

.github/workflows/test_unit.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@ jobs:
2929
- name: Install dependences
3030
run: |
3131
sudo apt-get update
32-
sudo apt-get install -y $(./scripts/linux/getdeps.py -a linux/debian/control)
32+
sudo apt-get install -y $(./scripts/linux/getdeps.py -a linux/debian/control | grep -vE '^(qml6|libqt6|qt6)')
33+
34+
- name: Setup Qt for Linux
35+
id: setup-qt
36+
uses: ./.github/actions/qt-setup-taskcluster
3337

3438
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
3539
with:
@@ -82,8 +86,6 @@ jobs:
8286
uses: ./.github/actions/qt-setup-taskcluster
8387

8488
- name: Building tests
85-
env:
86-
CMAKE_PREFIX_PATH: ${{ steps.setup-qt.outputs.cmake-prefix-path }}
8789
run: |
8890
export SDKROOT=$(xcrun --sdk macosx --show-sdk-path)
8991
mkdir -p build
@@ -149,7 +151,6 @@ jobs:
149151
env:
150152
CC: ${{ steps.set-compiler.outputs.CC }}
151153
CXX: ${{ steps.set-compiler.outputs.CXX }}
152-
CMAKE_PREFIX_PATH: ${{ steps.setup-qt-win.outputs.cmake-prefix-path }}
153154
run: |
154155
mkdir ./build-win
155156

0 commit comments

Comments
 (0)