forked from mavlink/qgroundcontrol
-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (57 loc) · 1.74 KB
/
macos-test.yml
File metadata and controls
68 lines (57 loc) · 1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
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