name: CI
on:
push:
branches: [main]
pull_request:
workflow_call:
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
env:
CARGO_TERM_COLOR: always
jobs:
check:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 - run: rustup toolchain install stable --profile minimal --component rustfmt,clippy --no-self-update && rustup default stable
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 - run: cargo fmt --all -- --check
- run: cargo clippy --locked --workspace --all-features --all-targets -- -D warnings
- run: cargo doc --locked --all-features --no-deps
env:
RUSTDOCFLAGS: -D warnings
- name: Docs rules (README and site; the compile half is the src/docs.rs doctests)
run: bash scripts/check-docs.sh && bash scripts/concepts-check.sh
- run: cargo test --locked --workspace --all-features
features:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 - run: rustup toolchain install stable --profile minimal --no-self-update && rustup default stable
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 - uses: taiki-e/install-action@1168f6810a3cb30a3514bf5756a3b7f0422c6df8 with:
tool: cargo-hack@0.6
- run: cargo hack check --locked -p asx --each-feature --lib --tests
env:
RUSTFLAGS: -D warnings
msrv:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 - run: rustup toolchain install 1.88 --profile minimal --no-self-update
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 - run: cargo +1.88 check --locked --workspace --all-features
deny:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 - uses: taiki-e/install-action@1168f6810a3cb30a3514bf5756a3b7f0422c6df8 with:
tool: cargo-deny@0.20.2
- run: cargo deny --workspace --all-features check advisories licenses bans sources
interop:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 - run: rustup toolchain install stable --profile minimal --no-self-update && rustup default stable
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 - uses: docker/setup-buildx-action@v3
- name: Build the phase4 peer
id: peer
uses: docker/build-push-action@v6
with:
context: tests/fixtures/phase4
load: true
tags: asx-phase4-peer:ci
cache-from: type=gha,scope=phase4-peer
cache-to: type=gha,scope=phase4-peer,mode=max
- uses: taiki-e/install-action@1168f6810a3cb30a3514bf5756a3b7f0422c6df8 with:
tool: just
- run: just interop
env:
ASX_PHASE4_IMAGE: ${{ steps.peer.outputs.imageid }}