-
Notifications
You must be signed in to change notification settings - Fork 1
112 lines (96 loc) · 3.09 KB
/
Copy pathci.yml
File metadata and controls
112 lines (96 loc) · 3.09 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
name: CI
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
frontend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: oven-sh/setup-bun@v2
- run: bun install
- name: Type-check (svelte-check)
run: bun run check
- name: Frontend build
run: bun run build
rust:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v7
- name: Install Linux dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
libwebkit2gtk-4.1-dev \
libappindicator3-dev \
librsvg2-dev \
patchelf \
libdbus-1-dev \
libasound2-dev \
cmake \
build-essential \
file
- uses: oven-sh/setup-bun@v2
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: swatinem/rust-cache@v2
with:
workspaces: src-tauri -> target
# tauri::generate_context! embeds ../dist, so the frontend must exist.
- name: Build frontend (for generate_context!)
run: |
bun install
bun run build
- name: rustfmt
run: cargo fmt --manifest-path src-tauri/Cargo.toml --check
- name: clippy
run: cargo clippy --manifest-path src-tauri/Cargo.toml --all-targets -- -D warnings
# Windows-specific compile check. The Linux jobs above can't catch a backend
# that fails to build only on Windows (e.g. a crate's WASAPI backend) — that
# used to surface only at release-tag time. `cargo check` compiles the deps,
# so a Windows-only trait/build error fails here, at PR time.
windows:
name: cargo check (windows)
runs-on: windows-latest
steps:
- uses: actions/checkout@v7
- uses: oven-sh/setup-bun@v2
- uses: dtolnay/rust-toolchain@stable
- uses: swatinem/rust-cache@v2
with:
workspaces: src-tauri -> target
# tauri::generate_context! embeds ../dist, so the frontend must exist.
- name: Build frontend (for generate_context!)
shell: bash
run: |
bun install
bun run build
- name: cargo check
run: cargo check --manifest-path src-tauri/Cargo.toml --all-targets
# macOS-specific compile check (CoreAudio backend, Apple frameworks), so a
# macOS-only build break is caught at PR time rather than at release-tag time.
macos:
name: cargo check (macos)
runs-on: macos-latest
steps:
- uses: actions/checkout@v7
- uses: oven-sh/setup-bun@v2
- uses: dtolnay/rust-toolchain@stable
- uses: swatinem/rust-cache@v2
with:
workspaces: src-tauri -> target
# tauri::generate_context! embeds ../dist, so the frontend must exist.
- name: Build frontend (for generate_context!)
shell: bash
run: |
bun install
bun run build
- name: cargo check
run: cargo check --manifest-path src-tauri/Cargo.toml --all-targets