-
Notifications
You must be signed in to change notification settings - Fork 16
37 lines (29 loc) · 1.07 KB
/
ci.yaml
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
name: CI
on: [push, pull_request]
env:
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: "sparse"
RUSTFLAGS: "-Dwarnings"
jobs:
clippy-check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Parse MSRV
run: sed -n 's/^rust-version = "\(.*\)"$/RUSTUP_TOOLCHAIN=\1/p' enclaver/Cargo.toml >> $GITHUB_ENV
- name: Install Rust Toolchain
run: rustup toolchain install $RUSTUP_TOOLCHAIN
- name: Install Clippy and Rustfmt
run: rustup component add clippy rustfmt
- name: Check with default features
run: |
cargo clippy --quiet --no-deps --manifest-path enclaver/Cargo.toml
- name: Check all binaries
run: |
cargo clippy --quiet --no-deps --manifest-path enclaver/Cargo.toml --features=run_enclave,odyn
- name: Check with tracing enabled
env:
RUSTFLAGS: "--cfg=tokio_unstable"
run: |
cargo clippy --quiet --no-deps --manifest-path enclaver/Cargo.toml --features=run_enclave,odyn,tracing
## TODO: Add test job here?