Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .ci/premerge_advisor_explain.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/issue-write-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,20 @@ jobs:
test-issue-write:
name: "Test Issue Write"
runs-on: ubuntu-24.04
if: github.repository == 'llvm/llvm-project'
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@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: workflow-args
name: workflow-args-foo
path: |
comments
comments-foo
- name: Upload Comment
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: workflow-args-bar
path: |
comments-bar
7 changes: 6 additions & 1 deletion .github/workflows/issue-write.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/premerge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -185,6 +185,14 @@ jobs:
path: artifacts/
retention-days: 5
include-hidden-files: 'true'
- name: Upload Comment
uses: actions/upload-artifact@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
Expand Down
Loading