This repository was archived by the owner on Oct 23, 2026. It is now read-only.
Repository navigation
135 lines (107 loc) · 3.75 KB
/
Copy pathci.yaml
File metadata and controls
135 lines (107 loc) · 3.75 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
name: CI
on:
push:
branches: ["**"]
pull_request:
permissions:
contents: read # Required to checkout code
jobs:
frontend:
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
- name: Install frontend dependencies
run: npm ci
- name: Lint
run: npm run lint
- name: Unit tests (incl. no em/en dashes in the repository)
run: npx vitest run --reporter=dot
- name: Build
run: npm run build
rust:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Cache cargo
uses: Swatinem/rust-cache@v2
- name: Clippy
run: cargo clippy --all-targets -- -D warnings
- name: Rust tests (incl. device definitions vs. wire captures)
run: cargo test
- name: Validate device definitions
run: cargo run -q -p bm-devicedef -- validate devices
# The desktop app crate (not a default member): its unit tests need the WebKitGTK packages, and
# its build checks the bundled resources exist (an empty UI directory is enough for the tests).
# Also on 64-bit ARM (the Raspberry Pi build of the release), natively on GitHub's ARM runner.
desktop-app:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, ubuntu-24.04-arm]
runs-on: ${{ matrix.os }}
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Install WebKitGTK
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Cache cargo
uses: Swatinem/rust-cache@v2
- name: Clippy (benchmesh-app)
run: |
mkdir -p frontend/dist
cargo clippy -p benchmesh-app --all-targets -- -D warnings
- name: Tests (benchmesh-app)
run: cargo test -p benchmesh-app
# Port discovery has Windows (SetupAPI) and macOS (IORegistry) code: build, lint and test the
# transport crate natively there, and run the real enumeration once (no instruments attached).
# The server's headless system code (start with the computer: Run key / LaunchAgent, restart)
# differs per OS too: lint the server there and run its system tests and the headless process test.
transport-platforms:
strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Cache cargo
uses: Swatinem/rust-cache@v2
- name: Clippy (bm-transport)
run: cargo clippy -p bm-transport --all-targets -- -D warnings
- name: Tests (bm-transport)
run: cargo test -p bm-transport
- name: Enumerate ports
run: cargo run -q -p bm-transport --example ports
- name: Clippy (bm-server)
run: cargo clippy -p bm-server --all-targets -- -D warnings
- name: Tests (bm-server system, headless process)
run: |
cargo test -p bm-server --lib system::
cargo test -p bm-server --lib headless::
cargo test -p bm-server --test headless