Repository navigation
150 lines (127 loc) · 3.86 KB
/
Copy pathlinux-release.yml
File metadata and controls
150 lines (127 loc) · 3.86 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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
name: Linux Build and Release
on:
push:
branches:
- main
- m5stack-dev
tags:
- "v*"
- "m5stack-v*"
pull_request:
workflow_dispatch:
permissions:
contents: write
env:
BUILD_TYPE: MinSizeRel
QT_VERSION: "6.9.0"
jobs:
linux-x64:
name: Linux x64
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Qt 6.9
uses: jurplel/install-qt-action@v4
with:
version: ${{ env.QT_VERSION }}
host: linux
target: desktop
arch: linux_gcc_64
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
build-essential cmake ninja-build git \
libgnutls28-dev libidn2-dev nettle-dev \
libcurl4-openssl-dev libssl-dev \
libudev-dev libusb-1.0-0-dev \
liburing-dev \
libgl-dev libegl-dev \
libdbus-1-dev \
libfuse2 \
util-linux
- name: Build AppImage
run: |
chmod +x create-appimage.sh
./create-appimage.sh --arch=x86_64 --qt-root="$QT_ROOT_DIR"
- name: Collect artifacts
run: |
mkdir -p dist
if [ "$GITHUB_REF_TYPE" = "tag" ]; then
version="${GITHUB_REF_NAME}"
else
version="$(git describe --tags --dirty --always)"
fi
version="${version#v}"
APPIMAGE=$(find . -maxdepth 1 -name "*x86_64.AppImage" ! -type l | head -1)
if [ -z "$APPIMAGE" ]; then
echo "ERROR: No AppImage produced"
find . -name "*.AppImage" -maxdepth 1
exit 1
fi
cp "$APPIMAGE" "dist/M5-Imager-${version}-linux-x64.AppImage"
ls -lh dist/
- name: Upload workflow artifact
uses: actions/upload-artifact@v4
with:
name: m5stack-imager-linux-x64
path: dist/*
if-no-files-found: error
linux-arm64:
name: Linux arm64
runs-on: ubuntu-24.04-arm
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Qt 6.9
uses: jurplel/install-qt-action@v4
with:
version: ${{ env.QT_VERSION }}
host: linux_arm64
target: desktop
arch: linux_gcc_arm64
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
build-essential cmake ninja-build git \
libgnutls28-dev libidn2-dev nettle-dev \
libcurl4-openssl-dev libssl-dev \
libudev-dev libusb-1.0-0-dev \
liburing-dev \
libgl-dev libegl-dev \
libdbus-1-dev \
libfuse2 \
util-linux
- name: Build AppImage
run: |
chmod +x create-appimage.sh
./create-appimage.sh --arch=aarch64 --qt-root="$QT_ROOT_DIR"
- name: Collect artifacts
run: |
mkdir -p dist
if [ "$GITHUB_REF_TYPE" = "tag" ]; then
version="${GITHUB_REF_NAME}"
else
version="$(git describe --tags --dirty --always)"
fi
version="${version#v}"
APPIMAGE=$(find . -maxdepth 1 -name "*aarch64.AppImage" ! -type l | head -1)
if [ -z "$APPIMAGE" ]; then
echo "ERROR: No AppImage produced"
find . -name "*.AppImage" -maxdepth 1
exit 1
fi
cp "$APPIMAGE" "dist/M5-Imager-${version}-linux-arm64.AppImage"
ls -lh dist/
- name: Upload workflow artifact
uses: actions/upload-artifact@v4
with:
name: m5stack-imager-linux-arm64
path: dist/*
if-no-files-found: error