-
Notifications
You must be signed in to change notification settings - Fork 1
233 lines (191 loc) · 5.68 KB
/
Copy pathbuild.yml
File metadata and controls
233 lines (191 loc) · 5.68 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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
name: Flet Build
on:
push:
workflow_dispatch:
pull_request:
env:
UV_PYTHON: 3.12
PYTHONUTF8: 1
CMAKE_VERSION: 3.22.1
# https://docs.flet.dev/publish/#versioning
BUILD_NUMBER: 1
BUILD_VERSION: 1.0.0
FLET_CLI_NO_RICH_OUTPUT: 1
jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup uv
uses: astral-sh/setup-uv@v6
- name: Install Linux dependencies
shell: bash
run: |
sudo apt update --allow-releaseinfo-change
sudo apt-get install -y --no-install-recommends \
clang \
ninja-build \
libgtk-3-dev \
libasound2-dev \
libmpv-dev \
mpv \
libgstreamer1.0-dev \
libgstreamer-plugins-base1.0-dev \
libgstreamer-plugins-bad1.0-dev \
gstreamer1.0-plugins-base \
gstreamer1.0-plugins-good \
gstreamer1.0-plugins-bad \
gstreamer1.0-plugins-ugly \
gstreamer1.0-libav \
gstreamer1.0-tools \
gstreamer1.0-x \
gstreamer1.0-alsa \
gstreamer1.0-gl \
gstreamer1.0-gtk3 \
gstreamer1.0-qt5 \
gstreamer1.0-pulseaudio
sudo apt-get clean
- name: Flet Build Linux
run: |
uv venv
uv run flet build linux --yes --verbose --build-number=$BUILD_NUMBER --build-version=$BUILD_VERSION
- name: Upload Linux Artifact
uses: actions/upload-artifact@v5.0.0
with:
name: linux-build-artifact
path: build/linux
if-no-files-found: warn
overwrite: false
build-macos:
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup uv
uses: astral-sh/setup-uv@v6
- name: Flet Build macOS
run: |
uv venv
uv run flet build macos --yes --verbose --build-number=$BUILD_NUMBER --build-version=$BUILD_VERSION
- name: Upload macOS Artifact
uses: actions/upload-artifact@v5.0.0
with:
name: macos-build-artifact
path: build/macos
if-no-files-found: warn
overwrite: false
build-windows:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup uv
uses: astral-sh/setup-uv@v6
- name: Flet Build Windows
shell: bash
run: |
uv venv
uv run flet build windows --yes --verbose --no-rich-output --build-number=$BUILD_NUMBER --build-version=$BUILD_VERSION
- name: Upload Windows Artifact
uses: actions/upload-artifact@v5.0.0
with:
name: windows-build-artifact
path: build/windows
if-no-files-found: warn
overwrite: false
build-aab:
strategy:
fail-fast: false
matrix:
os: [ ubuntu, macos, windows ]
runs-on: ${{ matrix.os }}-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: ${{ env.CMAKE_VERSION }}
- name: Setup uv
uses: astral-sh/setup-uv@v6
- name: Flet Build AAB
shell: bash
run: |
uv venv
uv run flet build aab --yes --verbose --build-number=$BUILD_NUMBER --build-version=$BUILD_VERSION
- name: Upload AAB Artifact
uses: actions/upload-artifact@v5.0.0
with:
name: aab-build-${{ matrix.os }}-artifact
path: build/aab
if-no-files-found: warn
overwrite: false
build-apk:
strategy:
fail-fast: false
matrix:
os: [ ubuntu, macos, windows ]
runs-on: ${{ matrix.os }}-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: ${{ env.CMAKE_VERSION }}
- name: Setup uv
uses: astral-sh/setup-uv@v6
- name: Flet Build APK
shell: bash
run: |
uv venv
uv run flet build apk --yes --verbose --build-number=$BUILD_NUMBER --build-version=$BUILD_VERSION
- name: Upload APK Artifact
uses: actions/upload-artifact@v5.0.0
with:
name: apk-build-${{ matrix.os }}-artifact
path: build/apk
if-no-files-found: warn
overwrite: false
build-ipa:
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup uv
uses: astral-sh/setup-uv@v6
- name: Flet Build IPA
run: |
uv venv
uv run flet build ipa --yes --verbose --build-number=$BUILD_NUMBER --build-version=$BUILD_VERSION
- name: Upload IPA Artifact
uses: actions/upload-artifact@v5.0.0
with:
name: ipa-build-artifact
path: build/ipa
if-no-files-found: warn
overwrite: false
build-web:
strategy:
fail-fast: false
matrix:
os: [ ubuntu, macos, windows ]
runs-on: ${{ matrix.os }}-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup uv
uses: astral-sh/setup-uv@v6
- name: Flet Build Web
shell: bash
run: |
uv venv
uv run flet build web --yes --verbose
- name: Upload Web Artifact
uses: actions/upload-artifact@v5.0.0
with:
name: web-build-${{ matrix.os }}-artifact
path: build/web
if-no-files-found: warn
overwrite: false