Skip to content

RSA Key Generation Support #20

RSA Key Generation Support

RSA Key Generation Support #20

Workflow file for this run

name: tests
on:
push:
branches: [ main ]
pull_request:
branches:
- '*'
env:
RUST_BACKTRACE: 1
# We can pin the version if nightly is too unstable.
# Otherwise, we test against the latest version.
RUST_NIGHTLY_TOOLCHAIN: nightly
jobs:
sys-crate-tests:
name: sys crate tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-12 ]
features: [ aws-lc-sys, aws-lc-fips-sys ]
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- uses: dtolnay/rust-toolchain@stable
id: toolchain
- name: Set Rust toolchain override
run: rustup override set ${{ steps.toolchain.outputs.name }}
- name: Run cargo test
working-directory: ./sys-testing
run: cargo test --features ${{ matrix.features }} --no-default-features
- name: Run cargo run
working-directory: ./sys-testing
run: cargo run --features ${{ matrix.features }} --no-default-features
aws-lc-rs-test:
name: aws-lc-rs tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
rust: [ stable ]
os: [ ubuntu-latest, macos-12, macos-13-xlarge ]
args:
- --all-targets --features unstable
- --release --all-targets --features unstable
- --no-default-features --features non-fips,unstable
- --no-default-features --features non-fips,ring-io,unstable
- --no-default-features --features non-fips,ring-sig-verify,unstable
- --no-default-features --features non-fips,alloc,unstable
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- uses: dtolnay/rust-toolchain@master
id: toolchain
with:
toolchain: ${{ matrix.rust }}
- name: Set Rust toolchain override
run: rustup override set ${{ steps.toolchain.outputs.name }}
- name: Run cargo test
working-directory: ./aws-lc-rs
run: cargo test ${{ matrix.args }}
- name: Run extra tests
working-directory: ./aws-lc-rs-testing
run: cargo test --all-targets
bindgen-test:
name: aws-lc-rs bindgen-tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
rust: [ stable ]
os: [ ubuntu-latest, macos-12, macos-13-xlarge ]
args:
- --no-default-features --features aws-lc-sys,bindgen,unstable
- --release --all-targets --features bindgen,unstable
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- uses: dtolnay/rust-toolchain@master
id: toolchain
with:
toolchain: ${{ matrix.rust }}
- name: Set Rust toolchain override
run: rustup override set ${{ steps.toolchain.outputs.name }}
- name: Run cargo test
working-directory: ./aws-lc-rs
run: cargo test ${{ matrix.args }}
windows-test:
name: aws-lc-rs windows-tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
rust: [ stable ]
os: [ windows-2019 ]
args:
- --all-targets --features unstable
- --all-targets --features bindgen,unstable
- --release --all-targets --features unstable
- --no-default-features --features non-fips,unstable
- --no-default-features --features non-fips,ring-io,unstable
- --no-default-features --features non-fips,ring-sig-verify,unstable
- --no-default-features --features non-fips,alloc,unstable
steps:
- uses: ilammy/setup-nasm@v1
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- uses: dtolnay/rust-toolchain@master
id: toolchain
with:
toolchain: ${{ matrix.rust }}
- name: Set Rust toolchain override
run: rustup override set ${{ steps.toolchain.outputs.name }}
- name: Run cargo test
working-directory: ./aws-lc-rs
run: cargo test ${{ matrix.args }}
publish-dry-run:
name: publish dry-run
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
rust: [ stable ]
os: [ windows-2019, ubuntu-latest, macos-12, macos-13-xlarge ]
args:
- publish --dry-run
steps:
- uses: actions/setup-go@v4
with:
go-version: '>=1.18'
- run: go version
- if: ${{ matrix.os == 'windows-2019' }}
uses: ilammy/setup-nasm@v1
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- uses: dtolnay/rust-toolchain@master
id: toolchain
with:
toolchain: ${{ matrix.rust }}
- name: Set Rust toolchain override
run: rustup override set ${{ steps.toolchain.outputs.name }}
- name: aws-lc-sys
working-directory: ./aws-lc-sys
run: cargo ${{ matrix.args }}
- name: aws-lc-fips-sys
if: ${{ matrix.os != 'windows-2019' }}
working-directory: ./aws-lc-fips-sys
run: cargo ${{ matrix.args }}
- name: aws-lc-rs
working-directory: ./aws-lc-rs
run: cargo ${{ matrix.args }}
aws-lc-rs-coverage:
name: aws-ls-rs coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
lfs: true
- uses: dtolnay/rust-toolchain@master
id: toolchain
with:
toolchain: ${{ env.RUST_NIGHTLY_TOOLCHAIN }}
components: llvm-tools-preview
- name: Set Rust toolchain override
run: rustup override set ${{ steps.toolchain.outputs.name }}
- name: Install cargo-llvm-cov
run: cargo install cargo-llvm-cov
- name: Run coverage
working-directory: ./aws-lc-rs
run: cargo llvm-cov --workspace --features unstable --no-fail-fast --ignore-filename-regex "aws-lc-(fips-)?sys/.*" --lcov --output-path ${{ runner.temp }}/lcov.info
- name: Run FIPS coverage
working-directory: ./aws-lc-rs
run: cargo llvm-cov --workspace --features unstable,fips --no-fail-fast --ignore-filename-regex "aws-lc-(fips-)?sys/.*" --lcov --output-path ${{ runner.temp }}/lcov-fips.info
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: ${{ runner.temp }}/lcov.info,${{ runner.temp }}/lcov-fips.info
aws-lc-rs-asan:
name: aws-lc-rs asan
strategy:
matrix:
args:
-
- --release
features:
- --features asan
- --no-default-features --features fips,asan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- uses: dtolnay/rust-toolchain@master
id: toolchain
with:
toolchain: ${{ env.RUST_NIGHTLY_TOOLCHAIN }}
- name: Set Rust toolchain override
run: rustup override set ${{ steps.toolchain.outputs.name }}
- name: Run address sanitizers
env:
ASAN_OPTIONS: detect_leaks=1
RUSTFLAGS: -Zsanitizer=address
RUSTDOCFLAGS: -Zsanitizer=address
working-directory: ./aws-lc-rs
run: cargo test ${{ matrix.args }} --lib --bins --tests --examples --target x86_64-unknown-linux-gnu --features asan
build-env-test:
name: aws-lc-rs build-env-test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-12, macos-13-xlarge ]
static: [ 0, 1 ]
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- uses: dtolnay/rust-toolchain@stable
id: toolchain
- name: Set Rust toolchain override
run: rustup override set ${{ steps.toolchain.outputs.name }}
- name: Run cargo test
working-directory: ./aws-lc-rs
# Doc-tests fail to link with dynamic build
# See: https://github.com/rust-lang/cargo/issues/8531
run: AWS_LC_SYS_STATIC=${{ matrix.static }} cargo test --tests
build-env-fips-test:
name: aws-lc-rs build-env-fips-test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-12, macos-13-xlarge ]
static: [ 0, 1 ]
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- uses: dtolnay/rust-toolchain@stable
id: toolchain
- name: Set Rust toolchain override
run: rustup override set ${{ steps.toolchain.outputs.name }}
- uses: actions/setup-go@v4
with:
go-version: '>=1.18'
- name: Run cargo test
working-directory: ./aws-lc-rs
if: ${{ matrix.os == 'ubuntu-latest' || matrix.static != 1 }}
# Doc-tests fail to link with dynamic build
# See: https://github.com/rust-lang/cargo/issues/8531
run: AWS_LC_FIPS_SYS_STATIC=${{ matrix.static }} cargo test --tests --features fips
careful:
name: Run carefully
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-12
- macos-13-xlarge
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
lfs: true
- uses: dtolnay/rust-toolchain@nightly
id: toolchain
- name: Set Rust toolchain override
run: rustup override set ${{ steps.toolchain.outputs.name }}
- name: Install cargo-careful
run: cargo install cargo-careful
- uses: actions/setup-go@v4
with:
go-version: '>=1.18'
- name: Run tests
working-directory: ./aws-lc-rs
run: cargo +nightly careful test
- name: Run tests w/ FIPS
working-directory: ./aws-lc-rs
# Rust doc tests dislike dynamic linking
run: cargo +nightly careful test --tests --features fips,bindgen