-
Notifications
You must be signed in to change notification settings - Fork 2
107 lines (87 loc) · 2.78 KB
/
Copy pathci.yml
File metadata and controls
107 lines (87 loc) · 2.78 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
# SPDX-FileCopyrightText: 2026 ChouChiu
# SPDX-License-Identifier: AGPL-3.0-only
name: CI
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ci-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: "1"
jobs:
quality:
name: Frontend and Rust quality
runs-on: ubuntu-latest
timeout-minutes: 45
container:
image: archlinux:latest
steps:
- name: Install build dependencies
run: >-
pacman -Syu --noconfirm --needed
base-devel
git
gtk4
gtk4-layer-shell
webkitgtk-6.0
openssl
rust
unzip
- name: Check out source
uses: actions/checkout@v7
with:
persist-credentials: false
- name: Trust checked-out workspace
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Set up Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.14
- name: Restore Bun cache
uses: actions/cache@v6
with:
path: ~/.bun/install/cache
key: bun-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('bun.lock') }}
restore-keys: |
bun-${{ runner.os }}-${{ runner.arch }}-
- name: Restore Cargo cache
uses: actions/cache@v6
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: cargo-${{ runner.os }}-${{ runner.arch }}-arch-${{ hashFiles('rust-toolchain.toml', 'Cargo.lock') }}-${{ github.sha }}
restore-keys: |
cargo-${{ runner.os }}-${{ runner.arch }}-arch-${{ hashFiles('rust-toolchain.toml', 'Cargo.lock') }}-
cargo-${{ runner.os }}-${{ runner.arch }}-arch-
- name: Install frontend dependencies
run: bun install --frozen-lockfile
- name: Check frontend
run: |
bun run check
bun run typecheck
bun test
- name: Verify dependency licenses
run: |
cargo install --locked --features cli --version 0.9.1 cargo-about
cargo about generate --locked --all-features data/licenses/about.hbs \
--output-file data/licenses/dependencies.json
git diff --exit-code -- data/licenses/dependencies.json
- name: Check Rust formatting
run: cargo fmt --all -- --check
- name: Lint Rust
run: cargo clippy --locked --all-targets --all-features -- -D warnings
- name: Test workspace
run: cargo test --locked --all-targets --all-features
- name: Build documentation
run: cargo docs
- name: Build release binary
run: cargo build --locked --release