Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: fixes #320

Merged
merged 5 commits into from
Sep 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 17 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,17 @@ jobs:
run: "true"

test:
name: Test ${{ matrix.rust }}
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
rust: [stable, beta, nightly, 1.65] # MSRV
rust: ["stable", "beta", "nightly", "1.65"] # MSRV
flags: ["--no-default-features", "", "--all-features"]
exclude:
# Skip because some features have higher MSRV.
- rust: "1.65" # MSRV
flags: "--all-features"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
Expand All @@ -36,18 +40,25 @@ jobs:
sed -i 's/nightly = \[\]//g' Cargo.toml
sed -i 's/generic_const_exprs = \["nightly"\]//g' Cargo.toml
- uses: Swatinem/rust-cache@v2
# Only run tests on latest stable and above
- name: Check
if: ${{ matrix.rust == '1.65' }} # MSRV
run: cargo check ${{ matrix.flags }}

# Cargo doc test is not included in `--all-targets` so we call it separately.
# See <https://github.com/rust-lang/cargo/issues/6669>
# Cargo doc test also doesn't support `--no-run`, so we run it but
# have it just print `--help`.
- name: Build tests
if: ${{ matrix.rust != '1.65' }} # MSRV
run: |
cargo test --workspace --all-features --all-targets --no-run
cargo test --workspace --all-features --doc -- --help
cargo test --workspace ${{ matrix.flags }} --all-targets --no-run
cargo test --workspace ${{ matrix.flags }} --doc -- --help
- name: Run tests
if: ${{ matrix.rust != '1.65' }} # MSRV
run: |
cargo test --workspace --all-features --all-targets -- --nocapture
cargo test --workspace --all-features --doc -- --nocapture
cargo test --workspace ${{ matrix.flags }} --all-targets -- --nocapture
cargo test --workspace ${{ matrix.flags }} --doc -- --nocapture

feature-checks:
name: Feature checks
Expand Down
8 changes: 1 addition & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ parity-scale-codec = { version = "3", optional = true, features = [
"max-encoded-len",
], default-features = false }
primitive-types = { version = "0.12", optional = true, default-features = false }
proptest = { version = "1", optional = true, default-features = false }
proptest = { version = "1.2", optional = true, default-features = false }
pyo3 = { version = "0.19", optional = true, default-features = false }
quickcheck = { version = "1", optional = true, default-features = false }
rand = { version = "0.8", optional = true, default-features = false }
Expand All @@ -79,16 +79,10 @@ ark-bn254-03 = { version = "0.3.0", package = "ark-bn254" }
ark-bn254-04 = { version = "0.4.0", package = "ark-bn254" }

criterion = "0.5"
# clap and clap_lex, referred by criterion, have higher a MSRV ([email protected], [email protected]),
# but are only used by dev-dependencies so we can just pin them
clap = "~4.3"
clap_lex = "<=0.5.0"

rand = "0.8"

approx = "0.5"
bincode = "1.3"
coverage-helper = "0.1"
hex = "0.4"
hex-literal = "0.4"
postgres = "0.19"
Expand Down
1 change: 1 addition & 0 deletions src/bit_arr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ macro_rules! forward {
};
}

#[allow(clippy::missing_safety_doc, clippy::missing_errors_doc)]
impl<const BITS: usize, const LIMBS: usize> Bits<BITS, LIMBS> {
forward! {
fn reverse_bits(self) -> Self;
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#![cfg_attr(not(feature = "std"), no_std)]
// Unstable features
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#![cfg_attr(feature = "nightly", feature(no_coverage, core_intrinsics))]
#![cfg_attr(feature = "nightly", feature(core_intrinsics))]
#![cfg_attr(
feature = "generic_const_exprs",
feature(generic_const_exprs),
Expand Down