desktop: Run desktop ci in Buildkite

- Add desktop.yml with the checks from the GitHub desktop workflows
- Skip Buildkite steps for unchanged paths
This commit is contained in:
Daniel Norman
2026-11-26 14:50:12 +01:00
parent b13540d36f
commit fe6257df45
8 changed files with 178 additions and 6 deletions
+117
View File
@@ -0,0 +1,117 @@
env:
CI: "true"
CARGO_TERM_COLOR: "always"
# Resolved from the checkout root, where every step runs `npm ci`.
NPM_CONFIG_CACHE: ".npm-cache"
# Debug info is most of a target/ directory. Line tables keep file:line in
# panics and backtraces, and make builds and caches much smaller.
CARGO_PROFILE_DEV_DEBUG: "line-tables-only"
__defs:
# Keeps Rust in the checkout, so that the cache volume can hold it. rustup
# reads rust-toolchain.toml, which adds rustfmt and clippy.
install_rust: &install_rust |
export CARGO_HOME="$$PWD/.cargo-ci/cargo"
export RUSTUP_HOME="$$PWD/.cargo-ci/rustup"
export PATH="$$CARGO_HOME/bin:$$PATH"
command -v rustup || curl -fsSL https://sh.rustup.rs | sh -s -- -y --no-modify-path --profile minimal
desktop_changes: &desktop_changes "{desktop/**,shared/**,package{,-lock}.json,.npmrc,.nvmrc,.buildkite/desktop.yml}"
steps:
- label: "🔎 desktop js"
key: desktop-js
if_changed: *desktop_changes
timeout_in_minutes: 10
# Each step has its own volume: the last of two concurrent steps to finish
# would discard what the other wrote to a shared one.
cache:
name: desktop-js
paths:
- ".npm-cache"
plugins:
# Tracks the major version in .nvmrc.
- docker#v5.14.0:
image: "node:24-bookworm"
# Without this the cache volume links point at nothing.
volumes:
- "/cache/bkcache:/cache/bkcache"
environment:
- CI
- NPM_CONFIG_CACHE
commands:
- npm ci
- cd desktop
- npm run check-js
- npm run test:unit
- label: "🦀 desktop rust"
key: desktop-rust
if_changed: *desktop_changes
timeout_in_minutes: 45
cache:
name: desktop-rust
paths:
- "desktop/.cargo-ci"
- "desktop/target"
plugins:
- docker#v5.14.0:
image: "node:24-bookworm"
volumes:
- "/cache/bkcache:/cache/bkcache"
environment:
- CI
- CARGO_TERM_COLOR
- CARGO_PROFILE_DEV_DEBUG
commands:
# The system libraries Tauri links against.
- |
apt-get update -qq
apt-get install -y -qq --no-install-recommends \
libxdo-dev libayatana-appindicator3-dev librsvg2-dev \
libwebkit2gtk-4.1-dev libjavascriptcoregtk-4.1-dev
- cd desktop
- *install_rust
- scripts/check-rs
- label: "🎭 desktop e2e"
key: desktop-e2e
if_changed: *desktop_changes
timeout_in_minutes: 45
cache:
name: desktop-e2e
paths:
- ".npm-cache"
- "desktop/.cargo-ci"
- "desktop/target"
- "desktop/tests/tmp/bin"
artifact_paths:
- "desktop/tests/artifacts/**/*"
plugins:
- docker#v5.14.0:
# Ships WebKit. The tag must match @playwright/test in package.json.
image: "mcr.microsoft.com/playwright:v1.61.1-noble"
# WebKit exhausts Docker's default 64MB /dev/shm.
ipc: host
volumes:
- "/cache/bkcache:/cache/bkcache"
environment:
- CI
- NPM_CONFIG_CACHE
- CARGO_TERM_COLOR
- CARGO_PROFILE_DEV_DEBUG
commands:
# test-http-api links Tauri through radicle-types.
- |
apt-get update -qq
apt-get install -y -qq --no-install-recommends \
build-essential pkg-config xz-utils libssl-dev openssh-client \
libxdo-dev libayatana-appindicator3-dev librsvg2-dev \
libwebkit2gtk-4.1-dev libjavascriptcoregtk-4.1-dev
- npm ci
- cd desktop
- *install_rust
- scripts/install-binaries
- npm run build:http
- mkdir -p tests/artifacts
- npm run test:e2e
+3
View File
@@ -13,6 +13,9 @@ env:
steps:
- label: "🎭 explorer e2e"
key: explorer-e2e
if_changed:
include: "{explorer/**,shared/**,package{,-lock}.json,.npmrc,.nvmrc,.buildkite/explorer-*.yml}"
exclude: "explorer/{crates/**,Cargo.*,rust-toolchain,.cargo/**}"
# The explorer-check step in explorer-node-checks.yml seeds the shared
# volume.
depends_on: explorer-check
+8
View File
@@ -66,9 +66,14 @@ __defs:
# path is always a directory, so the two files share one.
- "explorer/.lintcache"
explorer_web_changes: &explorer_web_changes
include: "{explorer/**,shared/**,package{,-lock}.json,.npmrc,.nvmrc,.buildkite/explorer-*.yml}"
exclude: "explorer/{crates/**,Cargo.*,rust-toolchain,.cargo/**}"
steps:
- label: "🔎 explorer check"
key: explorer-check
if_changed: *explorer_web_changes
timeout_in_minutes: 10
cache: *deps_cache
plugins:
@@ -84,6 +89,7 @@ steps:
- label: "🧪 explorer unit-tests"
key: explorer-unit-tests
if_changed: *explorer_web_changes
depends_on: explorer-check
timeout_in_minutes: 10
cache: *deps_cache
@@ -98,6 +104,7 @@ steps:
# binaries on PATH even though it runs under vitest rather than Playwright.
- label: "🔌 explorer http-client-tests"
key: explorer-http-client-tests
if_changed: *explorer_web_changes
depends_on: explorer-check
timeout_in_minutes: 15
cache: *deps_cache
@@ -116,6 +123,7 @@ steps:
# needs a browser but no Radicle binaries or fixtures.
- label: "🏗 explorer build-smoke"
key: explorer-build-smoke
if_changed: *explorer_web_changes
depends_on: explorer-check
timeout_in_minutes: 30
cache: *deps_cache
+4
View File
@@ -45,10 +45,13 @@ __defs:
- "~/.rustup"
- "~/.cache/cargo-target"
explorer_rust_changes: &explorer_rust_changes "{explorer/{crates/**,Cargo.*,rust-toolchain,.cargo/**},.buildkite/explorer-rust.yml}"
steps:
# RUSTFLAGS is set on the build only, not on the test run.
- label: "🦀 explorer test"
key: explorer-rust-test
if_changed: *explorer_rust_changes
timeout_in_minutes: 30
cache:
name: rust-test
@@ -63,6 +66,7 @@ steps:
- label: "🦀 explorer lint"
key: explorer-rust-lint
if_changed: *explorer_rust_changes
timeout_in_minutes: 30
cache:
name: rust-lint
+5
View File
@@ -86,6 +86,11 @@ steps:
- label: "📸 explorer visual"
key: explorer-visual
# The master step runs on every build, as branch builds take their
# baselines from it.
if_changed:
include: "{explorer/**,shared/**,package{,-lock}.json,.npmrc,.nvmrc,.buildkite/explorer-*.yml}"
exclude: "explorer/{crates/**,Cargo.*,rust-toolchain,.cargo/**}"
branches: "!master"
depends_on: explorer-check
timeout_in_minutes: 30
+12 -5
View File
@@ -5,17 +5,20 @@
# The broker creates exactly one Buildkite pipeline per Radicle repo, so every
# suite lands in this single build. Cache volumes are scoped to the pipeline, so
# the same name in two uploaded files is one volume: explorer-node-checks.yml,
# explorer-e2e.yml and explorer-visual.yml all attach `deps` on purpose. Share a
# name only where that is safe, because a step that commits a volume version
# discards what a concurrent step wrote to the same volume.
# explorer-e2e.yml and explorer-visual.yml all attach `deps` on purpose, while
# desktop.yml uses its own volume. Share a name only where that is safe,
# because a step that commits a volume version discards what a concurrent step
# wrote to the same volume.
#
# Upload explorer-node-checks.yml before explorer-e2e.yml: the e2e step depends
# on the `explorer-check` key defined there, and Buildkite rejects a step whose
# dependency is not yet part of the build.
#
# A push of a `releases/httpd/<version>` tag also starts a build, with the tag
# name as the branch. explorer-release.yml only runs then; the other suites run
# too, against the tagged commit.
# name as the branch. explorer-release.yml only runs then.
#
# `if_changed` skips steps whose files are unchanged against master. A master
# build runs every step.
#
# Superseded builds are not cancelled. Buildkite has no YAML equivalent of the
# GitHub Actions cancel-in-progress.
@@ -23,8 +26,12 @@
steps:
- label: ":pipeline: upload"
commands:
# The commands share one shell, so the export reaches every upload.
- '[ "$$BUILDKITE_BRANCH" != master ] || export BUILDKITE_AGENT_APPLY_IF_CHANGED=false'
- buildkite-agent pipeline upload .buildkite/explorer-node-checks.yml
- buildkite-agent pipeline upload .buildkite/explorer-e2e.yml
- buildkite-agent pipeline upload .buildkite/explorer-visual.yml
- buildkite-agent pipeline upload .buildkite/explorer-rust.yml
- buildkite-agent pipeline upload .buildkite/explorer-release.yml
- buildkite-agent pipeline upload .buildkite/desktop.yml
- buildkite-agent pipeline upload .buildkite/shared.yml
+28
View File
@@ -0,0 +1,28 @@
env:
CI: "true"
# Resolved from the checkout root, where every step runs `npm ci`.
NPM_CONFIG_CACHE: ".npm-cache"
steps:
- label: "🧩 shared"
key: shared
if_changed: "{shared/**,package{,-lock}.json,.npmrc,.nvmrc,.buildkite/shared.yml}"
timeout_in_minutes: 10
cache:
name: shared
paths:
- ".npm-cache"
plugins:
# Tracks the major version in .nvmrc.
- docker#v5.14.0:
image: "node:24-bookworm"
# Without this the cache volume links point at nothing.
volumes:
- "/cache/bkcache:/cache/bkcache"
environment:
- CI
- NPM_CONFIG_CACHE
commands:
- npm ci
- (cd shared/ui && npm run check && npm run test:unit)
- (cd shared/core && npm run check && npm run test:unit)
+1 -1
View File
@@ -29,7 +29,7 @@ source of truth for anything inside it.
| `package.json`, `package-lock.json`, `.npmrc`, `.nvmrc` | The npm workspace, its lockfile and npm and Node settings |
| `docs/adr/` | Decisions that affect the whole repository |
| `.github/workflows/` | GitHub CI: `explorer-*.yml` for explorer, `desktop-*.yml` for desktop, `shared-ui.yml` and `shared-core.yml` for the shared packages |
| `.buildkite/` | Radicle CI pipelines (explorer only) |
| `.buildkite/` | Radicle CI pipelines, which mirror the GitHub workflows |
| `.ryph/` | Dev machine image and setup for agents, see `.ryph/environment.md` |
## Working in this repo