diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 61ae3e3f..fe8a43d0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -31,43 +31,32 @@ jobs: uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.toolchain }} - components: rustfmt - name: Style check if: matrix.toolchain == 'nightly' - run: cargo fmt --all --check + run: rustup component add rustfmt && cargo fmt --all --check - name: Cargo build run: cargo build --verbose - - name: Cargo test + - name: Cargo test no features run: cargo test --verbose - - name: Cargo test w/ serde - run: cargo test --verbose --features serde - - - name: Cargo test w/ malloc_size_of - run: cargo test --verbose --features malloc_size_of - - - name: Cargo check w/o default features - if: matrix.toolchain == 'nightly' - run: cargo check --verbose --no-default-features - - name: Cargo test all features if: matrix.toolchain == 'nightly' run: cargo test --verbose --all-features - name: Cargo doc all features if: matrix.toolchain == 'nightly' - run: cargo doc --all-features + run: cargo doc --all-features --verbose - - name: Cargo bench + - name: Cargo bench all features if: matrix.toolchain == 'nightly' - run: cargo bench --verbose bench + run: cargo bench --verbose --all-features - name: miri if: matrix.toolchain == 'nightly' - run: bash ./scripts/run_miri.sh + run: rustup component add miri && cargo miri test --verbose --all-features - name: fuzz if: matrix.fuzz == 1 diff --git a/Cargo.toml b/Cargo.toml index 4dbbc234..912a2edb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ keywords = ["small", "vec", "vector", "stack", "no_std"] categories = ["data-structures"] readme = "README.md" documentation = "https://docs.rs/smallvec/" -exclude = [".gitignore", "tests/", "scripts/", "fuzz/", "benches/", ".github/"] +exclude = [".gitignore", "tests/", "fuzz/", "benches/", ".github/"] [features] std = [] diff --git a/scripts/run_miri.sh b/scripts/run_miri.sh deleted file mode 100644 index ad9b596e..00000000 --- a/scripts/run_miri.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/bash - -set -ex - -# Clean out our target dir, which may have artifacts compiled by a version of -# rust different from the one we're about to download. -cargo clean - -# Install and run the latest version of nightly where miri built successfully. -# Taken from: https://github.com/rust-lang/miri#running-miri-on-ci - -MIRI_NIGHTLY=nightly-$(curl -s https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu/miri) -echo "Installing latest nightly with Miri: $MIRI_NIGHTLY" -rustup default "$MIRI_NIGHTLY" - -rustup component add miri -cargo miri setup - -cargo miri test --verbose -cargo clean -cargo miri test --verbose --all-features