Structural Refactor #203
Workflow file for this run
This file contains hidden or 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: rustls-rustcrypto | |
on: | |
pull_request: | |
paths-ignore: | |
- README.md | |
push: | |
branches: [master] | |
paths-ignore: | |
- README.md | |
permissions: | |
contents: read | |
env: | |
CARGO_INCREMENTAL: 0 | |
RUSTFLAGS: "-Dwarnings" | |
CARGO_HOME: ${{ github.workspace }}/.cargo | |
CARGO_TARGET_DIR: ${{ github.workspace }}/target | |
jobs: | |
clippy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache Rust toolchain | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.rustup/toolchains | |
~/.rustup/downloads | |
key: rust-toolchain-${{ runner.os }}-1.88.0-clippy | |
restore-keys: | | |
rust-toolchain-${{ runner.os }}-1.88.0 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: 1.88.0 | |
components: clippy | |
- name: Cache Cargo registry and index | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
cargo-${{ runner.os }}- | |
- run: cargo clippy --all --all-features -- -D warnings | |
doc: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache Rust toolchain | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.rustup/toolchains | |
~/.rustup/downloads | |
key: rust-toolchain-${{ runner.os }}-stable-doc | |
restore-keys: | | |
rust-toolchain-${{ runner.os }}-stable | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
- name: Cache Cargo registry and index | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
cargo-${{ runner.os }}- | |
- name: Cache target directory | |
uses: actions/cache@v4 | |
with: | |
path: target | |
key: cargo-doc-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
cargo-doc-${{ runner.os }}- | |
- run: cargo doc --all-features --no-deps | |
rustfmt: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache Rust toolchain | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.rustup/toolchains | |
~/.rustup/downloads | |
key: rust-toolchain-${{ runner.os }}-stable-rustfmt | |
restore-keys: | | |
rust-toolchain-${{ runner.os }}-stable | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
components: rustfmt | |
- run: cargo fmt --all -- --check | |
no_std: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust: | |
- 1.88.0 # MSRV | |
- stable | |
target: | |
- armv7a-none-eabi | |
- thumbv7em-none-eabi | |
- wasm32-unknown-unknown | |
- xtensa-esp32-none-elf | |
- xtensa-esp32s2-none-elf | |
- xtensa-esp32s3-none-elf | |
- riscv32imc-unknown-none-elf | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache Rust toolchain | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.rustup/toolchains | |
~/.rustup/downloads | |
key: rust-toolchain-${{ runner.os }}-${{ matrix.rust }}-${{ matrix.target }} | |
restore-keys: | | |
rust-toolchain-${{ runner.os }}-${{ matrix.rust }} | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
targets: ${{ matrix.target }} | |
- name: Cache Cargo registry and index | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
cargo-${{ runner.os }}- | |
- name: Cache target directory | |
uses: actions/cache@v4 | |
with: | |
path: target | |
key: cargo-nostd-${{ runner.os }}-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
cargo-nostd-${{ runner.os }}-${{ matrix.target }}- | |
- run: cargo build --no-default-features --features tls12,full,alloc --release --target ${{ matrix.target }} | |
env: | |
RUSTFLAGS: --cfg getrandom_backend="custom" | |
test: | |
strategy: | |
matrix: | |
toolchain: | |
- 1.88.0 # MSRV | |
- stable | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache Rust toolchain | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.rustup/toolchains | |
~/.rustup/downloads | |
key: rust-toolchain-${{ runner.os }}-${{ matrix.toolchain }}-test | |
restore-keys: | | |
rust-toolchain-${{ runner.os }}-${{ matrix.toolchain }} | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
- name: Cache Cargo registry and index | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
cargo-${{ runner.os }}- | |
- name: Cache target directory | |
uses: actions/cache@v4 | |
with: | |
path: target | |
key: cargo-test-${{ runner.os }}-${{ matrix.toolchain }}-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
cargo-test-${{ runner.os }}-${{ matrix.toolchain }}- | |
- run: cargo test --features tls12 | |
- name: Test no_std with alloc | |
run: cargo test --no-default-features --features tls12,full,alloc | |
cross: | |
strategy: | |
matrix: | |
include: | |
- target: powerpc-unknown-linux-gnu | |
rust: 1.88.0 # MSRV | |
- target: powerpc-unknown-linux-gnu | |
rust: stable | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache Rust toolchain | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.rustup/toolchains | |
~/.rustup/downloads | |
key: rust-toolchain-${{ runner.os }}-${{ matrix.rust }}-${{ matrix.target }} | |
restore-keys: | | |
rust-toolchain-${{ runner.os }}-${{ matrix.rust }} | |
- run: ${{ matrix.deps }} | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
targets: ${{ matrix.target }} | |
- uses: RustCrypto/actions/cross-install@master | |
- name: Cache Cargo registry and index | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
cargo-${{ runner.os }}- | |
- name: Cache target directory | |
uses: actions/cache@v4 | |
with: | |
path: target | |
key: cargo-cross-${{ runner.os }}-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
cargo-cross-${{ runner.os }}-${{ matrix.target }}- | |
- run: cross test --release --target ${{ matrix.target }} --all-features |