-
Notifications
You must be signed in to change notification settings - Fork 0
104 lines (97 loc) · 3.44 KB
/
Copy pathci.yml
File metadata and controls
104 lines (97 loc) · 3.44 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
name: CI
on:
push:
branches: [main]
pull_request:
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-Dwarnings"
RUST_BACKTRACE: "1"
jobs:
fmt:
name: fmt
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- name: Install toolchain (respects rust-toolchain.toml)
run: rustup show active-toolchain || rustup toolchain install
- run: cargo fmt --all -- --check
clippy:
name: clippy
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- run: rustup show active-toolchain || rustup toolchain install
- run: rustup component add clippy
- name: Install FUSE
run: sudo apt-get update && sudo apt-get install -y fuse3 libfuse3-dev pkg-config
- uses: Swatinem/rust-cache@v2
- run: cargo clippy --workspace --all-targets -- -D warnings
test-linux:
name: test (linux)
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- run: rustup show active-toolchain || rustup toolchain install
- name: Install FUSE
run: sudo apt-get update && sudo apt-get install -y fuse3 libfuse3-dev pkg-config
- uses: Swatinem/rust-cache@v2
- name: Test (skip --ignored)
run: cargo test --workspace --locked
test-windows:
name: test (windows)
runs-on: windows-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- run: rustup show active-toolchain || rustup toolchain install
- name: Install WinFSP
shell: pwsh
# devdev-workspace's build.rs links against WinFSP's import
# library; without it the workspace can't even compile. We
# still skip `--ignored` tests (actual mounting requires
# kernel driver bits not guaranteed on a hosted runner).
#
# choco updates the system PATH via registry, but subsequent
# GitHub Actions steps capture env at step-start, so we also
# append the bin directory to $GITHUB_PATH. Without this the
# test binary fails to load the delay-loaded winfsp-x64.dll
# at startup (STATUS_DLL_NOT_FOUND / 0xc0000135).
run: |
choco install winfsp -y --no-progress
$winfspBin = "${env:ProgramFiles(x86)}\WinFsp\bin"
if (-not (Test-Path $winfspBin)) {
throw "WinFSP bin directory not found at $winfspBin after install"
}
Add-Content -Path $env:GITHUB_PATH -Value $winfspBin
- uses: Swatinem/rust-cache@v2
- name: Test (skip --ignored; mounts gated by --ignored)
shell: pwsh
run: cargo test --workspace --locked
coverage:
name: coverage
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- run: rustup show active-toolchain || rustup toolchain install
- run: rustup component add llvm-tools-preview
- name: Install FUSE
run: sudo apt-get update && sudo apt-get install -y fuse3 libfuse3-dev pkg-config
- uses: Swatinem/rust-cache@v2
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@v2
with:
tool: cargo-llvm-cov
- name: Run coverage
run: cargo llvm-cov --workspace --lcov --output-path lcov.info
- name: Summary
run: cargo llvm-cov --workspace --summary-only
- name: Upload lcov artifact
uses: actions/upload-artifact@v4
with:
name: lcov
path: lcov.info