Skip to content

Commit 44f359c

Browse files
committed
CI: add Qt6 tripack workflow (Linux/macOS/Windows) and package as Mmapper-Token-Beta
1 parent bf166d2 commit 44f359c

1 file changed

Lines changed: 116 additions & 0 deletions

File tree

.github/workflows/qt6-tripack.yml

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
name: Qt6 Tripack (Linux/macOS/Windows)
2+
3+
on:
4+
push:
5+
branches: [ feature/map-tokens-clean, master ]
6+
pull_request:
7+
branches: [ feature/map-tokens-clean, master ]
8+
workflow_dispatch:
9+
10+
jobs:
11+
linux:
12+
name: Linux (Ubuntu)
13+
runs-on: ubuntu-22.04
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: jurplel/install-qt-action@v4
17+
with:
18+
version: '6.8.*'
19+
host: 'linux'
20+
target: 'desktop'
21+
arch: 'linux_gcc_64'
22+
- name: Install deps
23+
run: |
24+
sudo apt-get update -qq
25+
sudo apt-get install -y ninja-build libgl1-mesa-dev libglu1-mesa-dev zlib1g-dev libssl-dev qtkeychain-qt6-dev
26+
- name: Configure
27+
run: cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release
28+
- name: Build
29+
run: cmake --build build --config Release --parallel
30+
- name: Package artifact (rename binary)
31+
run: |
32+
mkdir -p out/Linux
33+
if [ -f build/src/mmapper ]; then
34+
cp build/src/mmapper out/Linux/Mmapper-Token-Beta
35+
else
36+
cp build/mmapper out/Linux/Mmapper-Token-Beta || true
37+
fi
38+
tar -C out -czf Mmapper-Token-Beta-Linux.tar.gz Linux
39+
- name: Upload artifact
40+
uses: actions/upload-artifact@v4
41+
with:
42+
name: Mmapper-Token-Beta-Linux
43+
path: Mmapper-Token-Beta-Linux.tar.gz
44+
45+
macos:
46+
name: macOS (Intel)
47+
runs-on: macos-13
48+
steps:
49+
- uses: actions/checkout@v4
50+
- uses: jurplel/install-qt-action@v4
51+
with:
52+
version: '6.8.*'
53+
host: 'mac'
54+
target: 'desktop'
55+
arch: 'clang_64'
56+
- name: Ensure Ninja
57+
run: brew install ninja
58+
- name: Configure
59+
run: cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release
60+
- name: Build
61+
run: cmake --build build --config Release --parallel
62+
- name: Deploy .app with Qt frameworks
63+
run: |
64+
APP_PATH="build/src/mmapper.app"
65+
if [ ! -d "$APP_PATH" ]; then
66+
APP_PATH="$(/usr/bin/find build -name 'mmapper.app' -maxdepth 3 | head -n1)"
67+
fi
68+
echo "Using app: $APP_PATH"
69+
macdeployqt "$APP_PATH" -always-overwrite
70+
DEST="Mmapper-Token-Beta.app"
71+
rm -rf "$DEST"
72+
cp -R "$APP_PATH" "$DEST"
73+
/usr/bin/zip -r Mmapper-Token-Beta-macOS.zip "$DEST"
74+
- name: Upload artifact
75+
uses: actions/upload-artifact@v4
76+
with:
77+
name: Mmapper-Token-Beta-macOS
78+
path: Mmapper-Token-Beta-macOS.zip
79+
80+
windows:
81+
name: Windows (MSVC)
82+
runs-on: windows-2022
83+
steps:
84+
- uses: actions/checkout@v4
85+
- uses: ilammy/msvc-dev-cmd@v1
86+
- uses: jurplel/install-qt-action@v4
87+
with:
88+
version: '6.8.*'
89+
host: 'windows'
90+
target: 'desktop'
91+
arch: 'win64_msvc2019_64'
92+
- name: Install Ninja
93+
run: choco install ninja --no-progress
94+
- name: Configure
95+
shell: bash
96+
run: cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release
97+
- name: Build
98+
shell: bash
99+
run: cmake --build build --config Release --parallel
100+
- name: Deploy with windeployqt and package
101+
shell: bash
102+
run: |
103+
set -e
104+
EXE="$(/usr/bin/find build -name 'mmapper.exe' -maxdepth 4 | head -n1)"
105+
echo "Using exe: $EXE"
106+
OUT="Mmapper-Token-Beta"
107+
rm -rf "$OUT"
108+
mkdir -p "$OUT"
109+
cp "$EXE" "$OUT/Mmapper-Token-Beta.exe"
110+
windeployqt --release "$OUT/Mmapper-Token-Beta.exe"
111+
powershell -Command "Compress-Archive -Path '$OUT/*' -DestinationPath 'Mmapper-Token-Beta-Windows.zip' -Force"
112+
- name: Upload artifact
113+
uses: actions/upload-artifact@v4
114+
with:
115+
name: Mmapper-Token-Beta-Windows
116+
path: Mmapper-Token-Beta-Windows.zip

0 commit comments

Comments
 (0)