From c059f19cc66eb502157e8f5b0756c69e79416083 Mon Sep 17 00:00:00 2001 From: James Rich <2199651+jamesarich@users.noreply.github.com> Date: Sun, 12 Apr 2026 13:59:21 -0500 Subject: [PATCH] =?UTF-8?q?ci:=20reduce=20CI=20costs=20by=20~54%=20?= =?UTF-8?q?=E2=80=94=20skip=20desktop=20builds=20in=20PR/main,=20reduce=20?= =?UTF-8?q?scheduled=20frequency=20(#5090)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/docs.yml | 16 +++++++++++++--- .github/workflows/main-check.yml | 7 ++++--- .github/workflows/pull-request.yml | 5 ++++- .github/workflows/reusable-check.yml | 4 ++++ .github/workflows/scheduled-updates.yml | 4 ++-- 5 files changed, 27 insertions(+), 9 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 568da41f4..faa9ff3c3 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -6,6 +6,16 @@ on: push: branches: - main + paths: + # Only rebuild docs when source code changes (Dokka generates from KDoc) + - 'app/src/**' + - 'core/**/src/**' + - 'feature/**/src/**' + - 'desktop/src/**' + - 'build-logic/**' + - 'build.gradle.kts' + - 'settings.gradle.kts' + - '.github/workflows/docs.yml' # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -29,11 +39,11 @@ permissions: pages: write id-token: write -# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. -# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +# Allow only one concurrent deployment; cancel queued runs since only the latest +# main state matters for documentation. concurrency: group: "pages" - cancel-in-progress: false + cancel-in-progress: true jobs: build-docs: diff --git a/.github/workflows/main-check.yml b/.github/workflows/main-check.yml index 4c29847a3..4ef967dfc 100644 --- a/.github/workflows/main-check.yml +++ b/.github/workflows/main-check.yml @@ -20,8 +20,9 @@ jobs: uses: ./.github/workflows/reusable-check.yml with: run_lint: true - run_unit_tests: true - run_instrumented_tests: true - api_levels: '[35]' # One API level is enough for post-merge sanity check + run_unit_tests: false + run_instrumented_tests: false + run_desktop_builds: false + api_levels: '[35]' upload_artifacts: true secrets: inherit diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 0d2b67b36..7c2ea7f50 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -99,7 +99,9 @@ jobs: PY # 2. VALIDATION & BUILD: Delegate to reusable-check.yml - # We disable instrumented tests and coverage for PRs to keep feedback fast (< 10 mins). + # We disable instrumented tests, coverage, and desktop builds for PRs to keep + # feedback fast (< 10 mins). Desktop compilation is already covered by the + # :desktop:test task in the shard-app test shard. validate-and-build: needs: check-changes if: needs.check-changes.outputs.android == 'true' @@ -109,6 +111,7 @@ jobs: run_unit_tests: true run_instrumented_tests: false run_coverage: false + run_desktop_builds: false api_levels: '[35]' upload_artifacts: true secrets: inherit diff --git a/.github/workflows/reusable-check.yml b/.github/workflows/reusable-check.yml index c67cc280a..8e310e9ac 100644 --- a/.github/workflows/reusable-check.yml +++ b/.github/workflows/reusable-check.yml @@ -18,6 +18,9 @@ on: api_levels: type: string default: '[35]' + run_desktop_builds: + type: boolean + default: true upload_artifacts: type: boolean default: true @@ -358,6 +361,7 @@ jobs: # ── Desktop Build ─────────────────────────────────────────────────── build-desktop: name: Build Desktop Debug (${{ matrix.os }}) + if: inputs.run_desktop_builds == true runs-on: ${{ matrix.os }} permissions: contents: read diff --git a/.github/workflows/scheduled-updates.yml b/.github/workflows/scheduled-updates.yml index d516537e0..2399d1f88 100644 --- a/.github/workflows/scheduled-updates.yml +++ b/.github/workflows/scheduled-updates.yml @@ -2,8 +2,8 @@ name: Scheduled Updates (Firmware, Hardware, Translations) on: schedule: - - cron: '0 * * * *' # Run every hour - workflow_dispatch: # Allow manual triggering + - cron: '0 */4 * * *' # Run every 4 hours (was hourly — reduced to cut cascade CI cost) + workflow_dispatch: # Allow manual triggering jobs: update_assets: