layered.sh clones a branch-matching upstream matrix-js-sdk - on this fork that would override the deliberately pinned js-sdk from pnpm-lock.yaml (issue #12) with upstream develop, and it also needs jq which the node:20 job container lacks (the actual CI failure). Plain frozen-lockfile install matches the production docker build. Also replace the contains(needs.*.result, ...) gate check with explicit per-job checks: the object-filter syntax evaluated wrongly on Gitea/act, letting build-complete report success while build_ew had failed. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
129 lines
5.2 KiB
YAML
129 lines
5.2 KiB
YAML
# builds Element Web
|
|
# builds Element Desktop (Linux) using the built Element Web
|
|
#
|
|
# Tries to use a matching js-sdk branch for the build.
|
|
#
|
|
# Produces a `webapp` artifact
|
|
# Produces Desktop artifacts
|
|
#
|
|
# Fork-Anpassungen (siehe docs/axion1337-fork.md):
|
|
# - runs-on-Labels auf die tatsaechlich registrierten Runner-Labels gemappt
|
|
# (builder-1 auf CFGMON: ubuntu-latest, linux-build, win-wine - KEIN
|
|
# ubuntu-24.04, kein macOS, kein natives Windows).
|
|
# - playwright_ew/downstream-modules entfernt: brauchen Docker-Zugriff im
|
|
# Job-Container (Testcontainers) und Browser-Setups, die der aktuelle
|
|
# Runner nicht bereitstellt - als Folgearbeit in Issue #2 nachgehalten.
|
|
# - build_ed_windows entfernt: build_desktop_windows.yaml ist fuer native
|
|
# Windows-Runner geschrieben (signtool-Pfade, MSVC-Targets, PowerShell).
|
|
# Das win-wine-Runner-Label existiert fuer eine kuenftige Wine-basierte
|
|
# Variante, die aber einen eigenen Workflow braucht.
|
|
# - build_ed_macos entfernt: kein macOS-Runner vorhanden.
|
|
name: Build & Test
|
|
on:
|
|
# CRON to run all Projects at 6am UTC
|
|
schedule:
|
|
- cron: "0 6 * * *"
|
|
pull_request: {}
|
|
push:
|
|
branches: [main]
|
|
# workflow_call entfernt: nichts in diesem Repo ruft build-and-test.yaml per
|
|
# workflow_call auf (verifiziert), und die Kombination push+workflow_call im
|
|
# selben on:-Block triggert auf Gitea Actions 1.27 nicht zuverlaessig bei push
|
|
# (bekannter, als "not planned" geschlossener Gitea-Bug #33238).
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
|
|
cancel-in-progress: true
|
|
|
|
env:
|
|
# fetchdep.sh needs to know our PR number
|
|
PR_NUMBER: ${{ github.event.pull_request.number }}
|
|
NX_DEFAULT_OUTPUT_STYLE: stream-without-prefixes
|
|
|
|
permissions: {} # No permissions required
|
|
|
|
jobs:
|
|
build_ew:
|
|
name: "Build Element Web"
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
|
with:
|
|
repository: ${{ github.repository }}
|
|
persist-credentials: false
|
|
|
|
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5
|
|
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
|
|
with:
|
|
cache: "pnpm"
|
|
node-version: "lts/*"
|
|
|
|
# Upstream nutzt hier scripts/layered.sh, das eine zum Branch passende
|
|
# matrix-js-sdk-Version klont - fuer diesen Fork falsch: es wuerde den
|
|
# bewusst gepinnten js-sdk-Stand aus pnpm-lock.yaml (Issue #12) mit
|
|
# Upstream-develop ueberschreiben. Der Lockfile-Stand ist hier autoritativ,
|
|
# genau wie im Produktions-Docker-Build. (Nebenbei: layered.sh braucht jq,
|
|
# das im node:20-Job-Container fehlt.)
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Copy config
|
|
working-directory: apps/web
|
|
run: cp element.io/develop/config.json config.json
|
|
|
|
- name: Build
|
|
env:
|
|
CI_PACKAGE: true
|
|
working-directory: apps/web
|
|
run: VERSION=$(scripts/get-version-from-git.sh) pnpm run build
|
|
|
|
- name: Upload Artifact
|
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
|
|
with:
|
|
name: webapp
|
|
path: apps/web/webapp
|
|
retention-days: 1
|
|
|
|
prepare_ed:
|
|
name: "Prepare Element Desktop"
|
|
uses: ./.github/workflows/build_desktop_prepare.yaml
|
|
needs: build_ew
|
|
permissions:
|
|
contents: read
|
|
with:
|
|
config: element.io/release
|
|
webapp-artifact: webapp
|
|
|
|
build_ed_linux:
|
|
needs: prepare_ed
|
|
name: "Desktop Linux"
|
|
uses: ./.github/workflows/build_desktop_linux.yaml
|
|
with:
|
|
# Wir shippen static-sqlcipher-amd64-Builds; arm64/system-Varianten
|
|
# sind auf dem einzigen x86-Runner nicht sinnvoll baubar.
|
|
sqlcipher: static
|
|
arch: amd64
|
|
runs-on: linux-build
|
|
# Desktop-Playwright-Tests brauchen Display-/Browser-Setup, das der
|
|
# Runner (noch) nicht bietet - gleiche Folgearbeit wie playwright_ew.
|
|
test: false
|
|
|
|
complete:
|
|
name: build-complete
|
|
needs:
|
|
- build_ew
|
|
- prepare_ed
|
|
- build_ed_linux
|
|
if: always()
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
# Explizite Einzel-Checks statt contains(needs.*.result, ...): die
|
|
# Objekt-Filter-Syntax wertete auf Gitea/act falsch aus - das Gate war
|
|
# "success", obwohl build_ew fehlgeschlagen (und der Rest geskippt) war.
|
|
- name: Check all builds succeeded
|
|
run: |
|
|
[ "${{ needs.build_ew.result }}" = "success" ] || { echo "build_ew: ${{ needs.build_ew.result }}"; exit 1; }
|
|
[ "${{ needs.prepare_ed.result }}" = "success" ] || { echo "prepare_ed: ${{ needs.prepare_ed.result }}"; exit 1; }
|
|
[ "${{ needs.build_ed_linux.result }}" = "success" ] || { echo "build_ed_linux: ${{ needs.build_ed_linux.result }}"; exit 1; }
|