2323
2424 - name : Toolchain info
2525 run : |
26+ set -eux
2627 uname -a
2728 which cmake || true
2829 cmake --version || true
@@ -38,33 +39,37 @@ jobs:
3839
3940 - name : Install aqtinstall
4041 run : |
42+ set -eux
4143 python3 -m pip install --upgrade pip
4244 python3 -m pip install aqtinstall
4345
4446 - name : Determine Qt arch (prefer clang_64) and list modules
4547 id : qarch
4648 run : |
4749 set -eux
48- ARCHO="$(python3 -m aqt list-qt mac desktop --arch "${QT_VERSION}" | tr -s ' ' '\n' | sed 's/\r$//')"
49- echo "Available Qt archs for ${QT_VERSION}:"
50- echo "${ARCHO}"
51- if echo "${ARCHO}" | grep -qx "clang_64"; then
52- Q_ARCH="clang_64"
50+ # Query available architectures for the requested Qt version
51+ if python3 -m aqt list-qt mac desktop --arch "${QT_VERSION}" > arch.txt 2>/dev/null; then
52+ cat arch.txt
53+ if grep -qx "clang_64" arch.txt; then
54+ Q_ARCH="clang_64"
55+ else
56+ Q_ARCH="$(head -n1 arch.txt)"
57+ fi
5358 else
54- # Fallback: first listed arch
55- Q_ARCH="$(echo "${ARCHO}" | head -n1) "
59+ # Fallback to clang_64 if listing fails
60+ Q_ARCH="clang_64 "
5661 fi
5762 echo "Using Qt arch: ${Q_ARCH}"
5863 echo "Q_ARCH=${Q_ARCH}" >> "$GITHUB_OUTPUT"
59- # Show modules for visibility (don't fail job if none )
64+ # List available modules for visibility (non-fatal )
6065 python3 -m aqt list-qt mac desktop --modules "${QT_VERSION}" "${Q_ARCH}" || true
6166
6267 - name : Install Qt (aqt, no Homebrew)
6368 env :
6469 Q_ARCH : ${{ steps.qarch.outputs.Q_ARCH }}
6570 run : |
6671 set -eux
67- QT_DIR="$HOME/Qt/${QT_VERSION}/${Q_ARCH}"
72+ QT_DIR="$HOME/Qt/${QT_VERSION}/macos" # aqt lays mac desktop Qt out under 'macos'
6873 if [ ! -d "$QT_DIR" ]; then
6974 WANT="qtdeclarative qtquickcontrols2 qtpositioning qtserialport qtmultimedia qtsvg qtlocation qtshadertools qtimageformats qt5compat"
7075 AVAIL="$(python3 -m aqt list-qt mac desktop --modules "${QT_VERSION}" "${Q_ARCH}" | tr -s ' ' '\n' | sed 's/\r$//' || true)"
@@ -83,14 +88,17 @@ jobs:
8388 fi
8489 fi
8590 ls -la "$QT_DIR"
91+ ls -la "$QT_DIR/bin" || true
92+ "$QT_DIR/bin/qmake" -v || true
8693
8794 - name : Ensure Ninja (no Homebrew)
8895 run : |
96+ set -eux
8997 ninja --version || python3 -m pip install ninja
9098
9199 - name : Configure (CMake + Qt6)
92100 env :
93- CMAKE_PREFIX_PATH : ${{ runner.home }}/Qt/${{ env.QT_VERSION }}/${{ steps.qarch.outputs.Q_ARCH }}
101+ CMAKE_PREFIX_PATH : ${{ runner.home }}/Qt/${{ env.QT_VERSION }}/macos
94102 run : |
95103 set -eux
96104 mkdir -p build
0 commit comments