1name: Rust 2 3on: [push, pull_request] 4 5jobs: 6 vanilla_build: 7 name: Vanilla Build 8 runs-on: ubuntu-latest 9 steps: 10 - uses: actions/checkout@v3 11 - run: rustup update 12 - name: Build 13 run: cargo build --verbose --all 14 - name: Run tests 15 run: cargo test --verbose --all 16 all_features_build: 17 name: All Features Enabled Build 18 runs-on: ubuntu-latest 19 steps: 20 - uses: actions/checkout@v3 21 - run: rustup update 22 - name: Build 23 run: cargo build --verbose --all-features --all 24 - name: Run tests 25 run: cargo test --verbose --all-features --all 26 - name: Build Examples 27 run: cargo build --examples --all-features --all 28 clippy: 29 name: Clippy 30 runs-on: ubuntu-latest 31 steps: 32 - uses: actions/checkout@v3 33 - run: rustup update 34 - run: rustup component add clippy 35 - run: cargo clippy --all-features --workspace -- -Dclippy::all 36 rustfmt: 37 name: Check rustfmt 38 runs-on: ubuntu-latest 39 steps: 40 - uses: actions/checkout@v3 41 - run: rustup update 42 - run: rustup component add rustfmt --toolchain stable 43 - run: cargo +stable fmt --all -- --check 44 fuzz: 45 name: Run `int_in_range` fuzz target 46 runs-on: ubuntu-latest 47 steps: 48 - uses: actions/checkout@v3 49 - run: rustup update 50 - name: "Install nightly" 51 run: rustup toolchain install nightly && rustup default nightly 52 - name: "Install `cargo-fuzz`" 53 run: cargo install cargo-fuzz 54 - name: "Fuzz for 3 minutes" 55 run: cargo fuzz run int_in_range -- -max_total_time=$((3 * 60)) 56