Skip to content

fix(broker): confirm fleet spawn success #3773

fix(broker): confirm fleet spawn success

fix(broker): confirm fleet spawn success #3773

Workflow file for this run

name: CI
on:
pull_request:
push:
branches: [main]
# Reusable workflows cannot elevate the caller's token permissions.
# detect-changes.yml reads pull-request file lists and commit comparisons.
permissions:
contents: read
pull-requests: read
env:
CARGO_TERM_COLOR: always
AGENT_RELAY_TELEMETRY_DISABLED: 1
jobs:
changes:
uses: ./.github/workflows/detect-changes.yml
rust-test:
name: Rust Tests (${{ matrix.os }})
needs: changes
if: needs.changes.outputs.rust_changed == 'true'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
cache-bin: false
- name: Run Rust tests
run: cargo test
- name: Run Rust tests (release)
run: cargo test --release
rust-cross-compile:
name: Cross-compile check (${{ matrix.target }})
needs: changes
if: needs.changes.outputs.rust_changed == 'true'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: aarch64-unknown-linux-gnu
linker: aarch64-linux-gnu-gcc
packages: gcc-aarch64-linux-gnu
- os: macos-latest
target: x86_64-apple-darwin
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.target }}
cache-bin: false
- name: Install cross-compilation tools
if: matrix.packages
run: |
sudo apt-get update
sudo apt-get install -y ${{ matrix.packages }}
- name: Cross-compile agent-relay-broker
run: cargo check --target ${{ matrix.target }} --bin agent-relay-broker
env:
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: ${{ matrix.linker }}
rust-clippy:
name: Clippy (${{ matrix.os }})
needs: changes
if: needs.changes.outputs.rust_changed == 'true'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: Swatinem/rust-cache@v2
with:
cache-bin: false
- run: cargo clippy -- -D warnings
rust-fmt:
name: Format
needs: changes
if: needs.changes.outputs.rust_changed == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- run: cargo fmt -- --check
sdk-check:
name: SDK TypeScript Check
needs: changes
if: needs.changes.outputs.node_changed == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
- run: scripts/post-publish-verify/retry-command.sh "SDK npm install" npm install
- run: npm run -w @agent-relay/sdk check