-
Notifications
You must be signed in to change notification settings - Fork 7
569 lines (546 loc) · 23.9 KB
/
build-test-deploy.yaml
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
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
name: Build, test, and deploy
on:
# Run this workflow every day at 3:00 UTC to update caches.
schedule: [cron: '0 3 * * *']
pull_request:
branches: ["master"]
push:
branches: ["master"]
tags: ["v*"]
# Cancel old PR builds when pushing new commits.
concurrency:
group: build-test-deploy-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
################################################################################################
# Preparation jobs
################################################################################################
update-nightly-tag:
name: Update nightly release tag
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- 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
################################################################################################
# Static analysis and other checks
################################################################################################
clang-tidy:
name: Clang-Tidy
if: github.event_name == 'pull_request' || github.event_name == 'schedule'
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Cache compiler output
uses: actions/cache@v4
with:
path: ".cache/ccache"
key: ${{ github.job }}-ccache
- name: Install docker-compose
run: sudo apt-get install -y docker-compose
- name: Run build
run: docker-compose run --rm fedora .ci-scripts/build-qtox-linux.sh --build-type Release --full --tidy
translation-check:
name: Check for translatable strings
if: github.event_name == 'pull_request'
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install deps
run: sudo apt-get update && sudo apt-get install qt6-l10n-tools
- name: Test for modified translatable strings
run: PATH="/usr/lib/qt6/bin:$PATH"
./tools/update-translation-files.sh ALL &&
git diff --exit-code
################################################################################################
# Build and test jobs (PR)
################################################################################################
build-alpine:
name: Alpine
if: github.event_name == 'pull_request' || github.event_name == 'schedule'
runs-on: ubuntu-22.04
strategy:
matrix:
features: [full]
build_type: [Debug]
steps:
- uses: actions/checkout@v4
- name: Cache compiler output
uses: actions/cache@v4
with:
path: ".cache/ccache"
key: ${{ github.job }}-ccache
- name: Install docker-compose
run: sudo apt-get install -y docker-compose
- name: Run build
run: docker-compose run --rm alpine .ci-scripts/build-qtox-linux.sh --build-type ${{ matrix.build_type }} --${{ matrix.features }}
build-alpine-static:
name: Alpine (static)
if: github.event_name == 'pull_request' || github.event_name == 'schedule'
runs-on: ubuntu-22.04
strategy:
matrix:
build_type: [Release]
steps:
- uses: actions/checkout@v4
- name: Cache compiler output
uses: actions/cache@v4
with:
path: ".cache/ccache"
key: ${{ github.job }}-ccache
- name: Install docker-compose
run: sudo apt-get install -y docker-compose
- name: Run build
run: docker-compose run --rm alpine-static .ci-scripts/build-qtox-linux-static.sh --build-type ${{ matrix.build_type }}
build-debian:
name: Debian
if: github.event_name == 'pull_request' || github.event_name == 'schedule'
runs-on: ubuntu-22.04
strategy:
matrix:
features: [minimal]
build_type: [Debug]
steps:
- uses: actions/checkout@v4
- name: Cache compiler output
uses: actions/cache@v4
with:
path: ".cache/ccache"
key: ${{ github.job }}-ccache
- name: Install docker-compose
run: sudo apt-get install -y docker-compose
- name: Run build
run: docker-compose run --rm debian .ci-scripts/build-qtox-linux.sh --build-type ${{ matrix.build_type }} --${{ matrix.features }}
build-fedora:
name: Fedora with ASAN
if: github.event_name == 'pull_request' || github.event_name == 'schedule'
runs-on: ubuntu-22.04
strategy:
matrix:
features: [full]
build_type: [Debug]
steps:
- uses: actions/checkout@v4
- name: Cache compiler output
uses: actions/cache@v4
with:
path: ".cache/ccache"
key: ${{ github.job }}-ccache
- name: Install docker-compose
run: sudo apt-get install -y docker-compose
- name: Run build
run: docker-compose run --rm fedora .ci-scripts/build-qtox-linux.sh --build-type ${{ matrix.build_type }} --${{ matrix.features }} --sanitize
build-ubuntu:
name: Ubuntu LTS
if: github.event_name == 'pull_request' || github.event_name == 'schedule'
runs-on: ubuntu-22.04
strategy:
matrix:
features: [full]
build_type: [Release]
steps:
- uses: actions/checkout@v4
- name: Cache compiler output
uses: actions/cache@v4
with:
path: ".cache/ccache"
key: ${{ github.job }}-ccache
- name: Install docker-compose
run: sudo apt-get install -y docker-compose
- name: Run build
run: docker-compose run --rm ubuntu_lts .ci-scripts/build-qtox-linux.sh --build-type ${{ matrix.build_type }} --${{ matrix.features }}
- name: Code coverage
run: |
# https://github.com/actions/runner/issues/491
if [ "${{ matrix.build_type }}" == "Release" ] && [ "${{ matrix.features }}" == "full" ]; then
docker-compose run --rm ubuntu_lts .ci-scripts/lcov.sh
# Upload report to codecov.io
bash <(curl -s https://codecov.io/bash) -f coverage.info || echo "Codecov did not collect coverage reports"
fi
################################################################################################
# Build, test, and deploy jobs (PR and push)
################################################################################################
build-android:
name: Android
runs-on: ubuntu-22.04
needs: [update-nightly-tag]
permissions:
contents: write
strategy:
matrix:
arch: [armeabi-v7a, arm64-v8a]
build_type: [Debug, Release]
version: [6.2.4, 6.8.1]
exclude:
- arch: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'packaging') && 'armeabi-v7a' }}
- build_type: ${{ (github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'packaging') || contains(github.ref, 'refs/tags/v')) && 'Debug' }}
- version: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'packaging') && '6.8.1' }}
steps:
- name: Compute values for remaining steps
id: computed
run: |
ARTIFACT_TYPE="$(echo '${{ matrix.build_type }}' | tr '[:upper:]' '[:lower:]')"
echo "artifact_type=$ARTIFACT_TYPE" >>$GITHUB_OUTPUT
if [ "${{ matrix.version }}" == "6.2.4" ]; then
SUFFIX="-android7"
echo "built_apk=_build/android-build/build/outputs/apk/debug/android-build-debug.apk" >>$GITHUB_OUTPUT
else
SUFFIX=""
echo "built_apk=_build/android-build/build/outputs/apk/$ARTIFACT_TYPE/android-build-$ARTIFACT_TYPE-signed.apk" >>$GITHUB_OUTPUT
fi
echo "suffix=$SUFFIX" >>$GITHUB_OUTPUT
echo "nightly_apk=qTox-nightly-${{ matrix.arch }}-$ARTIFACT_TYPE$SUFFIX.apk" >>$GITHUB_OUTPUT
- uses: actions/checkout@v4
- name: Cache compiler output
uses: actions/cache@v4
with:
path: ".cache/ccache"
key: ${{ github.job }}-${{ matrix.arch }}-${{ matrix.build_type }}-${{ matrix.version }}-ccache
- name: Install docker-compose
run: sudo apt-get install -y docker-compose
- name: Run build
run: docker-compose run --rm "android_builder.${{ matrix.arch }}.${{ steps.computed.outputs.artifact_type }}_${{ matrix.version }}" ./android/cross-compile/build.sh --arch "${{ matrix.arch }}" --build-type "${{ matrix.build_type }}"
- name: Upload Android apk
uses: actions/upload-artifact@v4
with:
name: qTox-${{ github.sha }}-${{ matrix.arch }}-${{ steps.computed.outputs.artifact_type }}${{ steps.computed.outputs.suffix }}.apk
path: ${{ steps.computed.outputs.built_apk }}
- name: Get tag name for Android release file name
if: contains(github.ref, 'refs/tags/v')
id: get_version
run: |
VERSION="$(echo $GITHUB_REF | cut -d / -f 3)"
echo "release_apk=qTox-$VERSION-${{ matrix.arch }}-${{ steps.computed.outputs.artifact_type }}${{ steps.computed.outputs.suffix }}.apk" >>$GITHUB_OUTPUT
- name: Rename Android APK for release upload
if: contains(github.ref, 'refs/tags/v')
run: |
cp "${{ steps.computed.outputs.built_apk }}" "${{ steps.get_version.outputs.release_apk }}"
sha256sum "${{ steps.get_version.outputs.release_apk }}" > "${{ steps.get_version.outputs.release_apk }}.sha256"
- name: Upload to versioned release
if: contains(github.ref, 'refs/tags/v')
uses: ncipollo/release-action@v1
with:
allowUpdates: true
draft: true
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "${{ steps.get_version.outputs.release_apk }},${{ steps.get_version.outputs.release_apk }}.sha256"
- name: Rename Android APK for nightly upload
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
run: |
cp "${{ steps.computed.outputs.built_apk }}" "${{ steps.computed.outputs.nightly_apk }}"
sha256sum "${{ steps.computed.outputs.nightly_apk }}" > "${{ steps.computed.outputs.nightly_apk }}.sha256"
- name: Upload to nightly release
uses: ncipollo/release-action@v1
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
with:
allowUpdates: true
tag: nightly
omitBodyDuringUpdate: true
omitNameDuringUpdate: true
prerelease: true
replacesArtifacts: true
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "${{ steps.computed.outputs.nightly_apk }},${{ steps.computed.outputs.nightly_apk }}.sha256"
build-flatpak:
name: Flatpak
runs-on: ubuntu-22.04
needs: [update-nightly-tag]
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Cache flatpak-builder cache
uses: actions/cache@v4
with:
path: ".flatpak-builder"
key: ${{ github.job }}
- name: Install docker-compose
run: sudo apt-get install -y docker-compose
- name: Point flathub descriptor at current path
run: flatpak/localize_flathub_descriptor.py flatpak/io.github.qtox.qTox.json flatpak/io.github.qtox.qTox.json
- name: Run build
run: docker-compose run --rm flatpak ./flatpak/build.sh
- name: Upload flatpak
uses: actions/upload-artifact@v4
with:
name: qTox-${{ github.sha }}.x86_64.flatpak
path: qtox.flatpak
- name: Get tag name for flatpak release file name
if: contains(github.ref, 'refs/tags/v')
id: get_version
run: |
VERSION="$(echo $GITHUB_REF | cut -d / -f 3)"
echo "release_flatpak=qTox-$VERSION.x86_64.flatpak" >>$GITHUB_OUTPUT
- name: Rename flatpak for release upload
if: contains(github.ref, 'refs/tags/v')
run: |
cp qtox.flatpak "${{ steps.get_version.outputs.release_flatpak }}"
sha256sum "${{ steps.get_version.outputs.release_flatpak }}" > "${{ steps.get_version.outputs.release_flatpak }}.sha256"
- name: Upload to versioned release
if: contains(github.ref, 'refs/tags/v')
uses: ncipollo/release-action@v1
with:
allowUpdates: true
draft: true
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "${{ steps.get_version.outputs.release_flatpak }},${{ steps.get_version.outputs.release_flatpak }}.sha256"
- name: Rename flatpak for nightly upload
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
run: |
cp qtox.flatpak qTox-nightly.flatpak
sha256sum qTox-nightly.flatpak > qTox-nightly.flatpak.sha256
- name: Upload to nightly release
uses: ncipollo/release-action@v1
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
with:
allowUpdates: true
tag: nightly
omitBodyDuringUpdate: true
omitNameDuringUpdate: true
prerelease: true
replacesArtifacts: true
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "qTox-nightly.flatpak,qTox-nightly.flatpak.sha256"
build-macos-distributable:
name: macOS distributable
needs: update-nightly-tag
strategy:
matrix:
arch: [arm64, x86_64]
exclude:
- arch: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'packaging') && 'x86_64' }}
runs-on: ${{ matrix.arch == 'arm64' && 'macos-14' || 'macos-13' }}
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Fetch build scripts
run: git clone --depth=1 https://github.com/TokTok/dockerfiles ".ci-scripts/dockerfiles"
- name: Cache compiler output
uses: actions/cache@v4
with:
path: ".cache/ccache"
key: ${{ github.job }}-${{ matrix.arch }}-ccache
- name: Cache dependencies (only Qt)
id: cache-qt
uses: actions/cache@v4
with:
path: |
.ci-scripts/dockerfiles/local-deps/qt
key: ${{ github.job }}-${{ matrix.arch }}-qt
- name: Cache dependencies (except Qt)
id: cache-deps
uses: actions/cache@v4
with:
path: |
.ci-scripts/dockerfiles/local-deps/bin
.ci-scripts/dockerfiles/local-deps/include
.ci-scripts/dockerfiles/local-deps/lib
.ci-scripts/dockerfiles/local-deps/share
key: ${{ github.job }}-${{ matrix.arch }}-local-deps
- name: Homebrew dependencies to build dependencies
run: |
brew bundle --file ./macos/Brewfile-DepBuildDeps
sed -i '' -e 's/MAXIMUM_UNMOUNTING_ATTEMPTS=3/MAXIMUM_UNMOUNTING_ATTEMPTS=15/' "$(realpath "$(which create-dmg)")"
- name: Set up ccache
run: ccache --set-config=max_size=200M --set-config=cache_dir="$PWD/.cache/ccache" && ccache --show-config
- name: Build dependencies (only Qt)
if: steps.cache-qt.outputs.cache-hit != 'true'
run: .ci-scripts/build-macos-qt.sh ${{ matrix.arch }}
- name: Build dependencies (except Qt)
if: steps.cache-deps.outputs.cache-hit != 'true'
run: .ci-scripts/build-macos-deps.sh ${{ matrix.arch }}
- name: Install the Apple certificate
# if: github.event_name == 'push'
env:
BUILD_CERTIFICATE_BASE64: ${{ secrets.APPLE_BUILD_CERTIFICATE_BASE64 }}
P12_PASSWORD: ${{ secrets.APPLE_P12_PASSWORD }}
KEYCHAIN_PASSWORD: ${{ secrets.APPLE_KEYCHAIN_PASSWORD }}
run: .github/scripts/install_apple_cert >/dev/null
- name: Build qTox
run: .ci-scripts/build-qtox-macos.sh dist ${{ matrix.arch }}
- name: Upload dmg
uses: actions/upload-artifact@v4
with:
name: qTox-${{ github.sha }}-${{ matrix.arch }}.dmg
path: qTox-${{ matrix.arch }}.dmg
- name: Upload to versioned release
if: contains(github.ref, 'refs/tags/v')
uses: ncipollo/release-action@v1
with:
allowUpdates: true
draft: true
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "qTox-${{ matrix.arch }}.dmg,qTox-${{ matrix.arch }}.dmg.sha256"
- name: Rename artifact for nightly upload
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
run: |
cp qTox-${{ matrix.arch }}.dmg qTox-nightly-${{ matrix.arch }}.dmg
cp qTox-${{ matrix.arch }}.dmg.sha256 qTox-nightly-${{ matrix.arch }}.dmg.sha256
- name: Upload to nightly release
uses: ncipollo/release-action@v1
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
with:
allowUpdates: true
tag: nightly
omitBodyDuringUpdate: true
omitNameDuringUpdate: true
prerelease: true
replacesArtifacts: true
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "qTox-nightly-${{ matrix.arch }}.dmg,qTox-nightly-${{ matrix.arch }}.dmg.sha256"
test-macos-distributable:
name: Test macOS distributable
needs: build-macos-distributable
strategy:
matrix:
arch: [arm64, x86_64]
exclude:
- arch: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'packaging') && 'x86_64' }}
runs-on: ${{ matrix.arch == 'arm64' && 'macos-14' || 'macos-13' }}
permissions:
contents: write
steps:
- name: Download artifact from macOS distributable (${{ matrix.arch }})
uses: actions/download-artifact@v4
with:
name: qTox-${{ github.sha }}-${{ matrix.arch }}.dmg
path: qTox.dmg
- name: Install 7zip
run: brew install 7zip
- name: Unpack dmg
run: 7zz x qTox.dmg qtox.app
- name: Run qTox
run: qtox.app/Contents/MacOS/qTox --help
build-macos-user:
name: macOS user
if: github.event_name == 'pull_request' || github.event_name == 'schedule'
strategy:
matrix:
arch: [arm64, x86_64]
exclude:
- arch: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'packaging') && 'arm64' }}
runs-on: ${{ matrix.arch == 'arm64' && 'macos-14' || 'macos-13' }}
steps:
- uses: actions/checkout@v4
- name: Fetch build scripts
run: git clone --depth=1 https://github.com/TokTok/dockerfiles ".ci-scripts/dockerfiles"
- name: Cache compiler output
uses: actions/cache@v4
with:
path: ".cache/ccache"
key: ${{ github.job }}-${{ matrix.arch }}-ccache
- name: Homebrew
run: |
brew bundle --file ./macos/Brewfile
sed -i '' -e 's/MAXIMUM_UNMOUNTING_ATTEMPTS=3/MAXIMUM_UNMOUNTING_ATTEMPTS=15/' "$(realpath "$(which create-dmg)")"
- name: Set up ccache
run: ccache --set-config=max_size=200M --set-config=cache_dir="$PWD/.cache/ccache" && ccache --show-config
- name: Install toxcore
run: .ci-scripts/dockerfiles/qtox/build_toxcore_linux.sh sudo
- name: Build qTox
run: .ci-scripts/build-qtox-macos.sh user ${{ matrix.arch }}
build-windows:
name: Windows
runs-on: ubuntu-22.04
needs: [update-nightly-tag]
permissions:
contents: write
strategy:
matrix:
arch: [i686, x86_64]
build_type: [Debug, Release]
exclude:
- arch: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'packaging') && 'i686' }}
- build_type: ${{ (github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'packaging') || contains(github.ref, 'refs/tags/v')) && 'Debug' }}
steps:
- uses: actions/checkout@v4
- name: Cache compiler output
uses: actions/cache@v4
with:
path: ".cache/ccache"
key: ${{ github.job }}-${{ matrix.arch }}-${{ matrix.build_type }}-ccache
- name: Install docker-compose
run: sudo apt-get install -y docker-compose
- name: Run build
run: docker-compose run --rm windows_builder.${{ matrix.arch }} ./windows/cross-compile/build.sh --arch ${{ matrix.arch }} --build-type ${{ matrix.build_type }} --run-tests --src-dir /qtox
- name: Upload installer
if: matrix.build_type == 'release'
uses: actions/upload-artifact@v4
with:
name: setup-qtox-${{ matrix.arch }}-${{ matrix.build_type }}.exe
path: package-prefix/setup-qtox.exe
- name: Upload zip
uses: actions/upload-artifact@v4
with:
name: qtox-${{ matrix.arch }}-${{ matrix.build_type }}.zip
path: install-prefix/qtox-${{ matrix.arch }}-${{ matrix.build_type }}.zip
- name: Rename exe for release upload
if: contains(github.ref, 'refs/tags/v')
run: |
cp package-prefix/setup-qtox.exe setup-qtox-${{ matrix.arch }}-release.exe
sha256sum setup-qtox-${{ matrix.arch }}-release.exe > setup-qtox-${{ matrix.arch }}-release.exe.sha256
- name: Upload to versioned release
if: contains(github.ref, 'refs/tags/v')
uses: ncipollo/release-action@v1
with:
allowUpdates: true
draft: true
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "setup-qtox-${{ matrix.arch }}-release.exe,setup-qtox-${{ matrix.arch }}-release.exe.sha256"
- name: Rename zip for nightly upload
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
run: |
cp install-prefix/qtox-${{ matrix.arch }}-${{ matrix.build_type }}.zip qtox-nightly-${{ matrix.arch }}-${{ matrix.build_type }}.zip
sha256sum qtox-nightly-${{ matrix.arch }}-${{ matrix.build_type }}.zip > qtox-nightly-${{ matrix.arch }}-${{ matrix.build_type }}.zip.sha256
- name: Upload zip to nightly release
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
uses: ncipollo/release-action@v1
with:
allowUpdates: true
tag: nightly
omitBodyDuringUpdate: true
omitNameDuringUpdate: true
prerelease: true
replacesArtifacts: true
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "qtox-nightly-${{ matrix.arch }}-${{ matrix.build_type }}.zip,qtox-nightly-${{ matrix.arch }}-${{ matrix.build_type }}.zip.sha256"
- name: Rename exe for nightly upload
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && matrix.build_type == 'release'
run: |
cp package-prefix/setup-qtox.exe qtox-nightly-${{ matrix.arch }}-${{ matrix.build_type }}.exe
sha256sum qtox-nightly-${{ matrix.arch }}-${{ matrix.build_type }}.exe > qtox-nightly-${{ matrix.arch }}-${{ matrix.build_type }}.exe.sha256
- name: Upload exe to nightly release
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && matrix.build_type == 'release'
uses: ncipollo/release-action@v1
with:
allowUpdates: true
tag: nightly
omitBodyDuringUpdate: true
omitNameDuringUpdate: true
prerelease: true
replacesArtifacts: true
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "qtox-nightly-${{ matrix.arch }}-${{ matrix.build_type }}.exe,qtox-nightly-${{ matrix.arch }}-${{ matrix.build_type }}.exe.sha256"
################################################################################################
# Documentation/website jobs
################################################################################################
build-docs:
name: Docs
runs-on: ubuntu-22.04
env:
DOXYGEN_CONFIG_FILE: doxygen.conf
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run
run: .ci-scripts/build-docs.sh
- name: Deploy
if: github.ref == 'refs/heads/master' && github.repository_owner == 'qTox'
env:
access_key: ${{ secrets.DOXYGEN_DEPLOY_KEY }}
run: .ci-scripts/deploy-docs.sh