chore: add release-plz workflow for automated releases #187
This file contains hidden or 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: | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUSTC_WRAPPER: sccache | |
| jobs: | |
| ci: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy, rustfmt | |
| - uses: taiki-e/install-action@cargo-make | |
| - uses: taiki-e/install-action@nextest | |
| - uses: mozilla-actions/[email protected] | |
| - name: Install iperf3 | |
| run: sudo apt-get update && sudo apt-get install -y iperf3 | |
| - name: Enable unprivileged user namespaces | |
| run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 | |
| - name: Build | |
| run: cargo build --workspace --all-targets | |
| - name: Test | |
| run: cargo nextest run --workspace --profile ci | |
| - name: Clippy | |
| run: cargo clippy --workspace --tests -- -D warnings | |
| - name: Format | |
| run: cargo make format-check | |
| macos-check: | |
| runs-on: [self-hosted, macOS, arm64] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: "20" | |
| - uses: mozilla-actions/[email protected] | |
| - name: Build patchbay-vm | |
| run: cargo build -p patchbay-vm | |
| - name: Clippy patchbay-vm | |
| run: cargo clippy -p patchbay-vm -- -D warnings | |
| - name: Container backend smoke test | |
| run: | | |
| if ! command -v container >/dev/null 2>&1; then | |
| echo "container CLI not found, skipping smoke test" | |
| exit 0 | |
| fi | |
| if ! command -v aarch64-linux-musl-gcc >/dev/null 2>&1; then | |
| echo "musl cross-compiler not found, skipping smoke test" | |
| echo "install with: brew install filosottile/musl-cross/musl-cross" | |
| exit 0 | |
| fi | |
| rustup target add aarch64-unknown-linux-musl | |
| cargo build --release -p patchbay-vm -p patchbay-runner --bin patchbay --target aarch64-unknown-linux-musl | |
| ./target/release/patchbay-vm --backend container run \ | |
| --patchbay-version "path:target/aarch64-unknown-linux-musl/release/patchbay" \ | |
| ./patchbay-cli/tests/fixtures/iperf-1to1-public.toml | |
| ./target/release/patchbay-vm --backend container down | |
| e2e: | |
| runs-on: [self-hosted, linux, x64] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: mozilla-actions/[email protected] | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: "20" | |
| cache: npm | |
| cache-dependency-path: ui/package-lock.json | |
| - name: Install UI dependencies | |
| working-directory: ui | |
| run: npm ci | |
| - name: Build UI bundle | |
| working-directory: ui | |
| run: npm run build | |
| - name: Install Playwright browser and system deps | |
| working-directory: ui | |
| run: npx playwright install --with-deps chromium | |
| - name: Install iperf3 | |
| run: sudo apt-get update && sudo apt-get install -y iperf3 | |
| - name: Enable unprivileged user namespaces | |
| run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 || true | |
| - name: Build Rust (bins + test targets) | |
| run: cargo build --workspace --all-targets | |
| - name: UI E2E | |
| working-directory: ui | |
| run: npm run test:e2e |