Skip to content

Add plugins feature #818

Add plugins feature

Add plugins feature #818

Workflow file for this run

name: Rust
on:
pull_request:
push:
branches:
- master
workflow_dispatch:
concurrency:
group: rust-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- run: sudo apt-get install llvm
- name: Cargo sort
run: cargo install cargo-sort && cargo sort --check .
- name: Format
run: cargo fmt && git diff --exit-code
- name: Clippy
run: cargo clippy --all-targets -- -D warnings -W clippy::pedantic -A clippy::missing-panics-doc
build:
strategy:
fail-fast: false
matrix:
environment: [ubuntu-latest, macos-latest]
toolchain: [stable, nightly]
features: [default, plugins]
cc: [cc, clang]
exclude:
- toolchain: stable
features: plugins
include:
- cc: cc
cxx: c++
- cc: clang
cxx: clang++
runs-on: ${{ matrix.environment }}
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Rustup
run: rustup default ${{ matrix.toolchain }}
- name: Install LLVM
id: install-llvm
run: |
LLVM_VERSION="$(rustc --version -v | grep '^LLVM version:' | grep -o '[0-9]\+' | head -n 1)"
if [[ ${{ matrix.environment }} = 'macos-latest' ]]; then
brew update
brew install llvm@"$LLVM_VERSION" || true
echo "PATH=/usr/local/opt/llvm/bin:$PATH" >> "$GITHUB_OUTPUT"
else
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh "$LLVM_VERSION"
fi
env:
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
- name: Build
run: cargo build --features=${{ matrix.features }} -vv
env:
PATH: ${{ steps.install-llvm.outputs.path }}
- name: Run afl-system-config
run: cargo run --features=${{ matrix.features }} -- afl system-config
- name: Build examples (with AFL instrumentation)
run: cargo run --features=${{ matrix.features }} -- afl build --examples -vv
- name: Run tests
run: cargo test --features=${{ matrix.features }} -p cargo-afl -vv
all-checks:
needs: [lint, build]
runs-on: ubuntu-latest
steps:
- run: true