Skip to content

CI

CI #21

Workflow file for this run

name: CI
on: [pull_request, merge_group]
permissions:
contents: read
jobs:
fmt:
name: Cargo fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- uses: Swatinem/rust-cache@v2
- run: cargo fmt --all -- --check
clippy:
name: Cargo clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Run clippy check
run: cargo clippy --all-targets --all-features -- -D warnings
env:
RUSTFLAGS: "--cfg tokio_unstable"
build:
name: Build (${{ matrix.os }}, ${{ matrix.toolchain }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
toolchain: [stable, nightly]
env:
RUST_BACKTRACE: 1
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/rust-build
with:
toolchain: ${{ matrix.toolchain }}
check-docs:
name: Check docs.rs
runs-on: ubuntu-latest
if: ${{ !startsWith(github.head_ref, 'release-') && !startsWith(github.ref_name, 'release-') }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
components: rust-docs
- uses: Swatinem/rust-cache@v2
- run: sudo apt-get update && sudo apt-get install -y jq
- run: cargo install cargo-docs-rs
- run: ./scripts/check-docsrs.sh
trace-integrity:
name: Trace Integrity & Analysis
runs-on: ubuntu-latest
services:
dynamodb-local:
image: amazon/dynamodb-local
ports:
- 8000:8000
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- uses: actions/setup-node@v4
with:
node-version: 24
- name: Enable perf_event_open and kallsyms for tests
run: |
sudo sysctl kernel.perf_event_paranoid=1
sudo sysctl kernel.kptr_restrict=0
- run: scripts/e2e-trace-tests.sh
ci-pass:
name: CI Pass
runs-on: ubuntu-latest
needs: [fmt, clippy, build, check-docs, trace-integrity]
if: always()
steps:
- run: |
if [[ "${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}" == "true" ]]; then
echo "One or more required jobs failed or were cancelled"
exit 1
fi