Make lite version of CI (#5188)

# Description of Changes
Add lite mode for CI which just runs the most important jobs for
deployment. This won't be used in this repo, but allows other repos
containing Stirling to easily disable jobs like desktop builds etc. if
they're unnecessary, without needing to deal with conflicts in the
files. They'll just need to set the repo variable `CI_PROFILE` to
`lite`. We have an upstream repo that we'd like these changes for.
This commit is contained in:
James Brunton
2025-12-10 13:54:57 +00:00
committed by GitHub
parent 787d0d21c9
commit b83888c74a
11 changed files with 24 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
# CI Configuration
## CI Lite Mode
Skip non-essential CI workflows by setting a repository variable:
**Settings → Secrets and variables → Actions → Variables → New repository variable**
- Name: `CI_PROFILE`
- Value: `lite`
Skips resource-intensive builds, releases, and OSS-specific workflows. Useful for deployment-only forks or faster CI runs.
@@ -14,6 +14,7 @@ jobs:
permissions: permissions:
issues: write issues: write
if: | if: |
vars.CI_PROFILE != 'lite' &&
github.event.issue.pull_request && github.event.issue.pull_request &&
( (
contains(github.event.comment.body, 'prdeploy') || contains(github.event.comment.body, 'prdeploy') ||
+1
View File
@@ -31,6 +31,7 @@ permissions:
jobs: jobs:
determine-matrix: determine-matrix:
if: ${{ vars.CI_PROFILE != 'lite' }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
outputs: outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }} matrix: ${{ steps.set-matrix.outputs.matrix }}
+1
View File
@@ -24,6 +24,7 @@ permissions:
jobs: jobs:
push: push:
if: ${{ vars.CI_PROFILE != 'lite' }}
runs-on: ubuntu-24.04-8core runs-on: ubuntu-24.04-8core
permissions: permissions:
packages: write packages: write
+1
View File
@@ -24,6 +24,7 @@ permissions:
jobs: jobs:
push: push:
if: ${{ vars.CI_PROFILE != 'lite' }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions:
packages: write packages: write
+1
View File
@@ -17,6 +17,7 @@ permissions: read-all
jobs: jobs:
analysis: analysis:
if: ${{ vars.CI_PROFILE != 'lite' }}
name: Scorecard analysis name: Scorecard analysis
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions:
+1
View File
@@ -27,6 +27,7 @@ permissions:
jobs: jobs:
sonarqube: sonarqube:
if: ${{ vars.CI_PROFILE != 'lite' }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Harden Runner - name: Harden Runner
+1
View File
@@ -10,6 +10,7 @@ permissions:
jobs: jobs:
stale: stale:
if: ${{ vars.CI_PROFILE != 'lite' }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions:
issues: write issues: write
+1
View File
@@ -23,6 +23,7 @@ permissions:
jobs: jobs:
push: push:
if: ${{ vars.CI_PROFILE != 'lite' }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Harden Runner - name: Harden Runner
+3
View File
@@ -28,6 +28,7 @@ permissions:
jobs: jobs:
determine-matrix: determine-matrix:
if: ${{ vars.CI_PROFILE != 'lite' }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
outputs: outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }} matrix: ${{ steps.set-matrix.outputs.matrix }}
@@ -636,6 +637,8 @@ jobs:
if [ "${{ needs.build.result }}" = "success" ]; then if [ "${{ needs.build.result }}" = "success" ]; then
echo "✅ All Tauri builds completed successfully!" echo "✅ All Tauri builds completed successfully!"
echo "Artifacts are ready for distribution." echo "Artifacts are ready for distribution."
elif [ "${{ needs.build.result }}" = "skipped" ]; then
echo "⏭️ Tauri builds skipped (CI lite mode enabled)"
else else
echo "❌ Some Tauri builds failed." echo "❌ Some Tauri builds failed."
echo "Please check the logs and fix any issues." echo "Please check the logs and fix any issues."
+1
View File
@@ -21,6 +21,7 @@ permissions:
jobs: jobs:
deploy: deploy:
if: ${{ vars.CI_PROFILE != 'lite' }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Harden Runner - name: Harden Runner