-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (65 loc) · 1.93 KB
/
build-linux.yml
File metadata and controls
77 lines (65 loc) · 1.93 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
69
70
71
72
73
74
75
76
77
name: Linux Build
on:
push:
tags:
- '*'
workflow_dispatch:
jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Try Setup Qt 6.9 (aqt)
id: qt
continue-on-error: true
uses: jurplel/install-qt-action@v4
with:
version: '6.9.*'
arch: 'gcc_64'
modules: qtcharts
- name: Diagnose Qt availability
if: steps.qt.outcome == 'failure'
run: |
python3 -m pip install --upgrade pip aqtinstall==3.3.*
python3 -m aqt version
python3 -m aqt list-qt linux desktop --arch 6.9.1 || true
python3 -m aqt list-qt linux desktop --modules 6.9.1 gcc_64 || true
- name: Fallback install Qt from apt (qt6-base-dev, qt6-charts-dev)
if: steps.qt.outcome == 'failure'
run: |
sudo apt-get update
sudo apt-get install -y qt6-base-dev qt6-charts-dev
- name: Setup CMake
uses: jwlawson/actions-setup-cmake@v1.13
with:
cmake-version: '3.25.0'
- name: Set CMAKE_PREFIX_PATH
run: |
if [ -n "${QTDIR:-}" ]; then
echo "CMAKE_PREFIX_PATH=$QTDIR" >> "$GITHUB_ENV"
else
echo "CMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu/cmake" >> "$GITHUB_ENV"
fi
- name: Configure CMake
run: |
cmake -B build -S . -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH"
- name: Build
run: |
cmake --build build --parallel
- name: Verify executable
run: |
if [ -f "build/BasicSpanner" ]; then
echo "Executable created: build/BasicSpanner"
else
echo "Executable not found" && exit 1
fi
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: BasicSpanner-Linux-${{ github.sha }}
path: |
build/BasicSpanner
retention-days: 14