Skip to content

Conversation

@mizvekov
Copy link
Contributor

This makes sure we upload the artifacts even if the previous step failed.

This is helpful because we wish to upload crash reproducers, which the scritps are already prepared to do.

Example: https://github.com/llvm/llvm-project/actions/runs/16180778101/job/45676677544?pr=147835

This makes sure we upload the artifacts even if the previous step
failed.

This is helpful because we wish to upload crash reproducers, which
the scritps are already prepared to do.

Example: https://github.com/llvm/llvm-project/actions/runs/16180778101/job/45676677544?pr=147835
@llvmbot
Copy link
Member

llvmbot commented Jul 10, 2025

@llvm/pr-subscribers-github-workflow

Author: Matheus Izvekov (mizvekov)

Changes

This makes sure we upload the artifacts even if the previous step failed.

This is helpful because we wish to upload crash reproducers, which the scritps are already prepared to do.

Example: https://github.com/llvm/llvm-project/actions/runs/16180778101/job/45676677544?pr=147835


Full diff: https://github.com/llvm/llvm-project/pull/147999.diff

1 Files Affected:

  • (modified) .github/workflows/premerge.yaml (+2)
diff --git a/.github/workflows/premerge.yaml b/.github/workflows/premerge.yaml
index 3b7751629564d..f7a48304b82b0 100644
--- a/.github/workflows/premerge.yaml
+++ b/.github/workflows/premerge.yaml
@@ -63,6 +63,7 @@ jobs:
 
           ./.ci/monolithic-linux.sh "${projects_to_build}" "${project_check_targets}" "${runtimes_to_build}" "${runtimes_check_targets}" "${runtimes_check_targets_needs_reconfig}"
       - name: Upload Artifacts
+        if: '!cancelled()'
         uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
         with:
           name: Premerge Artifacts (Linux)
@@ -113,6 +114,7 @@ jobs:
           call C:\\BuildTools\\Common7\\Tools\\VsDevCmd.bat -arch=amd64 -host_arch=amd64
           bash .ci/monolithic-windows.sh "${{ steps.vars.outputs.windows-projects }}" "${{ steps.vars.outputs.windows-check-targets }}"
       - name: Upload Artifacts
+        if: '!cancelled()'
         uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
         with:
           name: Premerge Artifacts (Windows)

@Endilll
Copy link
Contributor

Endilll commented Jul 10, 2025

SGTM, but I don't feel qualified to approve.

@mizvekov mizvekov merged commit 8a7c973 into main Jul 10, 2025
11 checks passed
@mizvekov mizvekov deleted the users/mizvekov/ci-upload-artifacts-on-failure branch July 10, 2025 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants