Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 39 additions & 5 deletions .github/workflows/aes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ jobs:
target: ${{ matrix.target }}
profile: minimal
override: true
- run: cargo check --all-features
- run: cargo check --features compact,ctr,force-soft
- run: cargo build --release --target ${{ matrix.target }}
- run: cargo build --release --target ${{ matrix.target }} --features compact
- run: cargo build --release --target ${{ matrix.target }} --features ctr
- run: cargo build --release --target ${{ matrix.target }} --features force-soft
- run: cargo build --release --target ${{ matrix.target }} --all-features
- run: cargo build --release --target ${{ matrix.target }} --features compact,ctr,force-soft

# Tests for the AES-NI backend
aesni:
Expand Down Expand Up @@ -79,7 +79,6 @@ jobs:
- run: cargo test --release --target ${{ matrix.target }} --features compact
- run: cargo test --release --target ${{ matrix.target }} --features ctr
- run: cargo test --release --target ${{ matrix.target }} --features force-soft
- run: cargo test --release --target ${{ matrix.target }} --all-features

# Tests for CPU feature autodetection with fallback to portable software implementation
autodetect:
Expand Down Expand Up @@ -144,7 +143,7 @@ jobs:
- run: cargo test --release --target ${{ matrix.target }} --features force-soft
- run: cargo test --release --target ${{ matrix.target }} --features force-soft,compact
- run: cargo test --release --target ${{ matrix.target }} --features force-soft,ctr
- run: cargo test --release --target ${{ matrix.target }} --all-features
- run: cargo build --release --target ${{ matrix.target }} --features compact,ctr,force-soft

# Cross-compiled tests
cross:
Expand All @@ -162,7 +161,6 @@ jobs:
rust: 1.49.0 # MSRV
- target: powerpc-unknown-linux-gnu
rust: stable

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
Expand All @@ -178,4 +176,40 @@ jobs:
- run: cross test --release --target ${{ matrix.target }} --features compact
- run: cross test --release --target ${{ matrix.target }} --features ctr
- run: cross test --release --target ${{ matrix.target }} --features force-soft
- run: cross test --release --target ${{ matrix.target }} --features compact,ctr,force-soft

# ARMv8 cross-compiled tests for AES intrinsics (nightly-only)
armv8:
strategy:
matrix:
include:
- target: aarch64-unknown-linux-gnu
rust: nightly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- run: ${{ matrix.deps }}
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
profile: minimal
override: true
- run: cargo install cross
- run: cross test --release --target ${{ matrix.target }}
- run: cross test --release --target ${{ matrix.target }} --features armv8,compact
- run: cross test --release --target ${{ matrix.target }} --features armv8,ctr
- run: cross test --release --target ${{ matrix.target }} --features armv8,force-soft
- run: cross test --release --target ${{ matrix.target }} --all-features

clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.49.0 # MSRV
components: clippy
override: true
profile: minimal
- run: cargo clippy --features compact,ctr,force-soft -- -D warnings
2 changes: 1 addition & 1 deletion .github/workflows/workspace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
components: clippy
override: true
profile: minimal
- run: cargo clippy --all --all-features -- -D warnings
- run: cargo clippy --all --exclude aes --all-features -- -D warnings

rustfmt:
runs-on: ubuntu-latest
Expand Down
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
/target/
aes/aesni/target/
aes/aes/target/
target/
5 changes: 3 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

114 changes: 114 additions & 0 deletions aes/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions aes/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@ opaque-debug = "0.3"

[dev-dependencies]
cipher = { version = "0.3", features = ["dev"] }
hex-literal = "0.2"

[target.'cfg(any(target_arch = "x86_64", target_arch = "x86"))'.dependencies]
cpufeatures = "0.1"
[target.'cfg(any(target_arch = "aarch64", target_arch = "x86_64", target_arch = "x86"))'.dependencies]
cpufeatures = "0.1.4"

[features]
compact = [] # Reduce code size at the cost of slower performance
armv8 = [] # Enable ARMv8 AES intrinsics (nightly-only)
compact = [] # Reduce code size at the cost of slower performance
force-soft = [] # Disable support for AES hardware intrinsics

[package.metadata.docs.rs]
Expand Down
Loading