Repository navigation
72 lines (64 loc) · 2.62 KB
/
Copy pathci.yml
File metadata and controls
72 lines (64 loc) · 2.62 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
name: ci
# The release's checks on every pull request and push to main, so a broken
# main shows before a tag is pushed rather than when it is. No secrets: the
# checks need none, and pull requests from forks get none.
on:
pull_request:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
# A newer push to the same branch or pull request makes the older run moot.
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version-file: dev/go.mod
- name: Rust tools
run: |
set -euo pipefail
curl --proto '=https' --tlsv1.2 -fsSL https://sh.rustup.rs -o /tmp/rustup-init.sh
sh /tmp/rustup-init.sh -y --no-modify-path --profile minimal --component rustfmt,clippy
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
# The same checks as the release job's Test step; keep the two alike.
- name: Test
run: |
cargo fmt --all --check
cargo clippy --workspace --all-targets --locked -- -D warnings
cargo test --workspace --locked
go -C dev test ./...
node --test crates/brumm/src/provider/tidal/web/player.test.mjs crates/brumm/src/provider/spotify/web/player.test.mjs
python3 -m unittest discover -s .github/scripts -p 'test_*.py'
# Built and tested as the release builds it: against Qt 6.11, see the
# gui job in release.yml.
gui:
runs-on: ubuntu-latest
container: archlinux:latest
steps:
- name: Tools
run: |
printf 'Server = https://archive.archlinux.org/repos/2026/09/30/$repo/os/$arch\n' > /etc/pacman.d/mirrorlist
# The archive is often slow: no download timeout, three tries.
for try in 1 2 3; do
pacman -Syyuu --noconfirm --disable-download-timeout base-devel git rust qt6-base qt6-declarative qt6-shadertools qt6-multimedia && break
[[ $try == 3 ]] && exit 1
sleep 30
done
[[ $(qmake6 -query QT_VERSION) == 6.11.* ]] || { echo 'GUI build needs Qt 6.11'; exit 1; }
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Build
run: dev/build-gui dist
- name: Test GUI
run: |
QT_QPA_PLATFORM=offscreen QT_QUICK_BACKEND=software /usr/lib/qt6/bin/qmltestrunner -input gui/tests