From 1dbc84ba22076262fa1b027924e5948be2acadc2 Mon Sep 17 00:00:00 2001 From: Thomas Braun Date: Fri, 13 Dec 2024 23:24:40 +0100 Subject: [PATCH 1/2] .github/workflows/build-pr.yml: Remove colon from job names Having a colon in the name makes it impossible to add the job to the branch rules. After consulting with github support, it seems renaming is the most straightforward solution. --- .github/workflows/build-pr.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml index dab1983c42..d3e3d81753 100644 --- a/.github/workflows/build-pr.yml +++ b/.github/workflows/build-pr.yml @@ -115,8 +115,7 @@ jobs: run: tools/pre-commit/run.sh CompilationTest: - name: | - 👩🏾‍🔬 Compilation: ${{ matrix.source }} ${{ fromJSON('["","with XOP"]')[matrix.hardware] }} + name: 👩🏾‍🔬 Compilation of ${{ matrix.source }} ${{ fromJSON('["","with XOP"]')[matrix.hardware] }} needs: - BuildInstaller strategy: @@ -129,8 +128,7 @@ jobs: hardware: false uses: ./.github/workflows/test-igor-workflow.yml with: - job_name: | - 👩🏾‍🔬 Compilation: ${{ matrix.source }} ${{ fromJSON('["","with XOP"]')[matrix.hardware] }} + job_name: 👩🏾‍🔬 Compilation of ${{ matrix.source }} ${{ fromJSON('["","with XOP"]')[matrix.hardware] }} overwrite_job_name: ${{ inputs.is_called_workflow || false }} experiment: Packages/tests/Compilation/CompilationTester.pxp installer_artifact_name: BuildInstaller-dev-assets @@ -139,13 +137,11 @@ jobs: timeout_minutes: 60 CompilationEachCommitTest: - name: | - 👩🏾‍🔬 Compilation: Each commit + name: 👩🏾‍🔬 Compilation of each commit if: ${{ !inputs.is_called_workflow }} uses: ./.github/workflows/test-igor-rebase-exec-workflow.yml with: - job_name: | - 👩🏾‍🔬 Compilation: Each commit + job_name: 👩🏾‍🔬 Compilation of each commit overwrite_job_name: ${{ inputs.is_called_workflow || false }} experiment: Packages/tests/Compilation/CompilationTester.pxp installer_flags: "-s git" From dc29f2d7fbf2e5283f864a2679262b8c3f35a14c Mon Sep 17 00:00:00 2001 From: Thomas Braun Date: Sun, 15 Dec 2024 13:17:29 +0100 Subject: [PATCH 2/2] .github/workflows/test-igor-rebase-exec-workflow.yml: Fix it for the release branch In c3e7dc3a (.github/workflows: Add job to compile test each commit, 2023-12-22) we introduced a compilation test of each commit in the branch. But we assumed that the base branch, the branch we want to merge into, is origin/main. This is not true for the release branches. As there is no way to gather the base branch for on.push workflows [1] we added some code to get the release branch with the highest version and then check if we are an ancestor of that or origin/main. [1]: https://github.com/orgs/community/discussions/26243#discussioncomment-3250924 --- .github/workflows/test-igor-rebase-exec-workflow.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-igor-rebase-exec-workflow.yml b/.github/workflows/test-igor-rebase-exec-workflow.yml index 8bde2ae0ee..79bd89c964 100644 --- a/.github/workflows/test-igor-rebase-exec-workflow.yml +++ b/.github/workflows/test-igor-rebase-exec-workflow.yml @@ -78,15 +78,23 @@ jobs: ref: ${{ github.sha }} - name: Initial repo config run: tools/initial-repo-config.sh + - name: Get latest release branch + run: | + CI_RELEASE_BRANCH=$(git branch --sort="version:refname" -rl "origin/release*" | tail -n1) + echo "CI_RELEASE_BRANCH=$CI_RELEASE_BRANCH" >> $GITHUB_ENV + - name: Gather base branch + run: | + CI_BASE_BRANCH=$((git merge-base --is-ancestor ${{ env.CI_RELEASE_BRANCH }} HEAD && echo "${{ env.CI_RELEASE_BRANCH }}") || echo "origin/main") + echo "CI_BASE_BRANCH=$CI_BASE_BRANCH" >> $GITHUB_ENV - name: List of commits to operate on - run: git log --pretty=ref origin/main.. + run: git log --pretty=ref ${{ env.CI_BASE_BRANCH }}.. - name: Cleanup earlier rebase invocations run: git rebase --quit 2>/dev/null || true - name: Compile check each commit with ${{ inputs.experiment }} run: | git rebase --exec "git log --pretty=ref -n1" \ --exec "tools/clean_mies_installation.sh ${{ inputs.installer_flags }}" \ - --exec "tools/autorun-test.sh -p ${{ inputs.experiment }} -v IP_9_64" origin/main + --exec "tools/autorun-test.sh -p ${{ inputs.experiment }} -v IP_9_64" ${{ env.CI_BASE_BRANCH }} - name: Gather log files and crash dumps if: always() run: tools/gather-logfiles-and-crashdumps.sh