Prepare 3.0 #574
Workflow file for this run
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: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
schedule: | |
- cron: "0 14 * * 1" # Mondays at 2pm UTC | |
workflow_dispatch: null | |
jobs: | |
cargo-test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
# different operating systems | |
os: [ubuntu-22.04, macos-12, windows-2019] | |
features: [default] | |
toolchain: [stable] | |
include: | |
# different features combinations | |
- os: ubuntu-22.04 | |
features: beta | |
- os: ubuntu-22.04 | |
features: blocking | |
- os: ubuntu-22.04 | |
features: blocking,beta | |
# different tls implementations | |
- os: ubuntu-22.04 | |
features: tls-rustls --no-default-features | |
- os: ubuntu-22.04 | |
features: tls-vendored-openssl --no-default-features | |
- os: ubuntu-22.04 | |
toolchain: beta | |
features: default | |
# MSRV | |
- os: ubuntu-22.04 | |
toolchain: 1.75.0 | |
features: default | |
steps: | |
- uses: actions/checkout@v4 | |
- if: matrix.toolchain != '' | |
uses: IronCoreLabs/rust-toolchain@v1 | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
- uses: Swatinem/rust-cache@v2 | |
- name: Decrypt test keys | |
uses: IronCoreLabs/ironhide-actions/decrypt@v3 | |
with: | |
keys: ${{ secrets.IRONHIDE_KEYS }} | |
input: tests/testkeys/iak-stage.pem.iron | |
# Generate the Cargo.lock that will be used for the tests so we can upload it as an artifact | |
- name: Generate lockfile | |
run: cargo generate-lockfile | |
- name: Upload Cargo.lock | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.os }}-${{ matrix.features }}-${{ matrix.toolchain }}-Cargo.lock | |
path: Cargo.lock | |
- name: Install protobuf-codegen | |
run: cargo install protobuf-codegen | |
- name: Cargo test | |
run: cargo test --features ${{ matrix.features }} | |
env: | |
IRONCORE_ENV: stage | |
cargo-build: | |
runs-on: ${{ matrix.os }} | |
continue-on-error: true | |
strategy: | |
matrix: | |
target: | |
- aarch64-linux-android | |
- armv7-linux-androideabi | |
- i686-linux-android | |
- x86_64-linux-android | |
- x86_64-unknown-linux-musl | |
os: | |
- ubuntu-22.04 | |
include: | |
- target: aarch64-apple-ios | |
os: macos-12 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
target: ${{ matrix.target }} | |
override: true | |
- uses: Swatinem/rust-cache@v2 | |
- uses: actions-rs/cargo@v1 | |
with: | |
# `cross` will work on all our targets except aarch64-apple-ios. We can still use `cross` everywhere, because it transparently falls back to `cargo`. | |
use-cross: true | |
command: build | |
args: --target ${{ matrix.target }} --features "beta blocking tls-rustls" --no-default-features | |
clippy: | |
name: Clippy | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: IronCoreLabs/rust-toolchain@v1 | |
with: | |
components: clippy | |
- run: cargo clippy -- -D warnings | |
format: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: IronCoreLabs/rust-toolchain@v1 | |
with: | |
toolchain: stable | |
components: rustfmt | |
- run: cargo fmt --all -- --check | |
- name: Install cargo-sort | |
uses: IronCoreLabs/[email protected] | |
with: | |
crate: cargo-sort | |
accesskey: AKIAU2WBY6VDTC563V7G | |
secretkey: ${{ secrets.TOOL_CACHE_SECRET_KEY }} | |
os: ubuntu-22.04 | |
version: latest | |
- run: cargo sort --check | |
- name: Cancel workflow | |
if: failure() | |
uses: andymckay/[email protected] |