-
Notifications
You must be signed in to change notification settings - Fork 2
55 lines (42 loc) · 1.53 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
45
46
47
48
49
50
51
52
53
54
55
name: Rust (build, integration tests, formating)
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
RUST_TEST_THREADS: "1"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install LLVM and Clang
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-19 main" | sudo tee -a /etc/apt/sources.list.d/llvm.list
sudo apt-get update
sudo apt-get install -y llvm-19 llvm-19-dev clang-19 libclang-19-dev
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2024-08-13
components: rustfmt, rust-src
override: true
- name: Install required tools
run: |
cargo install --force ziggy cargo-afl honggfuzz grcov cargo-contract
- name: Run afl-system-config
run: sudo cargo-afl afl system-config
- name: Run rustfmt checks
run: cargo fmt -- --check
- name: Build in release mode
run: cargo build --release --verbose
- name: Run AFL++ configuration
run: cargo afl config --build --plugins --verbose --force
- name: Run integration test for instrumentation
run: cargo test --release --test cli_instrument_integration_test
- name: Run integration test for fuzzing
run: cargo test --release --test cli_fuzz_integration_test