More troubleshooting doc #215
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Integration tests | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
CARGO_TERM_COLOR: always | |
RUST_TEST_THREADS: "1" | |
AFL_SKIP_CPUFREQ: 1 | |
AFL_I_DONT_CARE_ABOUT_MISSING_CRASHES: 1 | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache Cargo components | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/index | |
target | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
${{ runner.os }}-cargo- | |
- name: Set up LLVM & Clang | |
run: | | |
if ! command -v clang-19; then | |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo -E apt-key add - | |
echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-19 main" | sudo -E tee -a /etc/apt/sources.list.d/llvm.list | |
sudo -E apt-get update | |
sudo -E apt-get install -y llvm-19 clang-19 libclang-19-dev | |
fi | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: nightly | |
override: true | |
- name: rustup component add | |
run: rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu | |
- name: Install required tools | |
run: | | |
cargo install ziggy cargo-afl honggfuzz grcov cargo-contract | |
- name: Run afl-system-config | |
run: | | |
curl -s https://raw.githubusercontent.com/AFLplusplus/AFLplusplus/stable/afl-system-config > afl-system-config.sh | |
chmod +x afl-system-config.sh | |
sudo -E ./afl-system-config.sh | |
- name: Run AFL++ configuration | |
run: | |
cargo afl config --build --plugins --verbose --force | |
- name: Build in release mode | |
run: cargo build --release --verbose | |
- name: Compile samples in `sample` | |
working-directory: ./sample | |
run: bash build.sh | |
- name: Run all unit tests | |
run: cargo test --no-fail-fast -- --test-threads=1 |