Skip to content

Commit

Permalink
crypto_box: add cross tests in CI (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
tarcieri authored Aug 14, 2022
1 parent f6852b2 commit c27e7e0
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 6 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/crypto_box.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: crypto_box
on:
pull_request:
paths:
- ".github/workflows/crypto_box.yml"
- "crypto_box/**"
- "Cargo.*"
push:
Expand Down Expand Up @@ -55,3 +56,26 @@ jobs:
- run: cargo test --release --no-default-features
- run: cargo test --release
- run: cargo test --release --all-features

cross:
strategy:
matrix:
include:
- target: armv7-unknown-linux-gnueabihf
rust: stable
- target: aarch64-unknown-linux-gnu
rust: stable
- target: powerpc-unknown-linux-gnu
rust: stable
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: ${{ matrix.deps }}
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
override: true
- run: cargo install cross
- run: cross test --release --target ${{ matrix.target }} --all-features
6 changes: 3 additions & 3 deletions crypto_box/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ salsa20 = "0.10"
xsalsa20poly1305 = { version = "0.9", default-features = false, features = ["rand_core"] }
zeroize = { version = "1", default-features = false }

# optional dependencies
serdect = { version = "0.1", optional = true, default-features = false }

[target.'cfg(target_pointer_width = "32")'.dependencies]
x25519-dalek = { version = "1", default-features = false, features = ["u32_backend"] }

[target.'cfg(target_pointer_width = "64")'.dependencies]
x25519-dalek = { version = "1", default-features = false, features = ["u64_backend"] }

# optional dependencies
serdect = { version = "0.1", optional = true, default-features = false }

[dev-dependencies]
bincode = "1"
rand = "0.8"
Expand Down
6 changes: 3 additions & 3 deletions crypto_kx/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ rust-version = "1.56"
blake2 = { version = "0.10", default-features = false }
rand_core = "0.6"

# optional dependencies
serdect = { version = "0.1", optional = true, default-features = false }

[target.'cfg(target_pointer_width = "32")'.dependencies]
x25519-dalek = { version = "1", default-features = false, features = ["u32_backend"] }

[target.'cfg(target_pointer_width = "64")'.dependencies]
x25519-dalek = { version = "1", default-features = false, features = ["u64_backend"] }

# optional dependencies
serdect = { version = "0.1", optional = true, default-features = false }

[target.'cfg(target_family = "wasm")'.dependencies]
getrandom = { version = "0.2", default-features = false, features = ["js"] }

Expand Down

0 comments on commit c27e7e0

Please sign in to comment.