From b5bb07d6a326988c95d6a5e90dbef211f325da46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Dinis=20Ferreira?= Date: Wed, 30 Sep 2026 12:37:19 +0200 Subject: [PATCH] ci: build master changes through a merge queue Run the verify checks on merge_group so master can be gated by a merge queue that builds one PR at a time on top of the current master. Merge-queue and snapshot builds keep replacing artifacts with the published snapshot's, but now fail when a version the snapshot already has comes with different content (-Dtycho.baseline=failCommon) instead of silently swapping in the published copy. Two merges within one minute gave the runtime feature one version for two contents; the snapshot build then took #1551's feature, which pins xtext.ui 17.3.3, and failed to resolve the umbrella feature. PR builds no longer replace anything with the published snapshot, so a bad or newer snapshot cannot fail an unrelated PR; the queue build checks the PR against master. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/snapshot.yml | 2 ++ .github/workflows/verify.yml | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml index 5f0143fd1..a4d8e9e6e 100644 --- a/.github/workflows/snapshot.yml +++ b/.github/workflows/snapshot.yml @@ -65,10 +65,12 @@ jobs: run: rm -rf ~/.m2/repository/.cache/tycho/https/dsldevkit.github.io ~/.m2/repository/.cache/tycho/https/ddk.tools.avaloq.com - name: Build p2 update site + # Fail rather than swap in a published artifact of the same version with different content. run: | xvfb-run mvn clean verify \ checkstyle:check pmd:pmd pmd:cpd pmd:check pmd:cpd-check spotbugs:check \ -f ./ddk-parent/pom.xml \ + -Dtycho.baseline=failCommon \ --batch-mode --fail-at-end - name: Fail on missing surefire reports diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index 2322f216b..ab38c81e8 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -1,6 +1,7 @@ name: verify on: pull_request: + merge_group: jobs: pmd: runs-on: ubuntu-24.04 @@ -76,7 +77,10 @@ jobs: - name: Build with Maven within a virtual X Server Environment # Run pmd:pmd and pmd:cpd first to generate reports for all modules, then run pmd:check and pmd:cpd-check # This ensures all violations are collected and reported before the build fails - run: xvfb-run mvn clean verify checkstyle:check pmd:pmd pmd:cpd pmd:check pmd:cpd-check spotbugs:check -f ./ddk-parent/pom.xml --batch-mode --fail-at-end + # PR builds ignore the published snapshot; merge-queue builds use it exactly as the snapshot build does. + env: + BASELINE_ARGS: ${{ github.event_name == 'merge_group' && '-Dtycho.baseline=failCommon' || '-Dtycho.baseline=disable -Dtycho.baseline.replace=none' }} + run: xvfb-run mvn clean verify checkstyle:check pmd:pmd pmd:cpd pmd:check pmd:cpd-check spotbugs:check -f ./ddk-parent/pom.xml --batch-mode --fail-at-end $BASELINE_ARGS - name: Fail on missing surefire reports if: always() run: bash .github/scripts/check-surefire-reports.sh