Repository navigation
114 lines (107 loc) · 3.59 KB
/
Copy pathci.yml
File metadata and controls
114 lines (107 loc) · 3.59 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
name: CI
on:
push:
branches: [develop, main]
pull_request:
branches: [develop, main]
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
env:
NODE_VERSION: "22"
PNPM_VERSION: "11.11.0"
jobs:
frontend:
name: Frontend (vue-tsc + build)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: pnpm/action-setup@v6
with:
version: ${{ env.PNPM_VERSION }}
- uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
cache: pnpm
- run: pnpm install --frozen-lockfile
- name: Check release versions are consistent
run: node scripts/check-release-version.mjs
- run: pnpm build
# #1504: validate the web-terminal SPA bundle here (fast frontend job) too — not only in the
# slower Rust job — so Vite-bundle errors surface early. Mirrors beforeBuildCommand's coverage.
- run: pnpm run build:web
- run: pnpm test
rust:
name: Rust (fmt + clippy + build)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Install Tauri system dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
libwebkit2gtk-4.1-dev \
libgtk-3-dev \
libsoup-3.0-dev \
libjavascriptcoregtk-4.1-dev \
librsvg2-dev \
patchelf
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
with:
workspaces: src-tauri
# Frontend dist is required by tauri-build (frontendDist points at ../dist).
- uses: pnpm/action-setup@v6
with:
version: ${{ env.PNPM_VERSION }}
- uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm build
# #1504: the web SPA bundle (`dist-web`) is embedded by `remote::terminal_http` via rust-embed.
# Must run BEFORE cargo so release embeds the real bundle (build.rs only writes a placeholder).
- run: pnpm run build:web
- run: pnpm run check:config-types
- name: cargo fmt
run: cargo fmt --manifest-path src-tauri/Cargo.toml --all -- --check
- name: cargo clippy
run: cargo clippy --manifest-path src-tauri/Cargo.toml --all-targets --locked -- -D warnings
- name: cargo build
run: cargo build --manifest-path src-tauri/Cargo.toml --locked
- name: cargo test
run: cargo test --manifest-path src-tauri/Cargo.toml --locked
rust-platform-cli-resolution:
name: Rust (${{ matrix.platform }} CLI resolution)
strategy:
fail-fast: false
matrix:
include:
- platform: Windows
os: windows-latest
- platform: macOS
os: macos-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
workspaces: src-tauri
- uses: pnpm/action-setup@v6
with:
version: ${{ env.PNPM_VERSION }}
- uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
cache: pnpm
- run: pnpm install --frozen-lockfile
# tauri-build requires the configured frontendDist even for the resolver unit tests.
- run: pnpm build
- name: cargo test (platform CLI resolver)
run: cargo test --manifest-path src-tauri/Cargo.toml --locked --lib config::cli