-
Notifications
You must be signed in to change notification settings - Fork 5
345 lines (334 loc) · 11.8 KB
/
docker.yml
File metadata and controls
345 lines (334 loc) · 11.8 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
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
---
name: docker
# Run on push and once a week to keep the images from bit-rotting and to
# identify issues while no commits are being pushed.
on:
push:
branches: [master]
pull_request:
branches: [master]
schedule:
- cron: "52 2 * * 0"
# Cancel old PR builds when pushing new commits.
concurrency:
group: docker-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
REGISTRY: ghcr.io
NAMESPACE: toktok
jobs:
build:
strategy:
fail-fast: false
matrix:
image:
- alpine-s390x
- bazel
- compcert
- doxygen
- flutter-web
- frama-c
- freebsd
- haskell
- pkgsrc
include:
- image: bazel
has_base: true
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
if: ${{ github.event_name == 'push' }}
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout code
uses: actions/checkout@v6
- name: Build base image
if: ${{ matrix.has_base }}
run: |
cd ${{ matrix.image }} && ./build.sh
- name: Build and push
uses: docker/build-push-action@v6
with:
context: "${{ matrix.image }}"
build-contexts: ${{ matrix.has_base && format('base=oci-layout://{0}/layers:base', matrix.image) || '' }}
tags: ${{ env.REGISTRY }}/${{ env.NAMESPACE }}/${{ matrix.image }}:latest
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.NAMESPACE }}/${{ matrix.image }}:latest
cache-to: type=inline
push: ${{ github.event_name == 'push' }}
buildfarm:
strategy:
matrix:
image: [server, worker]
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
if: ${{ github.event_name == 'push' }}
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: "{{defaultContext}}:buildfarm"
file: ${{ matrix.image }}.Dockerfile
tags: ${{ env.REGISTRY }}/${{ env.NAMESPACE }}/buildfarm-${{ matrix.image }}:latest
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.NAMESPACE }}/buildfarm-${{ matrix.image }}:latest
cache-to: type=inline
push: ${{ github.event_name == 'push' }}
qtox-host-qt:
strategy:
fail-fast: true
matrix:
version: [6.2.4, 6.8.1]
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
if: ${{ github.event_name == 'push' }}
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout code
uses: actions/checkout@v6
- name: Build and push
uses: docker/build-push-action@v6
with:
context: "{{defaultContext}}:qtox"
file: "docker/Dockerfile.host-qt"
build-args: |
QT_VERSION=${{ matrix.version }}
tags: ${{ env.REGISTRY }}/${{ env.NAMESPACE }}/qtox:host-qt_${{ matrix.version }}
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.NAMESPACE }}/qtox:host-qt_${{ matrix.version }}
cache-to: type=inline
push: ${{ github.event_name == 'push' }}
qtox:
# Only windows needs it, but this dependency doesn't harm much, as host-qt
# doesn't get changed often.
needs: [qtox-host-qt]
strategy:
fail-fast: false
matrix:
image:
- alpine
- alpine-appimage
- alpine-static
- debian
- fedora
- flatpak-builder
- ubuntu-lts
- wasm-builder
- windows-builder.i686
- windows-builder.x86_64
include:
- image: windows-builder.i686
file: windows-builder
args: |
ARCH=i686
WINEARCH=win32
- image: windows-builder.x86_64
file: windows-builder
args: |
ARCH=x86_64
WINEARCH=win64
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
if: ${{ github.event_name == 'push' }}
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout code
uses: actions/checkout@v6
- name: Build and push
uses: docker/build-push-action@v6
with:
context: "{{defaultContext}}:qtox"
file: "docker/Dockerfile.${{ matrix.file || matrix.image }}"
build-args: ${{ matrix.args }}
tags: ${{ env.REGISTRY }}/${{ env.NAMESPACE }}/qtox:${{ matrix.image }}
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.NAMESPACE }}/qtox:${{ matrix.image }}
cache-to: type=inline
push: ${{ github.event_name == 'push' }}
qtox-android:
needs: [qtox-host-qt]
strategy:
fail-fast: true
matrix:
arch: [armeabi-v7a, arm64-v8a]
build_type: [debug, release]
version: [6.2.4, 6.8.1]
include:
- version: 6.2.4
ndk_version: 21.3.6528147
android_api: 24
- version: 6.8.1
ndk_version: 26.1.10909125
android_api: 26
- arch: armeabi-v7a
abi_args: |
ANDROID_ABI=armeabi-v7a
ANDROID_FFMPEG_ABI=armv7a
ANDROID_OPENSSL_ABI=arm
ANDROID_OPENSSL_ASM=-no-asm
ANDROID_TRIPLE=armv7a-linux-androideabi
ANDROID_VPX_ABI=armv7-android-gcc
- arch: arm64-v8a
abi_args: |
ANDROID_ABI=arm64-v8a
ANDROID_FFMPEG_ABI=arm64
ANDROID_OPENSSL_ABI=arm64
ANDROID_OPENSSL_ASM=
ANDROID_TRIPLE=aarch64-linux-android
ANDROID_VPX_ABI=arm64-android-gcc
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
if: ${{ github.event_name == 'push' }}
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout code
uses: actions/checkout@v6
- name: Build and push
uses: docker/build-push-action@v6
with:
context: "{{defaultContext}}:qtox"
file: "docker/Dockerfile.android-builder"
build-args: |
${{ matrix.abi_args }}
ANDROID_API=${{ matrix.android_api }}
NDK_VERSION=${{ matrix.ndk_version }}
QT_BUILD_TYPE=${{ matrix.build_type }}
QT_VERSION=${{ matrix.version }}
tags: ${{ env.REGISTRY }}/${{ env.NAMESPACE }}/qtox:android-builder.${{ matrix.arch }}.${{ matrix.build_type }}_${{ matrix.version }}
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.NAMESPACE }}/qtox:android-builder.${{ matrix.arch }}.${{ matrix.build_type }}_${{ matrix.version }}
cache-to: type=inline
push: ${{ github.event_name == 'push' }}
update-nightly-tag:
runs-on: ubuntu-24.04
permissions:
contents: write
steps:
- uses: actions/checkout@v6
- name: Move nightly tag to head for nightly release
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
run: git tag -f nightly && git push origin nightly -f
qt-static-macos:
needs: [update-nightly-tag]
strategy:
matrix:
arch: [arm64, x86_64]
macos: ["10.15", "12.0"]
runs-on: ${{ matrix.arch == 'arm64' && 'macos-14' || 'macos-15-intel' }}
permissions:
contents: write
steps:
- uses: actions/checkout@v6
- name: Cache Qt
id: cache-qt
uses: actions/cache@v5
with:
path: |
/Users/runner/work/deps/qt
key: ${{ github.job }}-${{ matrix.arch }}-${{ matrix.macos }}-qt
- name: Homebrew dependencies to build dependencies
run: brew bundle --file qtox/deps/Brewfile-static
- name: Build Qt
if: steps.cache-qt.outputs.cache-hit != 'true'
run: qtox/deps/local_install_deps.sh
--arch ${{ matrix.arch }}
--macos-version ${{ matrix.macos }}
--dep-file qtox/deps/qt.depfile
--dep-prefix /Users/runner/work/deps
- name: Build tarball
run: tar -zcf qt-static-macos-${{ matrix.arch }}-${{ matrix.macos }}.tar.gz -C /Users/runner/work/deps qt
- name: Upload artifact
uses: actions/upload-artifact@v6
with:
name: qt-static-macos-${{ matrix.arch }}-${{ matrix.macos }}-qt
path: qt-static-macos-${{ matrix.arch }}-${{ matrix.macos }}.tar.gz
- name: Upload tarball to nightly release
if: github.event_name == 'push'
uses: ncipollo/release-action@v1
with:
allowUpdates: true
tag: nightly
omitBodyDuringUpdate: true
omitNameDuringUpdate: true
prerelease: true
replacesArtifacts: true
artifacts: qt-static-macos-${{ matrix.arch }}-${{ matrix.macos }}.tar.gz
qt-static-ios:
needs: [update-nightly-tag, qt-static-macos]
strategy:
matrix:
arch: [ios-arm64, iphonesimulator-arm64, iphonesimulator-x86_64]
include:
- arch: ios-arm64
host_arch: arm64
- arch: iphonesimulator-arm64
host_arch: arm64
- arch: iphonesimulator-x86_64
host_arch: x86_64
runs-on: ${{ matrix.host_arch == 'arm64' && 'macos-14' || 'macos-15-intel' }}
permissions:
contents: write
steps:
- uses: actions/checkout@v6
- name: Download host Qt
uses: actions/download-artifact@v7
with:
name: qt-static-macos-${{ matrix.host_arch }}-12.0-qt
- name: Extract host Qt
run: |
mkdir -p /Users/runner/work/host-qt
tar -zxf qt-static-macos-${{ matrix.host_arch }}-12.0.tar.gz --strip-components=1 -C /Users/runner/work/host-qt
- name: Cache Qt
id: cache-qt
uses: actions/cache@v5
with:
path: |
/Users/runner/work/deps/qt
key: ${{ github.job }}-${{ matrix.arch }}-qt
- name: Homebrew dependencies to build dependencies
run: brew bundle --file qtox/deps/Brewfile-static
- name: Build Qt
if: steps.cache-qt.outputs.cache-hit != 'true'
run: qtox/deps/local_install_deps.sh
--arch ${{ matrix.arch }}
--dep-file qtox/deps/qt.depfile
--dep-prefix /Users/runner/work/deps
--host-path /Users/runner/work/host-qt
- name: Build tarball
run: tar -zcf qt-static-${{ matrix.arch }}.tar.gz -C /Users/runner/work/deps qt
- name: Upload tarball to nightly release
if: github.event_name == 'push'
uses: ncipollo/release-action@v1
with:
allowUpdates: true
tag: nightly
omitBodyDuringUpdate: true
omitNameDuringUpdate: true
prerelease: true
replacesArtifacts: true
artifacts: qt-static-${{ matrix.arch }}.tar.gz