Skip to content

Lived-in walkman app icon + reproducible icon pipeline (#6) #18

Lived-in walkman app icon + reproducible icon pipeline (#6)

Lived-in walkman app icon + reproducible icon pipeline (#6) #18

Workflow file for this run

name: CI
# Builds the Deck on macOS *and* Linux so cross-platform stays honest.
# (GPUI renders with Metal on macOS and Vulkan via wgpu on Linux.)
#
# COST: free. Standard GitHub-hosted runners (macos-latest, ubuntu-latest) are
# free + unlimited on PUBLIC repos — the macOS 10x multiplier only burns quota
# on PRIVATE repos. If you ever make this repo private, gate the `macos` job to
# tags to avoid eating your minutes, e.g. add to that job:
# if: github.event_name == 'pull_request' || startsWith(github.ref, 'refs/tags/v')
# (Don't switch to "*-large" runners — those are billed even on public repos.)
on:
push:
branches: [main]
tags: ["v*"]
pull_request:
branches: [main]
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
# Cancel a still-running CI for a branch when a newer commit is pushed. Deck's first
# git-gpui build is slow, so when an agent pushes a fix-up the stale run is killed and
# the runner starts on the latest commit immediately (faster feedback, fewer minutes).
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
# No toolchain version here on purpose: rust-toolchain.toml is the single
# source of truth. rustup (preinstalled on GitHub runners) auto-installs the
# pinned version and its clippy/rustfmt components on the first cargo call.
- uses: Swatinem/rust-cache@v2
# --locked everywhere: reproducibility lives in the committed Cargo.lock (it
# pins exact git gpui commits). --locked fails CI on a stale lock; `just
# bump-gpui` rewrites+commits the lock, so this never fights the bump flow.
- run: cargo build --locked
- run: cargo build --locked --features tray
- run: cargo clippy --locked --all-targets --features tray -- -D warnings
# why: lint the DEFAULT/shipping feature config too — CI only ever linted
# the tray build, so a clippy regression on the default build slipped through.
- run: cargo clippy --locked --all-targets -- -D warnings
# why: run the test suite — the command_palette fuzzy-match tests existed but
# CI never executed them, so an agent could break scoring invisibly.
- run: cargo test --locked
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# No toolchain version here on purpose: rust-toolchain.toml is the single
# source of truth. rustup (preinstalled on GitHub runners) auto-installs the
# pinned version and its clippy/rustfmt components on the first cargo call.
- uses: Swatinem/rust-cache@v2
# System libraries GPUI needs on Linux (X11 + Wayland + Vulkan + fonts),
# plus GTK/appindicator for the optional tray feature.
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
build-essential pkg-config \
libxcb1-dev libxkbcommon-dev libxkbcommon-x11-dev \
libwayland-dev libxkbcommon-dev \
libvulkan-dev \
libfontconfig1-dev libfreetype6-dev \
libssl-dev \
libgtk-3-dev libayatana-appindicator3-dev libxdo-dev
# why: formatting is OS-independent, so gate `cargo fmt --check` ONCE on the
# cheaper Linux runner instead of the 10x-billed macOS one. Deck is already
# fmt-clean, so this lands green with no baseline-format commit.
- run: cargo fmt --all --check
# --locked everywhere: reproducibility lives in the committed Cargo.lock (it
# pins exact git gpui commits). --locked fails CI on a stale lock; `just
# bump-gpui` rewrites+commits the lock, so this never fights the bump flow.
- run: cargo build --locked
- run: cargo build --locked --features tray
- run: cargo clippy --locked --all-targets --features tray -- -D warnings
# why: lint the DEFAULT/shipping feature config too — CI only ever linted
# the tray build, so a clippy regression on the default build slipped through.
- run: cargo clippy --locked --all-targets -- -D warnings
# why: run the test suite — the command_palette fuzzy-match tests existed but
# CI never executed them, so an agent could break scoring invisibly.
- run: cargo test --locked
# why: supply-chain gate (advisories / bans / sources / licenses) via cargo-deny.
# deny.toml is already seeded and passes locally (`cargo deny check` is green). This lands
# NON-BLOCKING (continue-on-error) only so the first CI run can't surprise-break a PR — flip it
# to a required check (drop continue-on-error) after one green run on CI.
cargo-deny:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v4
- uses: EmbarkStudios/cargo-deny-action@v2
with:
command: check advisories bans sources licenses