From 0c6d2820b9067bf551acff1ae4ac8811eab21758 Mon Sep 17 00:00:00 2001 From: Virgil Calvez Date: Tue, 27 Jan 2026 14:39:37 +0100 Subject: [PATCH 01/10] init github script --- .github/scripts/extract_matrix.py | 3 +-- .github/workflows/ci-unittests.yml | 43 +++++++++++++++++++++--------- 2 files changed, 31 insertions(+), 15 deletions(-) diff --git a/.github/scripts/extract_matrix.py b/.github/scripts/extract_matrix.py index 65a0b6bb3b..2995274940 100644 --- a/.github/scripts/extract_matrix.py +++ b/.github/scripts/extract_matrix.py @@ -75,9 +75,8 @@ "ECLIPSE": "https://www.eclipse.org/downloads/download.php?file=/eclipse/downloads/drops4/R-4.26-202211231800/eclipse-SDK-4.26-linux-gtk-x86_64.tar.gz" } -# Gitlab Runners OSS +# Github Runners OSS OSS = { - "macos-latest": ["darwin", "aarch64"], "ubuntu-latest": ["linux", "amd64"], "ubuntu-24.04-arm": ["linux", "aarch64"], "windows-latest": ["windows", "amd64"] diff --git a/.github/workflows/ci-unittests.yml b/.github/workflows/ci-unittests.yml index 4493dcb7bf..aac46a7932 100644 --- a/.github/workflows/ci-unittests.yml +++ b/.github/workflows/ci-unittests.yml @@ -5,17 +5,34 @@ on: workflow_dispatch: jobs: - build-standalone-artifacts: - if: github.event.pull_request.draft == false && success() - uses: ./.github/workflows/ci-matrix-gen.yml - with: - jobs_to_run: ^(?:python-svm-build|style|style-ecj)-gate-.*$ - logs_retention_days: 0 - artifacts_retention_days: 0 + # build-standalone-artifacts: + # if: github.event.pull_request.draft == false && success() + # uses: ./.github/workflows/ci-matrix-gen.yml + # with: + # jobs_to_run: ^(?:python-svm-build|style|style-ecj)-gate-.*$ + # logs_retention_days: 0 + # artifacts_retention_days: 0 - run-tests: - if: github.event.pull_request.draft == false && success() - needs: build-standalone-artifacts - uses: ./.github/workflows/ci-matrix-gen.yml - with: - jobs_to_run: ^(?!python-svm-build|style).*-gate.*$ + # run-tests: + # if: success() + # needs: build-standalone-artifacts + # uses: ./.github/workflows/ci-matrix-gen.yml + # with: + # jobs_to_run: ^(?!python-svm-build|style).*-gate.*$ + + post-run: + # needs: run-tests + runs-on: ubuntu-latest + steps: + - uses: actions/github-script@v8 + with: + script: | + var payload = context.payload + console.log(payload) + console.log(payload.user) + github.rest.issues.createComment({ + issue_number: payload.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: `@Ariouz - One or more CI jobs failed` + }) From cd6d3eda30ae85e5824c8435550b4f6484b311c8 Mon Sep 17 00:00:00 2001 From: Virgil Calvez Date: Tue, 27 Jan 2026 14:53:18 +0100 Subject: [PATCH 02/10] Disable on workflow trigger --- .github/workflows/ci-unittests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci-unittests.yml b/.github/workflows/ci-unittests.yml index aac46a7932..0f128518af 100644 --- a/.github/workflows/ci-unittests.yml +++ b/.github/workflows/ci-unittests.yml @@ -28,6 +28,7 @@ jobs: with: script: | var payload = context.payload + if (!payload || !payload.number) return ; console.log(payload) console.log(payload.user) github.rest.issues.createComment({ From 11418e8fad9e384de482666ddf470b37664a5d55 Mon Sep 17 00:00:00 2001 From: Virgil Calvez Date: Tue, 27 Jan 2026 14:57:16 +0100 Subject: [PATCH 03/10] Add checks before commenting --- .github/workflows/ci-unittests.yml | 41 +++++++++++++++++------------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci-unittests.yml b/.github/workflows/ci-unittests.yml index 0f128518af..c0743e2d25 100644 --- a/.github/workflows/ci-unittests.yml +++ b/.github/workflows/ci-unittests.yml @@ -5,35 +5,42 @@ on: workflow_dispatch: jobs: - # build-standalone-artifacts: - # if: github.event.pull_request.draft == false && success() - # uses: ./.github/workflows/ci-matrix-gen.yml - # with: - # jobs_to_run: ^(?:python-svm-build|style|style-ecj)-gate-.*$ - # logs_retention_days: 0 - # artifacts_retention_days: 0 + build-standalone-artifacts: + if: github.event.pull_request.draft == false && success() + uses: ./.github/workflows/ci-matrix-gen.yml + with: + jobs_to_run: ^(?:python-svm-build|style|style-ecj)-gate-.*$ + logs_retention_days: 0 + artifacts_retention_days: 0 - # run-tests: - # if: success() - # needs: build-standalone-artifacts - # uses: ./.github/workflows/ci-matrix-gen.yml - # with: - # jobs_to_run: ^(?!python-svm-build|style).*-gate.*$ + run-tests: + if: success() + needs: build-standalone-artifacts + uses: ./.github/workflows/ci-matrix-gen.yml + with: + jobs_to_run: ^(?!python-svm-build|style).*-gate.*$ post-run: - # needs: run-tests + if: failure() + needs: run-tests runs-on: ubuntu-latest steps: - uses: actions/github-script@v8 with: script: | + const GRAALVMBOT_LOGIN = "graalvmbot" var payload = context.payload if (!payload || !payload.number) return ; - console.log(payload) - console.log(payload.user) + + var author = payload.pull_request.user + var assignees = payload.pull_request.assignees + + if (!author || author.login !== GRAALVMBOT_LOGIN) return ; + if (!assignees || assignees.length != 1) return ; + github.rest.issues.createComment({ issue_number: payload.number, owner: context.repo.owner, repo: context.repo.repo, - body: `@Ariouz - One or more CI jobs failed` + body: `@{assignees[0].login} - One or more CI jobs failed` }) From 8855d851a213acdc2da8beff763f6d88ea264c35 Mon Sep 17 00:00:00 2001 From: Virgil Calvez Date: Tue, 27 Jan 2026 15:15:16 +0100 Subject: [PATCH 04/10] Fix user mention --- .github/workflows/ci-unittests.yml | 34 +++++++++++++++--------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci-unittests.yml b/.github/workflows/ci-unittests.yml index c0743e2d25..596b9932bd 100644 --- a/.github/workflows/ci-unittests.yml +++ b/.github/workflows/ci-unittests.yml @@ -5,30 +5,30 @@ on: workflow_dispatch: jobs: - build-standalone-artifacts: - if: github.event.pull_request.draft == false && success() - uses: ./.github/workflows/ci-matrix-gen.yml - with: - jobs_to_run: ^(?:python-svm-build|style|style-ecj)-gate-.*$ - logs_retention_days: 0 - artifacts_retention_days: 0 + # build-standalone-artifacts: + # if: github.event.pull_request.draft == false && success() + # uses: ./.github/workflows/ci-matrix-gen.yml + # with: + # jobs_to_run: ^(?:python-svm-build|style|style-ecj)-gate-.*$ + # logs_retention_days: 0 + # artifacts_retention_days: 0 - run-tests: - if: success() - needs: build-standalone-artifacts - uses: ./.github/workflows/ci-matrix-gen.yml - with: - jobs_to_run: ^(?!python-svm-build|style).*-gate.*$ + # run-tests: + # if: success() + # needs: build-standalone-artifacts + # uses: ./.github/workflows/ci-matrix-gen.yml + # with: + # jobs_to_run: ^(?!python-svm-build|style).*-gate.*$ post-run: - if: failure() - needs: run-tests + # if: failure() + # needs: run-tests runs-on: ubuntu-latest steps: - uses: actions/github-script@v8 with: script: | - const GRAALVMBOT_LOGIN = "graalvmbot" + const GRAALVMBOT_LOGIN = "Ariouz" var payload = context.payload if (!payload || !payload.number) return ; @@ -42,5 +42,5 @@ jobs: issue_number: payload.number, owner: context.repo.owner, repo: context.repo.repo, - body: `@{assignees[0].login} - One or more CI jobs failed` + body: `@${assignees[0].login} - One or more CI jobs failed` }) From 810d1b70124503790bf4594683251a5d59aaea24 Mon Sep 17 00:00:00 2001 From: Virgil Calvez Date: Tue, 27 Jan 2026 15:19:58 +0100 Subject: [PATCH 05/10] Set author to graalvmbot --- .github/workflows/ci-unittests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-unittests.yml b/.github/workflows/ci-unittests.yml index 596b9932bd..7a4d0b17f0 100644 --- a/.github/workflows/ci-unittests.yml +++ b/.github/workflows/ci-unittests.yml @@ -28,7 +28,7 @@ jobs: - uses: actions/github-script@v8 with: script: | - const GRAALVMBOT_LOGIN = "Ariouz" + const GRAALVMBOT_LOGIN = "graalvmbot" var payload = context.payload if (!payload || !payload.number) return ; From 68157c967c5e4031faf9087916964eb370ffd89b Mon Sep 17 00:00:00 2001 From: Virgil Calvez Date: Tue, 27 Jan 2026 15:21:41 +0100 Subject: [PATCH 06/10] Run after ci unittests --- .github/scripts/extract_matrix.py | 1 + .github/workflows/ci-unittests.yml | 30 +++++++++++++++--------------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/.github/scripts/extract_matrix.py b/.github/scripts/extract_matrix.py index 2995274940..ab230a8896 100644 --- a/.github/scripts/extract_matrix.py +++ b/.github/scripts/extract_matrix.py @@ -77,6 +77,7 @@ # Github Runners OSS OSS = { + "macos-latest": ["darwin", "aarch64"], "ubuntu-latest": ["linux", "amd64"], "ubuntu-24.04-arm": ["linux", "aarch64"], "windows-latest": ["windows", "amd64"] diff --git a/.github/workflows/ci-unittests.yml b/.github/workflows/ci-unittests.yml index 7a4d0b17f0..ecaa64bf05 100644 --- a/.github/workflows/ci-unittests.yml +++ b/.github/workflows/ci-unittests.yml @@ -5,24 +5,24 @@ on: workflow_dispatch: jobs: - # build-standalone-artifacts: - # if: github.event.pull_request.draft == false && success() - # uses: ./.github/workflows/ci-matrix-gen.yml - # with: - # jobs_to_run: ^(?:python-svm-build|style|style-ecj)-gate-.*$ - # logs_retention_days: 0 - # artifacts_retention_days: 0 + build-standalone-artifacts: + if: github.event.pull_request.draft == false && success() + uses: ./.github/workflows/ci-matrix-gen.yml + with: + jobs_to_run: ^(?:python-svm-build|style|style-ecj)-gate-.*$ + logs_retention_days: 0 + artifacts_retention_days: 0 - # run-tests: - # if: success() - # needs: build-standalone-artifacts - # uses: ./.github/workflows/ci-matrix-gen.yml - # with: - # jobs_to_run: ^(?!python-svm-build|style).*-gate.*$ + run-tests: + if: success() + needs: build-standalone-artifacts + uses: ./.github/workflows/ci-matrix-gen.yml + with: + jobs_to_run: ^(?!python-svm-build|style).*-gate.*$ post-run: - # if: failure() - # needs: run-tests + if: failure() + needs: run-tests runs-on: ubuntu-latest steps: - uses: actions/github-script@v8 From d4816ae6f9c4bdfda4e88f7a903ca57e97f328b1 Mon Sep 17 00:00:00 2001 From: Virgil Calvez Date: Tue, 27 Jan 2026 15:57:09 +0100 Subject: [PATCH 07/10] Comment on closed PR --- .github/workflows/ci-unittests.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-unittests.yml b/.github/workflows/ci-unittests.yml index ecaa64bf05..71b41c17ea 100644 --- a/.github/workflows/ci-unittests.yml +++ b/.github/workflows/ci-unittests.yml @@ -31,15 +31,17 @@ jobs: const GRAALVMBOT_LOGIN = "graalvmbot" var payload = context.payload if (!payload || !payload.number) return ; - - var author = payload.pull_request.user - var assignees = payload.pull_request.assignees + var pr = payload.pull_request + if (!pr || pr.state !== "closed") return ; + + var author = pr.user + var assignees = pr.assignees if (!author || author.login !== GRAALVMBOT_LOGIN) return ; if (!assignees || assignees.length != 1) return ; github.rest.issues.createComment({ - issue_number: payload.number, + issue_number: pr.number, owner: context.repo.owner, repo: context.repo.repo, body: `@${assignees[0].login} - One or more CI jobs failed` From 7972856df6538dc52390eb79499064b18ba5f10c Mon Sep 17 00:00:00 2001 From: Virgil Calvez Date: Wed, 28 Jan 2026 13:47:14 +0100 Subject: [PATCH 08/10] Run in separate workflow triggered on PR close --- .github/workflows/ci-post-merge.yml | 49 +++++++++++++++++++++++++++++ .github/workflows/ci-unittests.yml | 29 +---------------- 2 files changed, 50 insertions(+), 28 deletions(-) create mode 100644 .github/workflows/ci-post-merge.yml diff --git a/.github/workflows/ci-post-merge.yml b/.github/workflows/ci-post-merge.yml new file mode 100644 index 0000000000..db73529c5c --- /dev/null +++ b/.github/workflows/ci-post-merge.yml @@ -0,0 +1,49 @@ +name: Post Merge Actions +on: + pull_request: + types: [closed] + +jobs: + check-ci-and-notify: + runs-on: ubuntu-latest + steps: + - uses: actions/github-script@v8 + with: + script: | + const GRAALVMBOT_LOGIN = "Ariouz"; + const pr = context.payload.pull_request; + if (!pr || !pr.number || pr.state !== "closed") return; + + const author = pr.user; + const assignees = pr.assignees || []; + if (!author || author.login !== GRAALVMBOT_LOGIN) return; + if (assignees.length !== 1) return; + + const sha = pr.head.sha; + + const runsResp = await github.rest.actions.listWorkflowRunsForRepo({ + owner: context.repo.owner, + repo: context.repo.repo, + head_sha: sha, + event: "pull_request", + per_page: 10 + }); + + const failedRun = runsResp.data.workflow_runs.find(run => + run.head_sha === sha && + run.status === "completed" && + run.conclusion !== "success" + ); + + if (!failedRun) { + console.log("No failed CI workflow found for the PR."); + return; + } + + await github.rest.issues.createComment({ + issue_number: pr.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: `@${assignees[0].login} - One or more CI jobs failed - [details](${failedRun.html_url}))` + }); + console.log("CI failed, assignee notified.") \ No newline at end of file diff --git a/.github/workflows/ci-unittests.yml b/.github/workflows/ci-unittests.yml index 71b41c17ea..107daedde2 100644 --- a/.github/workflows/ci-unittests.yml +++ b/.github/workflows/ci-unittests.yml @@ -18,31 +18,4 @@ jobs: needs: build-standalone-artifacts uses: ./.github/workflows/ci-matrix-gen.yml with: - jobs_to_run: ^(?!python-svm-build|style).*-gate.*$ - - post-run: - if: failure() - needs: run-tests - runs-on: ubuntu-latest - steps: - - uses: actions/github-script@v8 - with: - script: | - const GRAALVMBOT_LOGIN = "graalvmbot" - var payload = context.payload - if (!payload || !payload.number) return ; - - var pr = payload.pull_request - if (!pr || pr.state !== "closed") return ; - - var author = pr.user - var assignees = pr.assignees - if (!author || author.login !== GRAALVMBOT_LOGIN) return ; - if (!assignees || assignees.length != 1) return ; - - github.rest.issues.createComment({ - issue_number: pr.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: `@${assignees[0].login} - One or more CI jobs failed` - }) + jobs_to_run: ^(?!python-svm-build|style).*-gate.*$ \ No newline at end of file From 01be75af7aeeee17a33d6186fb81193c6e5c1c63 Mon Sep 17 00:00:00 2001 From: Virgil Calvez Date: Wed, 28 Jan 2026 15:01:13 +0100 Subject: [PATCH 09/10] Update graalvmbot login --- .github/workflows/ci-post-merge.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-post-merge.yml b/.github/workflows/ci-post-merge.yml index db73529c5c..afcbfc0745 100644 --- a/.github/workflows/ci-post-merge.yml +++ b/.github/workflows/ci-post-merge.yml @@ -10,7 +10,7 @@ jobs: - uses: actions/github-script@v8 with: script: | - const GRAALVMBOT_LOGIN = "Ariouz"; + const GRAALVMBOT_LOGIN = "graalvmbot"; const pr = context.payload.pull_request; if (!pr || !pr.number || pr.state !== "closed") return; From 1056049f721b49144bb3acf9b84823b5b9d7c5d8 Mon Sep 17 00:00:00 2001 From: Virgil Calvez Date: Wed, 28 Jan 2026 16:03:13 +0100 Subject: [PATCH 10/10] Fix typo in CI fail comment --- .github/workflows/ci-post-merge.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-post-merge.yml b/.github/workflows/ci-post-merge.yml index afcbfc0745..892fc02514 100644 --- a/.github/workflows/ci-post-merge.yml +++ b/.github/workflows/ci-post-merge.yml @@ -44,6 +44,6 @@ jobs: issue_number: pr.number, owner: context.repo.owner, repo: context.repo.repo, - body: `@${assignees[0].login} - One or more CI jobs failed - [details](${failedRun.html_url}))` + body: `@${assignees[0].login} - One or more CI jobs failed - [View details](${failedRun.html_url})` }); console.log("CI failed, assignee notified.") \ No newline at end of file