-
Notifications
You must be signed in to change notification settings - Fork 20
120 lines (108 loc) · 3.84 KB
/
Copy pathbuild_linux.yml
File metadata and controls
120 lines (108 loc) · 3.84 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
name: 🐧 Build Linux
on:
push:
branches:
- master
workflow_dispatch:
permissions:
contents: write
jobs:
build_linux:
name: 🔨 Build (${{ matrix.arch }})
strategy:
fail-fast: false
matrix:
include:
- arch: x86-64
runner: ubuntu-22.04
so_bundle: so_bundle_x86-64
bundle_name: fasttrack_x86_64.run
- arch: aarch64
runner: ubuntu-22.04-arm
so_bundle: so_bundle_aarch64
bundle_name: fasttrack_aarch64.run
runs-on: ${{ matrix.runner }}
steps:
- name: 📥 Check out repository
uses: actions/checkout@v4
- name: 📦 Install system dependencies
run: |
sudo apt-get update
sudo apt-get install mesa-common-dev libgl1-mesa-dev libssl-dev libunwind-dev
sudo apt-get install libxcb-*
sudo apt-get install libxkb-*
sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libnss3
sudo apt-get install libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev
sudo apt-get install libopencv-dev libfuse2 patchelf makeself
sudo apt-get install qt6-base-dev libqt6svg6-dev qt6-tools-dev qt6-tools-dev-tools qt6-l10n-tools
- name: 🔨 Build FastTrack
run: |
./run.sh ci
- name: 📦 Create executable bundle
run: |
cd build
wget -O so_bundle https://github.com/bgallois/SoBundle/releases/download/continuous/${{ matrix.so_bundle }}
chmod +x so_bundle
QT_ROOT=/usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/qt6
./so_bundle --exec ./bin/fasttrack --qt "$QT_ROOT" --bundle
mv ./bin/fasttrack.run ./bin/${{ matrix.bundle_name }}
- name: ⬆️ Upload artifact
uses: actions/upload-artifact@v4
with:
name: FastTrack-linux-${{ matrix.arch }}
path: ./build/bin/${{ matrix.bundle_name }}
test_bundle:
name: 🧪 Test bundle (${{ matrix.arch }})
strategy:
fail-fast: false
matrix:
include:
- arch: x86-64
runner: ubuntu-22.04
bundle_name: fasttrack_x86_64.run
- arch: aarch64
runner: ubuntu-22.04-arm
bundle_name: fasttrack_aarch64.run
runs-on: ${{ matrix.runner }}
needs: build_linux
steps:
- name: ⬇️ Download artifact
uses: actions/download-artifact@v4
with:
name: FastTrack-linux-${{ matrix.arch }}
path: FastTrack
- name: 🧪 Run CLI smoke test
run: |
cd FastTrack
chmod +x ${{ matrix.bundle_name }}
./${{ matrix.bundle_name }} -- --cli --help
- name: 🖥️ Run GUI smoke test
run: |
cd FastTrack
chmod +x ${{ matrix.bundle_name }}
set +e
timeout 10s ./${{ matrix.bundle_name }} -- -platform offscreen
status=$?
set -e
if [ "$status" -eq 124 ]; then
echo "GUI startup test passed: app stayed alive for 10 seconds."
exit 0
fi
echo "GUI startup test failed: app exited with status $status."
exit "$status"
- name: 🚀 Publish continuous release asset
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
run: |
cd FastTrack
asset_name=${{ matrix.bundle_name }}
if ! gh release view continuous -R "$GH_REPO" >/dev/null 2>&1; then
gh release create continuous \
-R "$GH_REPO" \
--title "continuous" \
--notes "Rolling build artifacts." \
--prerelease \
--latest=false || gh release view continuous -R "$GH_REPO" >/dev/null
fi
gh release upload continuous "$asset_name" --clobber -R "$GH_REPO"