mirror of
https://github.com/saymrwulf/curve25519-dalek-source.git
synced 2026-09-07 20:50:39 +00:00
Add CI via Github actions.
This commit is contained in:
parent
da109a8e0f
commit
10cef49824
2 changed files with 132 additions and 1 deletions
131
.github/workflows/rust.yml
vendored
Normal file
131
.github/workflows/rust.yml
vendored
Normal file
|
|
@ -0,0 +1,131 @@
|
||||||
|
name: Rust
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ '*' ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ main, develop ]
|
||||||
|
|
||||||
|
env:
|
||||||
|
CARGO_TERM_COLOR: always
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test-u32:
|
||||||
|
name: Test u32 backend
|
||||||
|
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: --no-default-features --features "std u32_backend"
|
||||||
|
|
||||||
|
test-u64:
|
||||||
|
name: Test u64 backend
|
||||||
|
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: --no-default-features --features "std u64_backend"
|
||||||
|
|
||||||
|
test-simd:
|
||||||
|
name: Test simd backend (nightly)
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
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 with u32 backend
|
||||||
|
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 u32_backend"
|
||||||
|
|
||||||
|
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:
|
||||||
|
name: Current MSRV is 1.41
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
profile: minimal
|
||||||
|
toolchain: 1.41
|
||||||
|
override: true
|
||||||
|
- uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: build
|
||||||
|
|
||||||
|
bench:
|
||||||
|
name: Check that benchmarks compile
|
||||||
|
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: bench
|
||||||
|
# This filter selects no benchmarks, so we don't run any, only build them.
|
||||||
|
args: --features "batch" "DONTRUNBENCHMARKS"
|
||||||
|
|
@ -30,7 +30,7 @@ rand_core = { version = "0.5", default-features = false, optional = true }
|
||||||
serde_crate = { package = "serde", version = "1.0", default-features = false, optional = true }
|
serde_crate = { package = "serde", version = "1.0", default-features = false, optional = true }
|
||||||
serde_bytes = { version = "0.11", default-features = false, optional = true }
|
serde_bytes = { version = "0.11", default-features = false, optional = true }
|
||||||
sha2 = { version = "0.9", default-features = false }
|
sha2 = { version = "0.9", default-features = false }
|
||||||
zeroize = { version = "1", default-features = false, features = ["zeroize_derive"] }
|
zeroize = { version = "~1.3", default-features = false, features = ["zeroize_derive"] }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
hex = "^0.4"
|
hex = "^0.4"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue