68 lines
1.7 KiB
YAML
68 lines
1.7 KiB
YAML
name: Build and Test
|
|
|
|
on:
|
|
push:
|
|
branches: [ main, dev ]
|
|
pull_request:
|
|
branches: [ main, dev ]
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
lint:
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Cache cargo registry
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
key: clippy-cargo-${{ hashFiles('**/Cargo.toml') }}
|
|
- name: Add clippy
|
|
run: rustup component add clippy
|
|
- name: Run clippy
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: clippy
|
|
args: --all
|
|
ubuntu:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Default Build
|
|
run: cargo build --verbose
|
|
- name: Default Test
|
|
run: cargo test --verbose
|
|
- name: Build all features
|
|
run: cd libafl && cargo build --all-features --verbose
|
|
- name: Test all features
|
|
run: cd libafl && cargo test --all-features --verbose
|
|
- name: Build no_std
|
|
run: cd libafl && cargo build --no-default-features --verbose
|
|
- name: Test no_std
|
|
run: cd libafl && cargo test --no-default-features --verbose
|
|
- name: Build examples
|
|
run: cargo build --examples --verbose
|
|
- uses: actions/checkout@v2
|
|
- name: Format
|
|
run: cargo fmt -- --check
|
|
- uses: actions/checkout@v2
|
|
- name: Build Docs
|
|
run: cargo doc
|
|
- name: Test Docs
|
|
run: cargo test --doc
|
|
windows:
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Windows Build
|
|
run: cargo build --verbose
|
|
- name: Windows Test
|
|
run: cargo test --verbose
|