-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (46 loc) · 1.58 KB
/
Copy pathci.yml
File metadata and controls
56 lines (46 loc) · 1.58 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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
ci:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# windows-2022 (not windows-latest) — see bundle.yml: windows-latest's VS18
# preview breaks the aws-lc-sys cmake build via rustls.
os: [macos-latest, ubuntu-latest, windows-2022]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
shared-key: ci-${{ matrix.os }}
- name: Install system dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y \
libwebkit2gtk-4.1-dev \
libgtk-3-dev
# cargo check runs everywhere — catches OS-specific compile errors
# (objc2 on macOS, winapi on Windows, gtk on Linux).
- name: Cargo check
run: cargo check --locked
# The remaining steps only need one OS: lib has no OS-specific code paths,
# clippy lints are portable, and rustfmt is OS-agnostic. Running on Linux
# only saves ~5 min per CI run.
- name: Cargo test
if: runner.os == 'Linux'
env:
RUST_LOG: warn,lib=trace,iroh_proxy_utils=trace
run: cargo test -p lib --locked
- name: Cargo clippy
if: runner.os == 'Linux'
run: cargo clippy --workspace --all-features --all-targets --lib --bins --tests --benches --examples
- name: Cargo fmt
if: runner.os == 'Linux'
run: cargo fmt --check --all