mirror of
https://github.com/block/buzz.git
synced 2026-10-27 04:30:52 +00:00
perf(ci): speed up PR CI wall clock and local dev builds (#1028)
This commit is contained in:
5
.cargo/config.toml
Normal file
5
.cargo/config.toml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
[profile.dev]
|
||||||
|
# Full file/line backtraces, no per-variable debug info. ~20-30% faster
|
||||||
|
# builds and much faster macOS link. Need lldb locals? Override per-shell:
|
||||||
|
# CARGO_PROFILE_DEV_DEBUG=2
|
||||||
|
debug = "line-tables-only"
|
||||||
15
.github/workflows/ci.yml
vendored
15
.github/workflows/ci.yml
vendored
@@ -4,6 +4,10 @@ on:
|
|||||||
branches: [main, release]
|
branches: [main, release]
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ci-${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
PLAYWRIGHT_BROWSERS_PATH: ${{ github.workspace }}/.cache/ms-playwright
|
PLAYWRIGHT_BROWSERS_PATH: ${{ github.workspace }}/.cache/ms-playwright
|
||||||
@@ -81,6 +85,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
||||||
- uses: cashapp/activate-hermit@e49f5cb4dd64ff0b0b659d1d8df499595451155a # v1
|
- uses: cashapp/activate-hermit@e49f5cb4dd64ff0b0b659d1d8df499595451155a # v1
|
||||||
|
- uses: rui314/setup-mold@9c9c13bf4c3f1adef0cc596abc155580bcb04444 # v1
|
||||||
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
|
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
|
||||||
with:
|
with:
|
||||||
save-if: ${{ github.event_name != 'pull_request' }}
|
save-if: ${{ github.event_name != 'pull_request' }}
|
||||||
@@ -102,6 +107,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
||||||
- uses: cashapp/activate-hermit@e49f5cb4dd64ff0b0b659d1d8df499595451155a # v1
|
- uses: cashapp/activate-hermit@e49f5cb4dd64ff0b0b659d1d8df499595451155a # v1
|
||||||
|
- uses: rui314/setup-mold@9c9c13bf4c3f1adef0cc596abc155580bcb04444 # v1
|
||||||
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
|
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
|
||||||
with:
|
with:
|
||||||
workspaces: desktop/src-tauri
|
workspaces: desktop/src-tauri
|
||||||
@@ -264,6 +270,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
||||||
- uses: cashapp/activate-hermit@e49f5cb4dd64ff0b0b659d1d8df499595451155a # v1
|
- uses: cashapp/activate-hermit@e49f5cb4dd64ff0b0b659d1d8df499595451155a # v1
|
||||||
|
- uses: rui314/setup-mold@9c9c13bf4c3f1adef0cc596abc155580bcb04444 # v1
|
||||||
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
|
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
|
||||||
with:
|
with:
|
||||||
workspaces: |
|
workspaces: |
|
||||||
@@ -479,9 +486,7 @@ jobs:
|
|||||||
contents: read
|
contents: read
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
||||||
- uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 # v2.23.0
|
- uses: cashapp/activate-hermit@e49f5cb4dd64ff0b0b659d1d8df499595451155a # v1
|
||||||
with:
|
|
||||||
channel: stable
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: cd mobile && flutter pub get
|
run: cd mobile && flutter pub get
|
||||||
- name: Format check
|
- name: Format check
|
||||||
@@ -554,8 +559,10 @@ jobs:
|
|||||||
- name: Build server binaries
|
- name: Build server binaries
|
||||||
env:
|
env:
|
||||||
TARGET: ${{ matrix.target }}
|
TARGET: ${{ matrix.target }}
|
||||||
|
# PRs: compile + build-script gate only (no codegen/link). Main: full link gate.
|
||||||
|
CARGO_CMD: ${{ github.event_name == 'pull_request' && 'check' || 'build' }}
|
||||||
run: |
|
run: |
|
||||||
cross build --release --target "$TARGET" \
|
cross "$CARGO_CMD" --release --target "$TARGET" \
|
||||||
-p buzz-relay \
|
-p buzz-relay \
|
||||||
-p buzz-acp \
|
-p buzz-acp \
|
||||||
-p buzz-agent \
|
-p buzz-agent \
|
||||||
|
|||||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -12,7 +12,8 @@
|
|||||||
|
|
||||||
# Editor / IDE
|
# Editor / IDE
|
||||||
.idea/
|
.idea/
|
||||||
.vscode/
|
.vscode/*
|
||||||
|
!.vscode/settings.json
|
||||||
*.swp
|
*.swp
|
||||||
*.swo
|
*.swo
|
||||||
*~
|
*~
|
||||||
|
|||||||
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"rust-analyzer.cargo.targetDir": true
|
||||||
|
}
|
||||||
14
Cargo.toml
14
Cargo.toml
@@ -119,13 +119,19 @@ buzz-media = { path = "crates/buzz-media" }
|
|||||||
buzz-sdk = { path = "crates/buzz-sdk" }
|
buzz-sdk = { path = "crates/buzz-sdk" }
|
||||||
buzz-ws-client = { path = "crates/buzz-ws-client" }
|
buzz-ws-client = { path = "crates/buzz-ws-client" }
|
||||||
|
|
||||||
# CI profile — release-grade codegen for the relay so e2e tests hit a
|
# CI profile — builds the relay for desktop e2e. Dependencies keep full
|
||||||
# realistic binary, not an unoptimised debug build. Inherits `release`
|
# release optimization (warm from main's cache; they carry the runtime hot
|
||||||
# defaults (opt-level 3, no debug-assertions) but keeps incremental
|
# path: tokio/sqlx/axum). Workspace crates build at opt-level 1 — enough for
|
||||||
# compilation enabled and avoids LTO so the build stays fast.
|
# stable e2e timing (PR #307 flakiness was opt-0 + debug-assertions) at
|
||||||
|
# roughly half the codegen cost. `incremental` is irrelevant in CI:
|
||||||
|
# rust-cache exports CARGO_INCREMENTAL=0 and never caches member artifacts.
|
||||||
[profile.ci]
|
[profile.ci]
|
||||||
inherits = "release"
|
inherits = "release"
|
||||||
lto = false
|
lto = false
|
||||||
|
opt-level = 1
|
||||||
|
|
||||||
|
[profile.ci.package."*"]
|
||||||
|
opt-level = 3
|
||||||
|
|
||||||
# Sprig profile — optimized for deploy-anywhere Sprig release artifacts.
|
# Sprig profile — optimized for deploy-anywhere Sprig release artifacts.
|
||||||
# Sprig is distributed over the network and installed on fresh hosts, so binary
|
# Sprig is distributed over the network and installed on fresh hosts, so binary
|
||||||
|
|||||||
@@ -20,10 +20,6 @@ pre-commit:
|
|||||||
pre-push:
|
pre-push:
|
||||||
parallel: true
|
parallel: true
|
||||||
commands:
|
commands:
|
||||||
rust-clippy:
|
|
||||||
run: just clippy
|
|
||||||
desktop-tauri-clippy:
|
|
||||||
run: just desktop-tauri-clippy
|
|
||||||
rust-tests:
|
rust-tests:
|
||||||
run: just test-unit
|
run: just test-unit
|
||||||
desktop-test:
|
desktop-test:
|
||||||
|
|||||||
Reference in New Issue
Block a user