Tune up CI configuration (#227)
- Consolidate `test` jobs: this allows reusing intermediate artifacts between tests which should improve build times, and also make it easier to test additional features in the future - Switch to `dtolnay/rust-toolchain` for setting up toolchain - Bump checkout to `actions/checkout@3` - Switch to `run` directives for invoking Cargo: it's more straightforward to just call Cargo than use a DSL from an unmaintained action, and eliminates the 3rd party dependency
This commit is contained in:
parent
d4cffc7d05
commit
a03c7a3f0f
95
.github/workflows/rust.yml
vendored
95
.github/workflows/rust.yml
vendored
@ -19,7 +19,6 @@ jobs:
|
|||||||
# 32-bit target
|
# 32-bit target
|
||||||
- target: i686-unknown-linux-gnu
|
- target: i686-unknown-linux-gnu
|
||||||
deps: sudo apt update && sudo apt install gcc-multilib
|
deps: sudo apt update && sudo apt install gcc-multilib
|
||||||
|
|
||||||
# 64-bit target
|
# 64-bit target
|
||||||
- target: x86_64-unknown-linux-gnu
|
- target: x86_64-unknown-linux-gnu
|
||||||
steps:
|
steps:
|
||||||
@ -27,94 +26,38 @@ jobs:
|
|||||||
- uses: dtolnay/rust-toolchain@stable
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
- run: rustup target add ${{ matrix.target }}
|
- run: rustup target add ${{ matrix.target }}
|
||||||
- run: ${{ matrix.deps }}
|
- run: ${{ matrix.deps }}
|
||||||
|
- run: cargo test --target ${{ matrix.target }} --no-default-features --features alloc
|
||||||
- run: cargo test --target ${{ matrix.target }}
|
- run: cargo test --target ${{ matrix.target }}
|
||||||
|
- run: cargo test --target ${{ matrix.target }} --features batch
|
||||||
|
- run: cargo test --target ${{ matrix.target }} --features batch_deterministic
|
||||||
|
- run: cargo test --target ${{ matrix.target }} --features serde
|
||||||
|
|
||||||
test-simd:
|
test-simd:
|
||||||
name: Test simd backend (nightly)
|
name: Test simd backend (nightly)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: dtolnay/rust-toolchain@nightly
|
||||||
with:
|
- run: cargo test --features simd_backend
|
||||||
profile: minimal
|
|
||||||
toolchain: nightly
|
|
||||||
override: true
|
|
||||||
- uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: test
|
|
||||||
args: --no-default-features --features "std nightly simd_backend"
|
|
||||||
|
|
||||||
test-defaults-serde:
|
|
||||||
name: Test default feature selection and serde
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
profile: minimal
|
|
||||||
toolchain: stable
|
|
||||||
override: true
|
|
||||||
- uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: test
|
|
||||||
args: --features "serde"
|
|
||||||
|
|
||||||
test-alloc-u32:
|
|
||||||
name: Test no_std+alloc
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
profile: minimal
|
|
||||||
toolchain: stable
|
|
||||||
override: true
|
|
||||||
- uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: test
|
|
||||||
args: --lib --no-default-features --features "alloc"
|
|
||||||
|
|
||||||
test-batch-deterministic:
|
|
||||||
name: Test deterministic batch verification
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
profile: minimal
|
|
||||||
toolchain: stable
|
|
||||||
override: true
|
|
||||||
- uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: test
|
|
||||||
args: --features "batch_deterministic"
|
|
||||||
|
|
||||||
msrv:
|
msrv:
|
||||||
name: Current MSRV is 1.56.1
|
name: Current MSRV is 1.56.1
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- uses: actions-rs/toolchain@v1
|
# First run `cargo +nightly -Z minimal-verisons check` in order to get a
|
||||||
with:
|
# Cargo.lock with the oldest possible deps
|
||||||
profile: minimal
|
- uses: dtolnay/rust-toolchain@nightly
|
||||||
toolchain: 1.56.1
|
- run: cargo -Z minimal-versions check --no-default-features --features serde
|
||||||
override: true
|
# Now check that `cargo build` works with respect to the oldest possible
|
||||||
- uses: actions-rs/cargo@v1
|
# deps and the stated MSRV
|
||||||
with:
|
- uses: dtolnay/rust-toolchain@1.56.1
|
||||||
command: build
|
- run: cargo build
|
||||||
|
|
||||||
bench:
|
bench:
|
||||||
name: Check that benchmarks compile
|
name: Check that benchmarks compile
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
- run: cargo build --benches --features batch
|
||||||
profile: minimal
|
|
||||||
toolchain: stable
|
|
||||||
override: true
|
|
||||||
- uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: bench
|
|
||||||
# This filter selects no benchmarks, so we don't run any, only build them.
|
|
||||||
args: --features "batch" "nonexistentbenchmark"
|
|
||||||
|
@ -44,9 +44,7 @@ toml = { version = "0.5" }
|
|||||||
[[bench]]
|
[[bench]]
|
||||||
name = "ed25519_benchmarks"
|
name = "ed25519_benchmarks"
|
||||||
harness = false
|
harness = false
|
||||||
# This doesn't seem to work with criterion, cf. https://github.com/bheisler/criterion.rs/issues/344
|
required-features = ["batch"]
|
||||||
# For now, we have to bench by doing `cargo bench --features="batch"`.
|
|
||||||
# required-features = ["batch"]
|
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["std", "rand"]
|
default = ["std", "rand"]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user