Skip to content

Commit

Permalink
ci: fix msrv runs (#175)
Browse files Browse the repository at this point in the history
  • Loading branch information
camshaft authored Sep 10, 2023
1 parent 63ebde2 commit 868a399
Show file tree
Hide file tree
Showing 271 changed files with 420 additions and 305 deletions.
74 changes: 24 additions & 50 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,44 +44,8 @@ jobs:
strategy:
fail-fast: false
matrix:
rust: [1.57.0, 1.64.0, stable, nightly]
rust: [1.57.0, stable, nightly]
os: [ubuntu-latest, macOS-latest]
# TODO add honggfuzz back
test: [unit-tests, unit-tests-no-1.57, build-no-default-features, libfuzzer, afl, examples-tests]
sanitizer: [NONE]
exclude:
- rust: 1.57.0
test: unit-tests-no-1.57
# honggfuzz is broken on macOS
- os: macos-latest
test: honggfuzz
include:
- rust: nightly
os: ubuntu-latest
test: libfuzzer
sanitizer: address
# - rust: nightly
# os: ubuntu-latest
# test: honggfuzz
# sanitizer: address
# TODO fix this
# - rust: nightly
# os: ubuntu-latest
# test: afl
# sanitizer: address
- rust: nightly
os: macOS-latest
test: libfuzzer
sanitizer: address
# - rust: nightly
# os: macOS-latest
# test: honggfuzz
# sanitizer: address
# TODO fix this
# - rust: nightly
# os: macOS-latest
# test: afl
# sanitizer: address

steps:
- name: Ubuntu setup
Expand All @@ -101,23 +65,33 @@ jobs:
- uses: actions/checkout@v3.5.3

# install stable for kani, cargo-bolero and test runner
- uses: actions-rs/toolchain@v1.0.7
with:
toolchain: stable
profile: minimal

- name: Install kani
run: |
cargo install --locked kani-verifier
cargo kani setup
- uses: actions-rs/toolchain@v1.0.7
id: toolchain
with:
toolchain: ${{ matrix.rust }}
profile: minimal
override: true

- uses: camshaft/rust-cache@v1
with:
key: ${{ matrix.test }}-${{ matrix.sanitizer }}
# kani isn't compatible with sccache
wrapper: false

- name: Setup target rustc
if: matrix.rust != 'stable' && matrix.rust != 'nightly'
run: echo "TARGET_RUSTC=${{ matrix.rust }}" >> $GITHUB_ENV

- name: ${{ matrix.test }}
run: make ${{ matrix.test }}
env:
AFL_I_DONT_CARE_ABOUT_MISSING_CRASHES: 1
AFL_SKIP_CPUFREQ: 1
SANITIZER: ${{ matrix.sanitizer }}
- name: Run tests
run: cargo +stable run

kani:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -166,10 +140,10 @@ jobs:
run: |
cat <<EOF >> Cargo.toml
[patch.crates-io]
bolero = { path = "../../../../bolero" }
bolero-engine = { path = "../../../../bolero-engine" }
bolero-generator = { path = "../../../../bolero-generator" }
bolero-generator-derive = { path = "../../../../bolero-generator-derive" }
bolero = { path = "../../../../lib/bolero" }
bolero-engine = { path = "../../../../lib/bolero-engine" }
bolero-generator = { path = "../../../../lib/bolero-generator" }
bolero-generator-derive = { path = "../../../../lib/bolero-generator-derive" }
EOF
- uses: camshaft/rust-cache@v1
Expand Down
16 changes: 2 additions & 14 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
[workspace]
members = [
"bolero",
"bolero-*",
"cargo-bolero",
"tests",
]

[profile.fuzz]
inherits = "dev"
opt-level = 3
incremental = false
codegen-units = 1

[profile.release]
lto = true
codegen-units = 1
incremental = false
resolver = "2"
217 changes: 0 additions & 217 deletions Makefile

This file was deleted.

5 changes: 5 additions & 0 deletions bin/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[workspace]
members = [
"cargo-bolero",
]
resolver = "2"
8 changes: 5 additions & 3 deletions cargo-bolero/Cargo.toml → bin/cargo-bolero/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ keywords = ["testing", "quickcheck", "property", "fuzz", "fuzzing"]
license = "MIT"
edition = "2018"
readme = "README.md"
rust-version = "1.66.0"

[features]
default = ["afl", "libfuzzer", "kani"]
Expand All @@ -20,8 +21,8 @@ libfuzzer = []
[dependencies]
anyhow = "1.0"
bit-set = "0.5"
bolero-afl = { version = "0.9", path = "../bolero-afl", default-features = false, features = ["bin"], optional = true }
bolero-honggfuzz = { version = "0.9", path = "../bolero-honggfuzz", default-features = false, features = ["bin"], optional = true }
bolero-afl = { version = "0.9", path = "../../lib/bolero-afl", default-features = false, features = ["bin"], optional = true }
bolero-honggfuzz = { version = "0.9", path = "../../lib/bolero-honggfuzz", default-features = false, features = ["bin"], optional = true }
humantime = "2"
lazy_static = "1"
rustc_version = "0.4"
Expand All @@ -31,7 +32,7 @@ serde_json = "1.0"
tempfile = "3"

[dev-dependencies]
bolero = { version = "0.9", path = "../bolero" }
bolero = { version = "0.9", path = "../../lib/bolero" }

[[test]]
name = "fuzz_bytes"
Expand All @@ -42,3 +43,4 @@ harness = false
name = "fuzz_generator"
path = "tests/fuzz_generator/fuzz_target.rs"
harness = false

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions bin/rust-toolchain
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[toolchain]
channel = "1.66.0"
components = [ "rustc", "clippy", "rustfmt" ]
2 changes: 1 addition & 1 deletion examples/basic/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ edition = "2018"
arrayvec = "0.5"

[dev-dependencies]
bolero = { path = "../../bolero" }
bolero = { path = "../../lib/bolero" }

[workspace]
members = ["."]
Expand Down
Loading

0 comments on commit 868a399

Please sign in to comment.