Skip to content

feat(erp): match bounded multi-family observations (#380) #575

feat(erp): match bounded multi-family observations (#380)

feat(erp): match bounded multi-family observations (#380) #575

Workflow file for this run

name: Rust CI
on:
push:
branches: [ main ]
paths:
- 'crates/**'
- 'Cargo.toml'
- 'Cargo.lock'
- '.github/workflows/rust.yml'
# The types tests validate the viewer's exported-kind contract.
- 'tools/dag-viewer/**'
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- 'crates/**'
- 'Cargo.toml'
- 'Cargo.lock'
- '.github/workflows/rust.yml'
# The types tests validate the viewer's exported-kind contract.
- 'tools/dag-viewer/**'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
format-and-lint:
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: rustfmt, clippy
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.4
- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml') }}
- name: Check formatting
run: cargo fmt --all -- --check
- name: Run clippy
run: cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
env:
RUSTC_WRAPPER: sccache
test:
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Free disk space
# cargo test --workspace links dozens of arrow/datafusion-heavy test
# binaries; the runner's ~14GB of free disk (the rest is preinstalled
# SDKs we don't need) isn't enough headroom and linking dies with
# "ld terminated with signal 7 [Bus error]" once it fills up.
run: |
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL
sudo docker image prune --all --force
df -h /
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.4
- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml') }}
- name: Run all workspace tests
run: cargo test --workspace --locked
env:
RUSTC_WRAPPER: sccache
- name: Verify MetricsQL frontend as a stable external dependency
run: bash tools/verify_metricsql_external_consumer.sh
env:
RUSTC_WRAPPER: sccache
- name: Verify vendored MetricsQL parser baseline
run: python3 tools/verify_metricsql_vendored_baseline.py
env:
RUSTC_WRAPPER: sccache