-
Notifications
You must be signed in to change notification settings - Fork 8
44 lines (40 loc) · 1.02 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" ]
env:
CARGO_TERM_COLOR: always
jobs:
static:
name: Static code checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check formatting
run: cargo fmt --all -- --check
build:
name: Fedora tests
runs-on: ubuntu-latest
container:
image: registry.fedoraproject.org/fedora:38
options: --privileged
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: dnf install -y cargo clang clippy kernel-devel libbpf-devel llvm-devel rustfmt
- name: Copy vmlinux.h
run: cp $(rpm -ql kernel-devel | grep '/vmlinux.h$' | tail -1) agent/src/bpf
- name: Build
run: cargo build --verbose
- name: Run tests
run: |
cargo test --verbose --workspace --exclude crypto-auditing-agent
- name: Run integration tests
run: |
cd agent
cargo test --verbose
cd -
- name: Run clippy
run: cargo clippy