Skip to content

Commit 58e49bf

Browse files
committed
Revert to an output rather than env for cmake path setup
1 parent 42d178a commit 58e49bf

4 files changed

Lines changed: 20 additions & 22 deletions

File tree

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

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,15 @@ inputs:
1111
description: 'Cache Qt toolchain artifacts'
1212
required: false
1313
default: ${{ runner.os == 'Windows' }}
14-
cmake-env:
15-
description: 'Add cmake environment variables'
16-
required: false
17-
default: true
14+
15+
outputs:
16+
path:
17+
description: 'Qt toolchain installation path'
18+
value: ${{ steps.resolve.outputs.toolchain-path }}
1819

1920
runs:
2021
using: "composite"
2122
steps:
22-
- name: Set destination path
23-
id: set-dest
24-
shell: bash
25-
run: echo "path=${GITHUB_WORKSPACE}/3rdparty" >> $GITHUB_OUTPUT
26-
2723
- name: Resolve artifact task
2824
id: resolve
2925
shell: bash
@@ -45,21 +41,22 @@ runs:
4541
# contents. Lucky for us, tar is a streamable format so this kinda works
4642
# even though the archive is truncated.
4743
curl -sSL -r0-4096 "https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/${TASKID}/artifacts/${NAME}" -o qt-toolchain-head.tar.xz
48-
echo "toolchain-path=$(xzcat qt-toolchain-head.tar.xz 2>/dev/null | tar t 2>/dev/null | head -1 | grep -o '^[^/]*')" >> $GITHUB_OUTPUT
44+
TARBALL_PATH=$((xzcat qt-toolchain-head.tar.xz | tar t | head -1 | grep -o '^[^/]*') 2>/dev/null || true)
45+
echo "toolchain-path=${GITHUB_WORKSPACE}/3rdparty/${TARBALL_PATH}" >> $GITHUB_OUTPUT
4946
5047
- name: Cache Qt toolchain
5148
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
5249
id: qt-toolchain-cache
5350
if: ${{ inputs.cache == 'true' }}
5451
with:
55-
path: ${{ steps.set-dest.outputs.path }}/${{ steps.resolve.outputs.toolchain-path }}
52+
path: ${{ steps.resolve.outputs.toolchain-path }}
5653
key: qt-toolchain-${{ steps.resolve.outputs.taskid }}
5754
enableCrossOsArchive: true
5855

5956
- name: Install Qt toolchain
6057
if: ${{ inputs.cache != 'true' || steps.qt-toolchain-cache.outputs.cache-hit != 'true' }}
6158
id: qt-toolchain-install
62-
working-directory: ${{ steps.set-dest.outputs.path }}
59+
working-directory: ${GITHUB_WORKSPACE}/3rdparty/
6360
shell: bash
6461
env:
6562
QT6_TOOLCHAIN_URL: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/${{ steps.resolve.outputs.taskid }}/artifacts/${{ steps.resolve.outputs.filename }}
@@ -68,18 +65,10 @@ runs:
6865
curl -sSL "${QT6_TOOLCHAIN_URL}" -o ${FILENAME}
6966
tar -xf ${FILENAME}
7067
71-
- name: Get CMake prefix path
72-
if: ${{ inputs.cmake-env == 'true' }}
73-
id: get-cmake-path
74-
working-directory: ${{ steps.set-dest.outputs.path }}/${{ steps.resolve.outputs.toolchain-path }}
75-
shell: bash
76-
run: |
77-
echo "CMAKE_PREFIX_PATH=$(pwd)/lib/cmake" >> $GITHUB_ENV
78-
7968
- name: Save Qt toolchain
8069
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
8170
if: ${{ inputs.cache == 'true' && github.event_name == 'push' && steps.qt-toolchain-cache.outputs.cache-hit != 'true'}}
8271
with:
83-
path: ${{ steps.set-dest.outputs.path }}/${{ steps.resolve.outputs.toolchain-path }}
72+
path: ${{ steps.resolve.outputs.toolchain-path }}
8473
key: qt-toolchain-${{ steps.resolve.outputs.taskid }}
8574
enableCrossOsArchive: true

.github/workflows/linux_tests.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ jobs:
6464

6565
- name: Compile test client
6666
shell: bash
67+
env:
68+
CMAKE_PREFIX_PATH: ${{ steps.setup-qt.outputs.path }}/lib/cmake
6769
run: |
6870
mkdir -p build-${{ runner.os }}
6971
cmake -S $(pwd) -B build-${{ runner.os }} -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo \

.github/workflows/macos_tests.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,16 +75,18 @@ jobs:
7575
- name: Setup Qt for macOS
7676
id: setup-qt
7777
uses: ./.github/actions/qt-setup-taskcluster
78+
with:
79+
toolchain-alias: qt-macos-6.10
7880

7981
- name: Setup Qt host tools
8082
uses: ./.github/actions/qt-setup-taskcluster
8183
with:
8284
toolchain-alias: qt-tools-6.10
83-
cmake-env: false
8485

8586
- name: Compile test client
8687
env:
8788
SDKROOT: ${{ steps.set-sdkroot.outputs.SDKROOT }}
89+
CMAKE_PREFIX_PATH: ${{ steps.setup-qt.outputs.path }}/lib/cmake
8890
run: |
8991
mkdir -p build/cmake
9092
cmake -S $(pwd) -B build/cmake -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo \

.github/workflows/test_unit.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ jobs:
4343

4444
- name: Building tests
4545
shell: bash
46+
env:
47+
CMAKE_PREFIX_PATH: ${{ steps.setup-qt.outputs.path }}/lib/cmake
4648
run: |
4749
mkdir -p build
4850
cmake -S $(pwd) -B build -GNinja
@@ -86,6 +88,8 @@ jobs:
8688
uses: ./.github/actions/qt-setup-taskcluster
8789

8890
- name: Building tests
91+
env:
92+
CMAKE_PREFIX_PATH: ${{ steps.setup-qt.outputs.path }}/lib/cmake
8993
run: |
9094
export SDKROOT=$(xcrun --sdk macosx --show-sdk-path)
9195
mkdir -p build
@@ -151,6 +155,7 @@ jobs:
151155
env:
152156
CC: ${{ steps.set-compiler.outputs.CC }}
153157
CXX: ${{ steps.set-compiler.outputs.CXX }}
158+
CMAKE_PREFIX_PATH: ${{ steps.setup-qt-win.outputs.path }}/lib/cmake
154159
run: |
155160
mkdir ./build-win
156161

0 commit comments

Comments
 (0)