ci: reduce CI costs by ~54% — skip desktop builds in PR/main, reduce scheduled frequency (#5090)

This commit is contained in:
James Rich 2026-04-12 13:59:21 -05:00 committed by GitHub
parent ade314d503
commit c059f19cc6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 27 additions and 9 deletions

View file

@ -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:

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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: