Set up a layered build for CI similar to what EW does

This commit is contained in:
Johannes Marbach
2026-09-30 11:35:06 +02:00
parent 81233e5cfb
commit bd8c3142a6
8 changed files with 182 additions and 2 deletions
+12
View File
@@ -14,6 +14,11 @@ on:
description: The build mode for vite. Must be either 'development' or 'production'
required: false
default: production
layered:
type: boolean
description: Build against the matching branch of matrix-js-sdk (if any) instead of the locked commit.
required: false
default: false
secrets:
SENTRY_ORG:
required: true
@@ -43,8 +48,15 @@ jobs:
cache: "pnpm"
node-version-file: ".node-version"
- name: Install dependencies
if: ${{ !inputs.layered }}
# ignore-pnpmfile should never be commited. Make CI crash if it happened (`pnpmfileChecksum` is present)
run: "pnpm install --frozen-lockfile --ignore-pnpmfile"
- name: Install dependencies (layered)
if: ${{ inputs.layered }}
# ignore-pnpmfile should never be commited. Make CI crash if it happened (`pnpmfileChecksum` is present)
run: "scripts/layered.sh --ignore-pnpmfile"
env:
PR_HEAD_REPO_OWNER: ${{ github.event.pull_request.head.repo.owner.login }}
- name: Build Element Call
run: pnpm run build:"$PACKAGE":"$BUILD_MODE"
env: