Files
Rūdolfs Ošiņš cf5e92f919 Save Rust CI caches only on master
Every patch saved its own Rust caches, up to 3 GB per patch, which
pushed the repo past GitHub's 10 GB cache limit and evicted the ones
master builds rely on. Patches now restore master's caches, and
line-table-only debug info keeps the builds and caches smaller.
2026-10-13 17:23:20 +02:00

63 lines
1.6 KiB
YAML

name: desktop-lint
# Only desktop changes, or changes to this workflow, run it.
on:
pull_request:
paths:
- "desktop/**"
- ".github/workflows/desktop-lint.yml"
push:
paths:
- "desktop/**"
- ".github/workflows/desktop-lint.yml"
workflow_dispatch:
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
# 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
defaults:
run:
working-directory: desktop
jobs:
lint-typescript:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version-file: "desktop/.nvmrc"
- run: npm ci
- run: npm run check-js
lint-rust:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- run: |
sudo apt-get update && sudo apt-get install -y --no-install-recommends \
libxdo-dev \
libayatana-appindicator3-dev \
librsvg2-dev \
libwebkit2gtk-4.1-dev \
libjavascriptcoregtk-4.1-dev
# The version in desktop/rust-toolchain.toml, which cargo uses here.
- uses: dtolnay/rust-toolchain@1.97.1
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
with:
workspaces: desktop
# Only master saves, so patches share its caches instead of each
# storing their own, which pushes the repo over GitHub's 10 GB limit.
save-if: ${{ github.ref == 'refs/heads/master' }}
- run: scripts/check-rs