Skip to content

macOS CI: use setup-python + aqtinstall to bypass PEP 668 and brew ta… #6

macOS CI: use setup-python + aqtinstall to bypass PEP 668 and brew ta…

macOS CI: use setup-python + aqtinstall to bypass PEP 668 and brew ta… #6

Workflow file for this run

name: macOS Test Build
on:
push:
branches:
- issue-7133-macos-test
pull_request:
env:
QT_VERSION: "6.5.3" # adjust if QGC needs a different 6.x
jobs:
build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
# Use an isolated Python, not the Homebrew-managed one (avoids PEP 668)
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Show toolchain
run: |
which python3
python3 --version
which cmake || true
cmake --version || true
uname -a
- name: Cache Qt
uses: actions/cache@v4
with:
path: ~/Qt
key: qt-${{ runner.os }}-${{ env.QT_VERSION }}
- name: Install aqtinstall (Qt downloader)
run: |
python3 -m pip install --upgrade pip
python3 -m pip install aqtinstall
- name: Install Qt ${{ env.QT_VERSION }} (no Homebrew)
run: |
if [ ! -d "$HOME/Qt/${QT_VERSION}/macos" ]; then
python3 -m aqt install-qt mac desktop "${QT_VERSION}" -O "$HOME/Qt" \
--modules qtdeclarative,qtquickcontrols2,qtpositioning,qtserialport,qtmultimedia,qtsvg,qtlocation,qtshadertools
fi
ls -la "$HOME/Qt/${QT_VERSION}/macos"
- name: Ensure Ninja exists
run: |
ninja --version || brew install ninja
- name: Configure (CMake + Qt6)
env:
CMAKE_PREFIX_PATH: ${{ runner.home }}/Qt/${{ env.QT_VERSION }}/macos
run: |
mkdir -p build
cd build
cmake .. \
-G Ninja \
-DCMAKE_BUILD_TYPE=Release
- name: Build
run: |
cd build
ninja -v