[llvm] Multi platofmr test fork (PR #170554)

Aiden Grossman via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 3 12:44:13 PST 2025


https://github.com/boomanaiden154 created https://github.com/llvm/llvm-project/pull/170554

None

>From e362d6fdd454408c4233e3292b91e4d2a219c3dd Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Wed, 3 Dec 2025 02:42:07 +0000
Subject: [PATCH 1/3] [Github] Make issue-write workflow support reading from
 multiple files

This is so that we can read from multiple files emitted by the premerge
workflow.

Pull Request: https://github.com/llvm/llvm-project/pull/170411
---
 .github/workflows/issue-write-test.yaml | 13 ++++++++++---
 .github/workflows/issue-write.yml       |  7 ++++++-
 2 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/issue-write-test.yaml b/.github/workflows/issue-write-test.yaml
index 422a369fe0185..9f43eef48f597 100644
--- a/.github/workflows/issue-write-test.yaml
+++ b/.github/workflows/issue-write-test.yaml
@@ -16,10 +16,17 @@ jobs:
     steps:
       - name: Write Comment
         run: |
-          echo '[{"body": "This is a comment for testing the issue write workflow"}]' > comments
+          echo '[{"body": "This is a comment for testing the issue write workflow"}]' > comments-foo
+          echo '[{"body": "This is another comment for testing the issue write workflow that was placed in a separate file"}]' > comments-bar
       - name: Upload Comment
         uses: actions/upload-artifact at 330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
         with:
-          name: workflow-args
+          name: workflow-args-foo
           path: |
-            comments
+            comments-foo
+      - name: Upload Comment
+        uses: actions/upload-artifact at 330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
+        with:
+          name: workflow-args-bar
+          path: |
+            comments-bar
diff --git a/.github/workflows/issue-write.yml b/.github/workflows/issue-write.yml
index ac75dffd8b3b8..9ceadbe971093 100644
--- a/.github/workflows/issue-write.yml
+++ b/.github/workflows/issue-write.yml
@@ -47,7 +47,12 @@ jobs:
           github-token: ${{ secrets.GITHUB_TOKEN }}
           script: |
             var fs = require('fs');
-            const comments = JSON.parse(fs.readFileSync('./comments'));
+            var comments = []
+            for (local_file of fs.readdirSync('.')) {
+              if (local_file.startsWith("comments")) {
+                comments.push(...JSON.parse(fs.readFileSync(local_file)))
+              }
+            }
             if (!comments || comments.length == 0) {
               return;
             }

>From bae926e6e155400e337f807f7a0069a93a595ced Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Wed, 3 Dec 2025 02:56:08 +0000
Subject: [PATCH 2/3] [Github][CI] Make premerge upload results on Linux and
 Windows

Now that the issue-write workflow can support writing comments from
multiple files, make the premerge workflow write out comments from both
x86_64 Linux and Windows. AArch64 Linux right now is left out as the
premerge advisor does not currently support it.

Pull Request: https://github.com/llvm/llvm-project/pull/170414
---
 .ci/premerge_advisor_explain.py |  3 ++-
 .github/workflows/premerge.yaml | 12 ++++++++++--
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/.ci/premerge_advisor_explain.py b/.ci/premerge_advisor_explain.py
index 155e91bef55f8..bd65eb3d1588b 100644
--- a/.ci/premerge_advisor_explain.py
+++ b/.ci/premerge_advisor_explain.py
@@ -129,7 +129,8 @@ def main(
         # If the job succeeds and there is not an existing comment, we
         # should not write one to reduce noise.
         comments = []
-    with open("comments", "w") as comment_file_handle:
+    comments_file_name = f"comments-{platform.system()}-{platform.machine()}"
+    with open(comments_file_name, "w") as comment_file_handle:
         json.dump(comments, comment_file_handle)
 
 
diff --git a/.github/workflows/premerge.yaml b/.github/workflows/premerge.yaml
index 10f7f6a827b30..4ea5397edbeac 100644
--- a/.github/workflows/premerge.yaml
+++ b/.github/workflows/premerge.yaml
@@ -124,9 +124,9 @@ jobs:
         if: ${{ always() && !startsWith(matrix.runs-on, 'depot-ubuntu-24.04-arm') }}
         continue-on-error: true
         with:
-          name: workflow-args
+          name: workflow-args-x86-linux
           path: |
-            comments
+            comments-Linux-x86_64
 
   premerge-checks-windows:
     name: Build and Test Windows
@@ -185,6 +185,14 @@ jobs:
           path: artifacts/
           retention-days: 5
           include-hidden-files: 'true'
+      - name: Upload Comment
+        uses: actions/upload-artifact at 330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
+        if: always()
+        continue-on-error: true
+        with:
+          name: workflow-args-windows
+          path: |
+            comments-Windows-x86_64
 
   premerge-check-macos:
     name: MacOS Premerge Checks

>From 545d06f43510816d18b64a66ece59a84cb4ac76e Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Wed, 3 Dec 2025 20:43:29 +0000
Subject: [PATCH 3/3] test

---
 .github/workflows/issue-write-test.yaml | 1 -
 1 file changed, 1 deletion(-)

diff --git a/.github/workflows/issue-write-test.yaml b/.github/workflows/issue-write-test.yaml
index 9f43eef48f597..c976c9378e8f4 100644
--- a/.github/workflows/issue-write-test.yaml
+++ b/.github/workflows/issue-write-test.yaml
@@ -12,7 +12,6 @@ jobs:
   test-issue-write:
     name: "Test Issue Write"
     runs-on: ubuntu-24.04
-    if: github.repository == 'llvm/llvm-project'
     steps:
       - name: Write Comment
         run: |



More information about the llvm-commits mailing list