-
Notifications
You must be signed in to change notification settings - Fork 20
44 lines (42 loc) · 1.07 KB
/
rust.yml
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
name: Rust
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install rustc nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
components: rustfmt, clippy, rust-src
- name: Install bpf-linker
run: cargo install bpf-linker
- name: Build eBPF
run: cargo xtask build-ebpf
- name: Build
run: cargo build
env:
DOCKER_BUILDKIT: 1
COMPOSE_DOCKER_CLI_BUILD: 1
- name: Test
run: cargo test
env:
DOCKER_BUILDKIT: 1
COMPOSE_DOCKER_CLI_BUILD: 1
- name: Lint
run: cargo clippy -- -D warnings
env:
DOCKER_BUILDKIT: 1
COMPOSE_DOCKER_CLI_BUILD: 1
- name: Install udeps
run: cargo +nightly install cargo-udeps
- name: Check unused dependencies
run: cargo +nightly udeps --all-targets
env:
DOCKER_BUILDKIT: 1
COMPOSE_DOCKER_CLI_BUILD: 1