forked from dalek-cryptography/curve25519-dalek
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Michael Rosenberg <[email protected]>
- Loading branch information
1 parent
6e422d9
commit 7db9981
Showing
6 changed files
with
190 additions
and
318 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,23 @@ | ||
name: Rust | ||
name: ed25519 Rust | ||
|
||
on: | ||
push: | ||
branches: [ '**' ] | ||
paths: 'ed25519-dalek/**' | ||
pull_request: | ||
branches: [ '**' ] | ||
paths: 'ed25519-dalek/**' | ||
|
||
defaults: | ||
run: | ||
working-directory: ed25519-dalek | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
RUSTFLAGS: '-D warnings' | ||
RUSTDOCFLAGS: '-D warnings' | ||
|
||
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: | ||
name: Current MSRV is 1.60.0 | ||
|
@@ -69,54 +34,3 @@ jobs: | |
# deps and the stated MSRV | ||
- uses: dtolnay/[email protected] | ||
- 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/[email protected] | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
Oops, something went wrong.