Skip to content

Update crates to cipher v0.4 #276

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 10, 2022
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
55 changes: 0 additions & 55 deletions .github/workflows/cfb-mode.yml

This file was deleted.

55 changes: 0 additions & 55 deletions .github/workflows/cfb8.yml

This file was deleted.

70 changes: 33 additions & 37 deletions .github/workflows/chacha20.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
strategy:
matrix:
rust:
- 1.51.0 # MSRV
- 1.56.0 # MSRV
- stable
target:
- thumbv7em-none-eabi
Expand All @@ -38,11 +38,8 @@ jobs:
target: ${{ matrix.target }}
override: true
profile: minimal
- run: cargo build --target ${{ matrix.target }} --release --no-default-features --features cipher
- run: cargo build --target ${{ matrix.target }} --release --no-default-features --features hchacha
- run: cargo build --target ${{ matrix.target }} --release --no-default-features --features legacy
- run: cargo build --target ${{ matrix.target }} --release --no-default-features --features rng
- run: cargo build --target ${{ matrix.target }} --release --no-default-features --features cipher,force-soft,legacy,rng,zeroize
- run: cargo build --target ${{ matrix.target }}
- run: cargo build --target ${{ matrix.target }} --features zeroize

# Tests for runtime AVX2 detection
autodetect:
Expand All @@ -52,15 +49,15 @@ jobs:
include:
# 32-bit Linux
- target: i686-unknown-linux-gnu
rust: 1.51.0 # MSRV
rust: 1.56.0 # MSRV
deps: sudo apt update && sudo apt install gcc-multilib
- target: i686-unknown-linux-gnu
rust: stable
deps: sudo apt update && sudo apt install gcc-multilib

# 64-bit Linux
- target: x86_64-unknown-linux-gnu
rust: 1.51.0 # MSRV
rust: 1.56.0 # MSRV
- target: x86_64-unknown-linux-gnu
rust: stable
steps:
Expand All @@ -73,31 +70,28 @@ jobs:
profile: minimal
- run: ${{ matrix.deps }}
- run: cargo check --target ${{ matrix.target }} --all-features
- run: cargo test --target ${{ matrix.target }} --release
- run: cargo test --target ${{ matrix.target }} --release --features std
- run: cargo test --target ${{ matrix.target }} --release --features rng
- run: cargo test --target ${{ matrix.target }} --release --features zeroize
- run: cargo test --target ${{ matrix.target }} --release --features std,rng,zeroize
- run: cargo test --target ${{ matrix.target }}
- run: cargo test --target ${{ matrix.target }} --features std,zeroize

# Tests for the AVX2 backend
avx2:
runs-on: ubuntu-latest
env:
RUSTFLAGS: -Ctarget-cpu=haswell -Dwarnings # Enables `avx2` target feature
RUSTFLAGS: -Ctarget-feature=+avx2 -Dwarnings
strategy:
matrix:
include:
# 32-bit Linux
- target: i686-unknown-linux-gnu
rust: 1.51.0 # MSRV
rust: 1.56.0 # MSRV
deps: sudo apt update && sudo apt install gcc-multilib
- target: i686-unknown-linux-gnu
rust: stable
deps: sudo apt update && sudo apt install gcc-multilib

# 64-bit Linux
- target: x86_64-unknown-linux-gnu
rust: 1.51.0 # MSRV
rust: 1.56.0 # MSRV
- target: x86_64-unknown-linux-gnu
rust: stable
steps:
Expand All @@ -110,30 +104,28 @@ jobs:
override: true
- run: ${{ matrix.deps }}
- run: cargo check --target ${{ matrix.target }} --all-features
- run: cargo test --target ${{ matrix.target }} --release
- run: cargo test --target ${{ matrix.target }} --release --features force-soft
- run: cargo test --target ${{ matrix.target }} --release --features std
- run: cargo test --target ${{ matrix.target }} --release --features rng
- run: cargo test --target ${{ matrix.target }} --release --features zeroize
- run: cargo test --target ${{ matrix.target }} --release --all-features
- run: cargo test --target ${{ matrix.target }}
- run: cargo test --target ${{ matrix.target }} --features std,zeroize

# Tests for the portable software backend (i.e. `force-soft`)
soft:
runs-on: ubuntu-latest
env:
RUSTFLAGS: --cfg chacha20_force_soft -Dwarnings
strategy:
matrix:
include:
# 32-bit Linux
- target: i686-unknown-linux-gnu
rust: 1.51.0 # MSRV
rust: 1.56.0 # MSRV
deps: sudo apt update && sudo apt install gcc-multilib
- target: i686-unknown-linux-gnu
rust: stable
deps: sudo apt update && sudo apt install gcc-multilib

# 64-bit Linux
- target: x86_64-unknown-linux-gnu
rust: 1.51.0 # MSRV
rust: 1.56.0 # MSRV
- target: x86_64-unknown-linux-gnu
rust: stable
steps:
Expand All @@ -146,11 +138,8 @@ jobs:
override: true
- run: ${{ matrix.deps }}
- run: cargo check --target ${{ matrix.target }} --all-features
- run: cargo test --target ${{ matrix.target }} --release --features force-soft
- run: cargo test --target ${{ matrix.target }} --release --features force-soft,std
- run: cargo test --target ${{ matrix.target }} --release --features force-soft,rng
- run: cargo test --target ${{ matrix.target }} --release --features force-soft,rng,zeroize
- run: cargo test --target ${{ matrix.target }} --release --all-features
- run: cargo test --target ${{ matrix.target }}
- run: cargo test --target ${{ matrix.target }} --features std,zeroize

# Cross-compiled tests
cross:
Expand All @@ -159,7 +148,7 @@ jobs:
include:
# ARM64
- target: aarch64-unknown-linux-gnu
rust: 1.51.0 # MSRV
rust: 1.56.0 # MSRV
- target: aarch64-unknown-linux-gnu
rust: stable

Expand All @@ -170,11 +159,15 @@ jobs:

# PPC32
- target: powerpc-unknown-linux-gnu
rust: 1.51.0 # MSRV
rust: 1.56.0 # MSRV
- target: powerpc-unknown-linux-gnu
rust: stable

runs-on: ubuntu-latest
defaults:
run:
# Cross mounts only current package, i.e. by default it ignores workspace's Cargo.toml
working-directory: .
steps:
- uses: actions/checkout@v1
- run: ${{ matrix.deps }}
Expand All @@ -184,9 +177,12 @@ jobs:
target: ${{ matrix.target }}
profile: minimal
override: true
- run: cargo install cross
- run: cross test --target ${{ matrix.target }} --release ${{ matrix.features }}
- run: cross test --target ${{ matrix.target }} --release --features force-soft
- run: cross test --target ${{ matrix.target }} --release --features rng
- run: cross test --target ${{ matrix.target }} --release --features std
- run: cross test --target ${{ matrix.target }} --release --all-features
- name: Install precompiled cross
run: |
export URL=$(curl -s https://api.github.com/repos/cross-rs/cross/releases/latest | \
jq -r '.assets[] | select(.name | contains("x86_64-unknown-linux-gnu.tar.gz")) | .browser_download_url')
wget -O /tmp/binaries.tar.gz $URL
tar -C /tmp -xzf /tmp/binaries.tar.gz
mv /tmp/cross ~/.cargo/bin
shell: bash
- run: cross test --package chacha20 --target ${{ matrix.target }} ${{ matrix.features }}
55 changes: 0 additions & 55 deletions .github/workflows/ctr.yml

This file was deleted.

10 changes: 5 additions & 5 deletions .github/workflows/hc-256.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
matrix:
rust:
- 1.41.0 # MSRV
- 1.56.0 # MSRV
- stable
target:
- thumbv7em-none-eabi
Expand All @@ -35,15 +35,15 @@ jobs:
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
override: true
- run: cargo build --release --target ${{ matrix.target }}
- run: cargo build --release --target ${{ matrix.target }} --features zeroize
- run: cargo build --target ${{ matrix.target }}
- run: cargo build --target ${{ matrix.target }} --features zeroize

test:
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- 1.41.0 # MSRV
- 1.56.0 # MSRV
- stable
steps:
- uses: actions/checkout@v1
Expand All @@ -53,4 +53,4 @@ jobs:
toolchain: ${{ matrix.rust }}
override: true
- run: cargo test
- run: cargo test --release
- run: cargo test --all-features
Loading