Re-work CI around workspace
Co-authored-by: Michael Rosenberg <michael@mrosenberg.pub>
This commit is contained in:
parent
6e422d96d7
commit
7db9981a7f
44
.github/workflows/cross.yml
vendored
Normal file
44
.github/workflows/cross.yml
vendored
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
name: Cross
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ '**' ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ '**' ]
|
||||||
|
|
||||||
|
env:
|
||||||
|
CARGO_TERM_COLOR: always
|
||||||
|
RUSTFLAGS: '-D warnings'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
test-cross:
|
||||||
|
name: Test
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
# ARM32
|
||||||
|
- target: armv7-unknown-linux-gnueabihf
|
||||||
|
rust: stable
|
||||||
|
|
||||||
|
# ARM64
|
||||||
|
- target: aarch64-unknown-linux-gnu
|
||||||
|
rust: stable
|
||||||
|
|
||||||
|
# PPC32
|
||||||
|
- target: powerpc-unknown-linux-gnu
|
||||||
|
rust: stable
|
||||||
|
|
||||||
|
# TODO: We only test x/ed/curve for cross as derive is platform specifics
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- run: ${{ matrix.deps }}
|
||||||
|
- uses: dtolnay/rust-toolchain@master
|
||||||
|
with:
|
||||||
|
toolchain: ${{ matrix.rust }}
|
||||||
|
targets: ${{ matrix.target }}
|
||||||
|
- uses: RustCrypto/actions/cross-install@master
|
||||||
|
- run: cross test -p curve25519-dalek --release --target ${{ matrix.target }}
|
||||||
|
- run: cross test -p ed25519-dalek --release --target ${{ matrix.target }}
|
||||||
|
- run: cross test -p x25519-dalek --release --target ${{ matrix.target }}
|
131
.github/workflows/curve25519-dalek.yml
vendored
131
.github/workflows/curve25519-dalek.yml
vendored
@ -1,45 +1,25 @@
|
|||||||
name: Rust
|
name: curve25519 Rust
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ '**' ]
|
branches: [ '**' ]
|
||||||
|
paths: 'curve25519-dalek/**'
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ '**' ]
|
branches: [ '**' ]
|
||||||
|
paths: 'curve25519-dalek/**'
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: curve25519-dalek
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
RUSTFLAGS: '-D warnings'
|
RUSTFLAGS: '-D warnings'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test-auto:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
# 32-bit target
|
|
||||||
- target: i686-unknown-linux-gnu
|
|
||||||
deps: sudo apt update && sudo apt install gcc-multilib
|
|
||||||
|
|
||||||
# 64-bit target
|
|
||||||
- target: x86_64-unknown-linux-gnu
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
|
||||||
- run: rustup target add ${{ matrix.target }}
|
|
||||||
- run: ${{ matrix.deps }}
|
|
||||||
- run: cargo test --target ${{ matrix.target }} --no-default-features
|
|
||||||
- run: cargo test --target ${{ matrix.target }} --no-default-features --features alloc
|
|
||||||
- run: cargo test --target ${{ matrix.target }} --no-default-features --features digest
|
|
||||||
- run: cargo test --target ${{ matrix.target }} --no-default-features --features precomputed-tables
|
|
||||||
- run: cargo test --target ${{ matrix.target }} --no-default-features --features rand_core
|
|
||||||
- run: cargo test --target ${{ matrix.target }} --no-default-features --features serde
|
|
||||||
- run: cargo test --target ${{ matrix.target }} --no-default-features --features zeroize
|
|
||||||
- run: cargo test --target ${{ matrix.target }}
|
|
||||||
- run: cargo test --target ${{ matrix.target }} --features digest
|
|
||||||
- run: cargo test --target ${{ matrix.target }} --features rand_core
|
|
||||||
- run: cargo test --target ${{ matrix.target }} --features serde
|
|
||||||
|
|
||||||
test-fiat:
|
test-fiat:
|
||||||
|
name: Test fiat backend
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
@ -60,6 +40,7 @@ jobs:
|
|||||||
run: cargo test --target ${{ matrix.target }}
|
run: cargo test --target ${{ matrix.target }}
|
||||||
|
|
||||||
test-serial:
|
test-serial:
|
||||||
|
name: Test serial backend
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
@ -90,19 +71,6 @@ jobs:
|
|||||||
targets: wasm32-unknown-unknown,x86_64-unknown-linux-gnu,i686-unknown-linux-gnu
|
targets: wasm32-unknown-unknown,x86_64-unknown-linux-gnu,i686-unknown-linux-gnu
|
||||||
- run: bash tests/build_tests.sh
|
- run: bash tests/build_tests.sh
|
||||||
|
|
||||||
build-nostd:
|
|
||||||
name: Build on no_std target (thumbv7em-none-eabi)
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- uses: dtolnay/rust-toolchain@master
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
targets: thumbv7em-none-eabi
|
|
||||||
- run: cargo build --target thumbv7em-none-eabi --release --no-default-features
|
|
||||||
- run: cargo build --target thumbv7em-none-eabi --release
|
|
||||||
- run: cargo build --target thumbv7em-none-eabi --release --features serde
|
|
||||||
|
|
||||||
test-simd-nightly:
|
test-simd-nightly:
|
||||||
name: Test simd backend (nightly)
|
name: Test simd backend (nightly)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -132,70 +100,6 @@ jobs:
|
|||||||
RUSTFLAGS: '-C target_feature=+avx2'
|
RUSTFLAGS: '-C target_feature=+avx2'
|
||||||
run: cargo test --no-default-features --features alloc,precomputed-tables,zeroize --target x86_64-unknown-linux-gnu
|
run: cargo test --no-default-features --features alloc,precomputed-tables,zeroize --target x86_64-unknown-linux-gnu
|
||||||
|
|
||||||
build-docs:
|
|
||||||
name: Build docs
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- uses: dtolnay/rust-toolchain@nightly
|
|
||||||
- run: make doc
|
|
||||||
- run: make doc-internal
|
|
||||||
|
|
||||||
cross:
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
# ARM32
|
|
||||||
- target: armv7-unknown-linux-gnueabihf
|
|
||||||
rust: stable
|
|
||||||
|
|
||||||
# ARM64
|
|
||||||
- target: aarch64-unknown-linux-gnu
|
|
||||||
rust: stable
|
|
||||||
|
|
||||||
# PPC32
|
|
||||||
- target: powerpc-unknown-linux-gnu
|
|
||||||
rust: stable
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- run: ${{ matrix.deps }}
|
|
||||||
- uses: dtolnay/rust-toolchain@master
|
|
||||||
with:
|
|
||||||
toolchain: ${{ matrix.rust }}
|
|
||||||
targets: ${{ matrix.target }}
|
|
||||||
- uses: RustCrypto/actions/cross-install@master
|
|
||||||
- run: cross test --release --target ${{ matrix.target }}
|
|
||||||
|
|
||||||
nightly:
|
|
||||||
name: Test nightly compiler
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- uses: dtolnay/rust-toolchain@nightly
|
|
||||||
- run: cargo test
|
|
||||||
|
|
||||||
clippy:
|
|
||||||
name: Check that clippy is happy
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- uses: dtolnay/rust-toolchain@nightly
|
|
||||||
with:
|
|
||||||
components: clippy
|
|
||||||
- run: cargo clippy --target x86_64-unknown-linux-gnu
|
|
||||||
|
|
||||||
rustfmt:
|
|
||||||
name: Check formatting
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
|
||||||
with:
|
|
||||||
components: rustfmt
|
|
||||||
- run: cargo fmt --all -- --check
|
|
||||||
|
|
||||||
msrv:
|
msrv:
|
||||||
name: Current MSRV is 1.60.0
|
name: Current MSRV is 1.60.0
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -211,20 +115,3 @@ jobs:
|
|||||||
- run: cargo build --no-default-features --features serde
|
- run: cargo build --no-default-features --features serde
|
||||||
# Also make sure the AVX2 build works
|
# Also make sure the AVX2 build works
|
||||||
- run: cargo build --target x86_64-unknown-linux-gnu
|
- run: cargo build --target x86_64-unknown-linux-gnu
|
||||||
|
|
||||||
bench:
|
|
||||||
name: Check that benchmarks compile
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
|
||||||
- name: Build u32 bench
|
|
||||||
env:
|
|
||||||
RUSTFLAGS: '--cfg curve25519_dalek_bits="32"'
|
|
||||||
run: cargo build --benches
|
|
||||||
- name: Build u64 bench
|
|
||||||
env:
|
|
||||||
RUSTFLAGS: '--cfg curve25519_dalek_bits="64"'
|
|
||||||
run: cargo build --benches
|
|
||||||
- name: Build default (host native) bench
|
|
||||||
run: cargo build --benches
|
|
||||||
|
100
.github/workflows/ed25519-dalek.yml
vendored
100
.github/workflows/ed25519-dalek.yml
vendored
@ -1,10 +1,16 @@
|
|||||||
name: Rust
|
name: ed25519 Rust
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ '**' ]
|
branches: [ '**' ]
|
||||||
|
paths: 'ed25519-dalek/**'
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ '**' ]
|
branches: [ '**' ]
|
||||||
|
paths: 'ed25519-dalek/**'
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: ed25519-dalek
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
@ -12,47 +18,6 @@ env:
|
|||||||
RUSTDOCFLAGS: '-D warnings'
|
RUSTDOCFLAGS: '-D warnings'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
# 32-bit target
|
|
||||||
- target: i686-unknown-linux-gnu
|
|
||||||
deps: sudo apt update && sudo apt install gcc-multilib
|
|
||||||
# 64-bit target
|
|
||||||
- target: x86_64-unknown-linux-gnu
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
|
||||||
- run: rustup target add ${{ matrix.target }}
|
|
||||||
- run: ${{ matrix.deps }}
|
|
||||||
- run: cargo test --target ${{ matrix.target }} --no-default-features --lib --tests
|
|
||||||
- run: cargo test --target ${{ matrix.target }} --no-default-features --features alloc --lib
|
|
||||||
- run: cargo test --target ${{ matrix.target }} --no-default-features --features fast --lib
|
|
||||||
- run: cargo test --target ${{ matrix.target }} --no-default-features --features rand_core --lib --tests
|
|
||||||
- run: cargo test --target ${{ matrix.target }} --no-default-features --features alloc,rand_core --lib --tests
|
|
||||||
- run: cargo test --target ${{ matrix.target }} --no-default-features --features fast,rand_core --lib --tests
|
|
||||||
- run: cargo test --target ${{ matrix.target }} --no-default-features --features alloc,fast,rand_core --lib --tests
|
|
||||||
- run: cargo test --target ${{ matrix.target }}
|
|
||||||
- run: cargo test --target ${{ matrix.target }} --features batch
|
|
||||||
- run: cargo test --target ${{ matrix.target }} --features digest,rand_core
|
|
||||||
- run: cargo test --target ${{ matrix.target }} --features serde
|
|
||||||
- run: cargo test --target ${{ matrix.target }} --features pem
|
|
||||||
- run: cargo test --target ${{ matrix.target }} --all-features
|
|
||||||
|
|
||||||
build-simd:
|
|
||||||
name: Test simd backend (nightly)
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- uses: dtolnay/rust-toolchain@nightly
|
|
||||||
- env:
|
|
||||||
RUSTFLAGS: '--cfg curve25519_dalek_backend="simd" -C target_feature=+avx2'
|
|
||||||
run: cargo build --target x86_64-unknown-linux-gnu
|
|
||||||
- env:
|
|
||||||
RUSTFLAGS: '--cfg curve25519_dalek_backend="simd" -C target_feature=+avx512ifma'
|
|
||||||
run: cargo build --target x86_64-unknown-linux-gnu
|
|
||||||
|
|
||||||
msrv:
|
msrv:
|
||||||
name: Current MSRV is 1.60.0
|
name: Current MSRV is 1.60.0
|
||||||
@ -69,54 +34,3 @@ jobs:
|
|||||||
# deps and the stated MSRV
|
# deps and the stated MSRV
|
||||||
- uses: dtolnay/rust-toolchain@1.60.0
|
- uses: dtolnay/rust-toolchain@1.60.0
|
||||||
- run: cargo build
|
- run: cargo build
|
||||||
|
|
||||||
build-nostd:
|
|
||||||
name: Build on no_std target (thumbv7em-none-eabi)
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- uses: dtolnay/rust-toolchain@master
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
targets: thumbv7em-none-eabi
|
|
||||||
- uses: taiki-e/install-action@cargo-hack
|
|
||||||
# No default features build
|
|
||||||
- run: cargo build --target thumbv7em-none-eabi --release --no-default-features
|
|
||||||
- run: cargo hack build --target thumbv7em-none-eabi --release --each-feature --exclude-features default,std
|
|
||||||
|
|
||||||
bench:
|
|
||||||
name: Check that benchmarks compile
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
|
||||||
- run: cargo build --benches --features batch
|
|
||||||
|
|
||||||
rustfmt:
|
|
||||||
name: Check formatting
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
|
||||||
with:
|
|
||||||
components: rustfmt
|
|
||||||
- run: cargo fmt --all -- --check
|
|
||||||
|
|
||||||
clippy:
|
|
||||||
name: Check that clippy is happy
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- uses: dtolnay/rust-toolchain@1.65
|
|
||||||
with:
|
|
||||||
components: clippy
|
|
||||||
- run: cargo clippy
|
|
||||||
|
|
||||||
doc:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
- run: cargo doc --all-features
|
|
||||||
|
35
.github/workflows/no_std.yml
vendored
Normal file
35
.github/workflows/no_std.yml
vendored
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
name: no_std
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ '**' ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ '**' ]
|
||||||
|
|
||||||
|
env:
|
||||||
|
CARGO_TERM_COLOR: always
|
||||||
|
RUSTFLAGS: '-D warnings'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
build-nostd:
|
||||||
|
name: Build on no_std target (thumbv7em-none-eabi)
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- crate: curve25519-dalek
|
||||||
|
- crate: ed25519-dalek
|
||||||
|
- crate: x25519-dalek
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: dtolnay/rust-toolchain@master
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
targets: thumbv7em-none-eabi
|
||||||
|
- uses: taiki-e/install-action@cargo-hack
|
||||||
|
# No default features build
|
||||||
|
- name: no_std / no feat ${{ matrix.crate }}
|
||||||
|
run: cargo build -p ${{ matrix.crate }} --target thumbv7em-none-eabi --release --no-default-features
|
||||||
|
- name: no_std / cargo hack ${{ matrix.crate }}
|
||||||
|
run: cargo hack build -p ${{ matrix.crate }} --target thumbv7em-none-eabi --release --each-feature --exclude-features default,std,getrandom
|
88
.github/workflows/workspace.yml
vendored
Normal file
88
.github/workflows/workspace.yml
vendored
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
name: All
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ '**' ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ '**' ]
|
||||||
|
|
||||||
|
env:
|
||||||
|
CARGO_TERM_COLOR: always
|
||||||
|
RUSTFLAGS: '-D warnings'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test-stable:
|
||||||
|
name: Test 32/64 bit stable
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
# 32-bit target
|
||||||
|
- target: i686-unknown-linux-gnu
|
||||||
|
deps: sudo apt update && sudo apt install gcc-multilib
|
||||||
|
|
||||||
|
# 64-bit target
|
||||||
|
- target: x86_64-unknown-linux-gnu
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
|
- run: rustup target add ${{ matrix.target }}
|
||||||
|
- run: ${{ matrix.deps }}
|
||||||
|
- run: cargo test --target ${{ matrix.target }} --no-default-features
|
||||||
|
- run: cargo test --target ${{ matrix.target }}
|
||||||
|
- run: cargo test --target ${{ matrix.target }} --all-features
|
||||||
|
|
||||||
|
test-nightly:
|
||||||
|
name: Test Nightly
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: dtolnay/rust-toolchain@nightly
|
||||||
|
- run: cargo test
|
||||||
|
|
||||||
|
bench:
|
||||||
|
name: Check that benchmarks compile
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
|
- name: Build u32 bench
|
||||||
|
env:
|
||||||
|
RUSTFLAGS: '--cfg curve25519_dalek_bits="32"'
|
||||||
|
run: cargo build --benches
|
||||||
|
- name: Build u64 bench
|
||||||
|
env:
|
||||||
|
RUSTFLAGS: '--cfg curve25519_dalek_bits="64"'
|
||||||
|
run: cargo build --benches
|
||||||
|
- name: Build default (host native) bench
|
||||||
|
run: cargo build --benches
|
||||||
|
|
||||||
|
clippy:
|
||||||
|
name: Check that clippy is happy
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: dtolnay/rust-toolchain@nightly
|
||||||
|
with:
|
||||||
|
components: clippy
|
||||||
|
- run: cargo clippy --target x86_64-unknown-linux-gnu
|
||||||
|
|
||||||
|
rustfmt:
|
||||||
|
name: Check formatting
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
|
with:
|
||||||
|
components: rustfmt
|
||||||
|
- run: cargo fmt --all -- --check
|
||||||
|
|
||||||
|
doc:
|
||||||
|
name: Check docs
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
- run: cargo doc --all-features
|
110
.github/workflows/x25519-dalek.yml
vendored
110
.github/workflows/x25519-dalek.yml
vendored
@ -1,10 +1,16 @@
|
|||||||
name: Rust
|
name: x25519 Rust
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ '**' ]
|
branches: [ '**' ]
|
||||||
|
paths: 'x25519-dalek/**'
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ '**' ]
|
branches: [ '**' ]
|
||||||
|
paths: 'x25519-dalek/**'
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: x25519-dalek
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
@ -12,41 +18,6 @@ env:
|
|||||||
RUSTDOCFLAGS: '-D warnings'
|
RUSTDOCFLAGS: '-D warnings'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
|
||||||
name: Test with multiple feature combinations
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
# 32-bit target
|
|
||||||
- target: i686-unknown-linux-gnu
|
|
||||||
deps: sudo apt update && sudo apt install gcc-multilib
|
|
||||||
# 64-bit target
|
|
||||||
- target: x86_64-unknown-linux-gnu
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
|
||||||
with:
|
|
||||||
target: ${{ matrix.target }}
|
|
||||||
- run: ${{ matrix.deps }}
|
|
||||||
- run: cargo test --target ${{ matrix.target }} --no-default-features
|
|
||||||
- run: cargo test --target ${{ matrix.target }} --no-default-features --features reusable_secrets
|
|
||||||
- run: cargo test --target ${{ matrix.target }} --no-default-features --features static_secrets
|
|
||||||
- run: cargo test --target ${{ matrix.target }}
|
|
||||||
- run: cargo test --target ${{ matrix.target }} --all-features
|
|
||||||
|
|
||||||
build-simd:
|
|
||||||
name: Test simd backend (nightly)
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- uses: dtolnay/rust-toolchain@nightly
|
|
||||||
- env:
|
|
||||||
RUSTFLAGS: '--cfg curve25519_dalek_backend="simd" -C target_feature=+avx2'
|
|
||||||
run: cargo build --target x86_64-unknown-linux-gnu
|
|
||||||
- env:
|
|
||||||
RUSTFLAGS: '--cfg curve25519_dalek_backend="simd" -C target_feature=+avx512ifma'
|
|
||||||
run: cargo build --target x86_64-unknown-linux-gnu
|
|
||||||
|
|
||||||
msrv:
|
msrv:
|
||||||
name: Current MSRV is 1.60.0
|
name: Current MSRV is 1.60.0
|
||||||
@ -63,70 +34,3 @@ jobs:
|
|||||||
# deps and the stated MSRV
|
# deps and the stated MSRV
|
||||||
- uses: dtolnay/rust-toolchain@1.60.0
|
- uses: dtolnay/rust-toolchain@1.60.0
|
||||||
- run: cargo build
|
- run: cargo build
|
||||||
|
|
||||||
# no_std support is pending feature, tracking:
|
|
||||||
# https://github.com/dalek-cryptography/x25519-dalek/issues/111
|
|
||||||
# # Test no_std integration with no features
|
|
||||||
# build-nostd-base:
|
|
||||||
# name: Build on no_std target (thumbv7em-none-eabi)
|
|
||||||
# runs-on: ubuntu-latest
|
|
||||||
# steps:
|
|
||||||
# - uses: actions/checkout@v3
|
|
||||||
# - uses: dtolnay/rust-toolchain@master
|
|
||||||
# with:
|
|
||||||
# toolchain: stable
|
|
||||||
# targets: thumbv7em-none-eabi
|
|
||||||
# - uses: taiki-e/install-action@cargo-hack
|
|
||||||
# # No default features build
|
|
||||||
# - run: cargo build --target thumbv7em-none-eabi --release --no-default-features
|
|
||||||
#
|
|
||||||
# # Test no_std integration with all no_std features
|
|
||||||
# build-nostd-features:
|
|
||||||
# name: Build on no_std target (thumbv7em-none-eabi)
|
|
||||||
# runs-on: ubuntu-latest
|
|
||||||
# steps:
|
|
||||||
# - uses: actions/checkout@v3
|
|
||||||
# - uses: dtolnay/rust-toolchain@master
|
|
||||||
# with:
|
|
||||||
# toolchain: stable
|
|
||||||
# targets: thumbv7em-none-eabi
|
|
||||||
# - uses: taiki-e/install-action@cargo-hack
|
|
||||||
# # No default features build
|
|
||||||
# - run: cargo hack build --target thumbv7em-none-eabi --release --each-feature --exclude-features default,std
|
|
||||||
|
|
||||||
bench:
|
|
||||||
name: Check that benchmarks compile
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
|
||||||
- run: cargo build --benches
|
|
||||||
|
|
||||||
rustfmt:
|
|
||||||
name: Check formatting
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
|
||||||
with:
|
|
||||||
components: rustfmt
|
|
||||||
- run: cargo fmt --all -- --check
|
|
||||||
|
|
||||||
clippy:
|
|
||||||
name: Check that clippy is happy
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- uses: dtolnay/rust-toolchain@1.65
|
|
||||||
with:
|
|
||||||
components: clippy
|
|
||||||
- run: cargo clippy
|
|
||||||
|
|
||||||
doc:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
- run: cargo doc --all-features
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user