From 96f436b65e1f1bd63a7012af6ce692e42a04e340 Mon Sep 17 00:00:00 2001 From: tooomm Date: Sun, 15 Mar 2026 17:47:48 +0100 Subject: [PATCH] CI: Resolve to latest Qt version in range for Windows as well (#6700) * CI: Resolve to latest Qt version in range for Windows as well * install aqt * Check dedicated win version --- .ci/resolve_latest_aqt_qt_version.sh | 11 ++++++++++- .github/workflows/desktop-build.yml | 9 +++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.ci/resolve_latest_aqt_qt_version.sh b/.ci/resolve_latest_aqt_qt_version.sh index 154c15321..066140ac9 100755 --- a/.ci/resolve_latest_aqt_qt_version.sh +++ b/.ci/resolve_latest_aqt_qt_version.sh @@ -27,7 +27,16 @@ if ! hash aqt; then fi # Resolve latest patch -if ! qt_resolved=$(aqt list-qt mac desktop --spec "$qt_spec" --latest-version); then +if [[ $RUNNER_OS == macOS ]]; then + if ! qt_resolved=$(aqt list-qt mac desktop --spec "$qt_spec" --latest-version); then + exit 1 + fi +elif [[ $RUNNER_OS == Windows ]]; then + if ! qt_resolved=$(aqt list-qt windows desktop --spec "$qt_spec" --latest-version); then + exit 1 + fi +else + echo "aqt command for $RUNNER_OS not defined." exit 1 fi diff --git a/.github/workflows/desktop-build.yml b/.github/workflows/desktop-build.yml index 021bf9e81..e176ae527 100644 --- a/.github/workflows/desktop-build.yml +++ b/.github/workflows/desktop-build.yml @@ -361,15 +361,12 @@ jobs: restore-keys: ccache-${{matrix.runner}}-${{matrix.soc}}-${{matrix.type}}- - name: Install aqtinstall - if: matrix.os == 'macOS' run: pipx install aqtinstall - # Checking if there's a newer, uncached version of Qt available to install via aqtinstall + # Resolve given wildcard versions (e.g. Qt 6.6.*) to latest version via aqtinstall to avoid stale caches on new releases - name: Resolve latest Qt patch version - if: matrix.os == 'macOS' id: resolve_qt_version shell: bash - # Ouputs the version of Qt to install via aqtinstall run: .ci/resolve_latest_aqt_qt_version.sh "${{matrix.qt_version}}" - name: Restore thin Qt ${{ steps.resolve_qt_version.outputs.version }} libraries (${{ matrix.soc }} macOS) @@ -386,10 +383,10 @@ jobs: if: matrix.os == 'macOS' && steps.restore_qt.outputs.cache-hit != 'true' uses: jurplel/install-qt-action@v4 with: - cache: false version: ${{ steps.resolve_qt_version.outputs.version }} arch: ${{matrix.qt_arch}} modules: ${{matrix.qt_modules}} + cache: false dir: ${{github.workspace}} - name: Thin Qt libraries (${{ matrix.soc }} macOS) @@ -407,7 +404,7 @@ jobs: if: matrix.os == 'Windows' uses: jurplel/install-qt-action@v4 with: - version: ${{matrix.qt_version}} + version: ${{ steps.resolve_qt_version.outputs.version }} arch: ${{matrix.qt_arch}} modules: ${{matrix.qt_modules}} cache: true