Use try_fill_bytes() to handle RNG errors in RngWorker #1045
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Rust CI/CD" | |
on: [push, pull_request] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
rustfmt: | |
name: rustfmt | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
directory: [./heimlig, ./examples/linux, ./examples/stm32h745i/cm4, ./examples/stm32h745i/cm7] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
profile: default | |
default: true | |
- name: Check code formatting | |
run: | | |
cd ${{ matrix.directory }} | |
cargo fmt --all --check | |
clippy_check: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
directory: [./heimlig, ./examples/linux, ./examples/stm32h745i/cm4, ./examples/stm32h745i/cm7] | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Install Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
profile: default | |
default: true | |
- name: Run clippy | |
run: | | |
cd ${{ matrix.directory }} | |
cargo clippy | |
build_heimlig: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
platform: [x86_64-unknown-linux-musl, thumbv7em-none-eabihf] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
profile: minimal | |
default: true | |
target: ${{ matrix.platform }} | |
- name: Build Binary | |
run: | | |
cd ./heimlig | |
cargo build --release | |
- name: Run Tests | |
run: | | |
cd ./heimlig | |
cargo test --release | |
build_linux_example: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
profile: minimal | |
default: true | |
- name: Build Binary | |
run: | | |
cd ./examples/linux | |
cargo build --release | |
build_stm32h745i_example: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
profile: minimal | |
default: true | |
target: thumbv7em-none-eabihf | |
- name: Build Cortex-M4 Binary | |
run: | | |
cd ./examples/stm32h745i/cm4 | |
cargo build --release | |
- name: Build Cortex-M7 Binary | |
run: | | |
cd ./examples/stm32h745i/cm7 | |
cargo build --release |