From e4829603ff70bdeac96780e1512ac2c09638e5a3 Mon Sep 17 00:00:00 2001 From: Theo Browne Date: Thu, 30 Jul 2026 11:25:31 -0700 Subject: [PATCH] perf(ci): cut stale runs and redundant setup (#4802) --- .github/workflows/ci.yml | 34 ++++++++++-- .github/workflows/deploy-relay.yml | 9 +++- .github/workflows/mobile-eas-preview.yml | 17 ++++-- .github/workflows/mobile-eas-production.yml | 8 ++- .../workflows/mobile-showcase-screenshots.yml | 20 ++++++- .github/workflows/release.yml | 52 +++++++++++++++++-- 6 files changed, 126 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5a418a463c2ba29ac802e4b3460f741aa5709c8a..1e51867cbe7db62cdc0a848f467c8c8ddaed625f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,6 +6,10 @@ on: branches: - main +concurrency: + group: ci-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + jobs: check: name: Check @@ -14,6 +18,11 @@ jobs: steps: - name: Checkout uses: actions/checkout@v6 + with: + sparse-checkout: | + /* + !/.repos/ + sparse-checkout-cone-mode: false - name: Setup Vite+ uses: voidzero-dev/setup-vp@v1 @@ -55,6 +64,11 @@ jobs: steps: - name: Checkout uses: actions/checkout@v6 + with: + sparse-checkout: | + /* + !/.repos/ + sparse-checkout-cone-mode: false - name: Setup Vite+ uses: voidzero-dev/setup-vp@v1 @@ -77,18 +91,25 @@ jobs: mobile_native_static_analysis: name: Mobile Native Static Analysis - runs-on: blacksmith-12vcpu-macos-26 + runs-on: blacksmith-6vcpu-macos-26 timeout-minutes: 10 steps: - name: Checkout uses: actions/checkout@v6 + with: + sparse-checkout: | + /* + !/.repos/ + sparse-checkout-cone-mode: false - name: Setup Vite+ uses: voidzero-dev/setup-vp@v1 with: node-version-file: package.json cache: true - run-install: true + run-install: | + args: + - --filter=@t3tools/scripts... - name: Install mobile native static analysis tools run: brew bundle install --file apps/mobile/Brewfile @@ -103,13 +124,20 @@ jobs: steps: - name: Checkout uses: actions/checkout@v6 + with: + sparse-checkout: | + /* + !/.repos/ + sparse-checkout-cone-mode: false - name: Setup Vite+ uses: voidzero-dev/setup-vp@v1 with: node-version-file: package.json cache: true - run-install: true + run-install: | + args: + - --filter=@t3tools/scripts... - name: Exercise release-only workflow steps run: node scripts/release-smoke.ts diff --git a/.github/workflows/deploy-relay.yml b/.github/workflows/deploy-relay.yml index 94d4af17e41ad5b764e21660559978d9bd982425..f652844a54f32adc4488a753705551cd51c04711 100644 --- a/.github/workflows/deploy-relay.yml +++ b/.github/workflows/deploy-relay.yml @@ -38,13 +38,20 @@ jobs: steps: - name: Checkout uses: actions/checkout@v6 + with: + sparse-checkout: | + /* + !/.repos/ + sparse-checkout-cone-mode: false - name: Setup Vite+ uses: voidzero-dev/setup-vp@v1 with: node-version-file: package.json cache: true - run-install: true + run-install: | + args: + - --filter=t3code-relay... - name: Deploy production relay stage id: deploy diff --git a/.github/workflows/mobile-eas-preview.yml b/.github/workflows/mobile-eas-preview.yml index 32e45fef54e5c357530a73247572610999a62070..d8b07208c139de20b6c010c06ac5a1ad4a23358f 100644 --- a/.github/workflows/mobile-eas-preview.yml +++ b/.github/workflows/mobile-eas-preview.yml @@ -2,13 +2,18 @@ name: Mobile EAS Preview on: pull_request: - types: [opened, reopened, synchronize, labeled, unlabeled] + types: [opened, reopened, synchronize, labeled] jobs: preview: name: EAS Preview - if: contains(github.event.pull_request.labels.*.name, '🚀 Mobile Continuous Deployment') + if: | + contains(github.event.pull_request.labels.*.name, '🚀 Mobile Continuous Deployment') && + (github.event.action != 'labeled' || github.event.label.name == '🚀 Mobile Continuous Deployment') runs-on: blacksmith-8vcpu-ubuntu-2404 + concurrency: + group: mobile-eas-preview-${{ github.event.pull_request.number }} + cancel-in-progress: true permissions: contents: read pull-requests: write @@ -34,6 +39,10 @@ jobs: uses: actions/checkout@v6 with: fetch-depth: 0 + sparse-checkout: | + /* + !/.repos/ + sparse-checkout-cone-mode: false - name: Setup Vite+ if: steps.expo-token.outputs.present == 'true' @@ -41,7 +50,9 @@ jobs: with: node-version-file: package.json cache: true - run-install: true + run-install: | + args: + - --filter=@t3tools/mobile... - name: Expose pnpm if: steps.expo-token.outputs.present == 'true' diff --git a/.github/workflows/mobile-eas-production.yml b/.github/workflows/mobile-eas-production.yml index 685df85e57ce4c4e9f930f127833f387a9ba57a6..95cd0ddacc8feae3a69d3fccb97b83c95af40250 100644 --- a/.github/workflows/mobile-eas-production.yml +++ b/.github/workflows/mobile-eas-production.yml @@ -57,6 +57,10 @@ jobs: uses: actions/checkout@v6 with: fetch-depth: 0 + sparse-checkout: | + /* + !/.repos/ + sparse-checkout-cone-mode: false - name: Setup Vite+ if: steps.expo-token.outputs.present == 'true' @@ -64,7 +68,9 @@ jobs: with: node-version-file: package.json cache: true - run-install: true + run-install: | + args: + - --filter=@t3tools/mobile... - name: Expose pnpm if: steps.expo-token.outputs.present == 'true' diff --git a/.github/workflows/mobile-showcase-screenshots.yml b/.github/workflows/mobile-showcase-screenshots.yml index 36dfb61f73f543342aceda9dca7143d6ab3d7fb2..0aa9f30a2ff223b574a0a6e96c7dd1741271a3da 100644 --- a/.github/workflows/mobile-showcase-screenshots.yml +++ b/.github/workflows/mobile-showcase-screenshots.yml @@ -37,13 +37,21 @@ jobs: steps: - name: Checkout uses: actions/checkout@v6 + with: + sparse-checkout: | + /* + !/.repos/ + sparse-checkout-cone-mode: false - name: Setup Vite+ uses: voidzero-dev/setup-vp@v1 with: node-version-file: package.json cache: true - run-install: true + run-install: | + args: + - --filter=@t3tools/mobile... + - --filter=@t3tools/scripts... - name: Expose pnpm run: | @@ -77,13 +85,21 @@ jobs: steps: - name: Checkout uses: actions/checkout@v6 + with: + sparse-checkout: | + /* + !/.repos/ + sparse-checkout-cone-mode: false - name: Setup Vite+ uses: voidzero-dev/setup-vp@v1 with: node-version-file: package.json cache: true - run-install: true + run-install: | + args: + - --filter=@t3tools/mobile... + - --filter=@t3tools/scripts... - name: Expose pnpm run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bc0b0622d7f6c348f45c19cb82398dffceb3d568..ce47d6e6ed73825588ebacbc5530d38ba4f1c6bd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -38,6 +38,10 @@ jobs: uses: actions/checkout@v6 with: fetch-depth: 0 + sparse-checkout: | + /* + !/.repos/ + sparse-checkout-cone-mode: false - id: check name: Compare HEAD to last nightly tag @@ -84,6 +88,10 @@ jobs: uses: actions/checkout@v6 with: fetch-depth: 0 + sparse-checkout: | + /* + !/.repos/ + sparse-checkout-cone-mode: false - name: Setup Vite+ uses: voidzero-dev/setup-vp@v1 @@ -192,6 +200,10 @@ jobs: uses: actions/checkout@v6 with: ref: ${{ needs.preflight.outputs.ref }} + sparse-checkout: | + /* + !/.repos/ + sparse-checkout-cone-mode: false - name: Setup Vite+ uses: voidzero-dev/setup-vp@v1 @@ -269,14 +281,19 @@ jobs: uses: actions/checkout@v6 with: ref: ${{ needs.preflight.outputs.ref }} - fetch-depth: 0 + sparse-checkout: | + /* + !/.repos/ + sparse-checkout-cone-mode: false - name: Setup Vite+ uses: voidzero-dev/setup-vp@v1 with: node-version-file: package.json cache: true - run-install: true + run-install: | + args: + - --filter=t3... - name: Build node-pty linux-x64 prebuild shell: bash @@ -359,14 +376,21 @@ jobs: uses: actions/checkout@v6 with: ref: ${{ needs.preflight.outputs.ref }} - fetch-depth: 0 + sparse-checkout: | + /* + !/.repos/ + sparse-checkout-cone-mode: false - name: Setup Vite+ uses: voidzero-dev/setup-vp@v1 with: node-version-file: package.json cache: true - run-install: true + run-install: | + args: + - --filter=@t3tools/desktop... + - --filter=t3... + - --filter=@t3tools/scripts... - name: Setup Rust uses: dtolnay/rust-toolchain@stable @@ -657,6 +681,10 @@ jobs: uses: actions/checkout@v6 with: ref: ${{ needs.preflight.outputs.ref }} + sparse-checkout: | + /* + !/.repos/ + sparse-checkout-cone-mode: false - name: Setup Vite+ uses: voidzero-dev/setup-vp@v1 @@ -732,6 +760,10 @@ jobs: uses: actions/checkout@v6 with: ref: ${{ needs.preflight.outputs.ref }} + sparse-checkout: | + /* + !/.repos/ + sparse-checkout-cone-mode: false - name: Setup Vite+ uses: voidzero-dev/setup-vp@v1 @@ -853,6 +885,10 @@ jobs: uses: actions/checkout@v6 with: ref: ${{ needs.preflight.outputs.ref }} + sparse-checkout: | + /* + !/.repos/ + sparse-checkout-cone-mode: false - name: Setup Vite+ uses: voidzero-dev/setup-vp@v1 @@ -967,6 +1003,10 @@ jobs: fetch-depth: 0 token: ${{ steps.app_token.outputs.token }} persist-credentials: true + sparse-checkout: | + /* + !/.repos/ + sparse-checkout-cone-mode: false - id: app_bot name: Resolve GitHub App bot identity @@ -1037,6 +1077,10 @@ jobs: uses: actions/checkout@v6 with: ref: ${{ needs.preflight.outputs.ref }} + sparse-checkout: | + /* + !/.repos/ + sparse-checkout-cone-mode: false - name: Setup Vite+ uses: voidzero-dev/setup-vp@v1 -- 2.54.0