Skip to content

.github/workflows/build.yml: Upload artifacts also on failing builds#504

Draft
mkoeppe wants to merge 1 commit intopyodide:mainfrom
passagemath:ci-always-upload-artifacts
Draft

.github/workflows/build.yml: Upload artifacts also on failing builds#504
mkoeppe wants to merge 1 commit intopyodide:mainfrom
passagemath:ci-always-upload-artifacts

Conversation

@mkoeppe
Copy link
Copy Markdown
Contributor

@mkoeppe mkoeppe commented Feb 16, 2026

... for inspection when builds fail

Copy link
Copy Markdown
Member

@ryanking13 ryanking13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sound reasonable, but the build logs are not copied to build-logs directory unless the build succeeds, so this PR will not work. I guess we need to the behavior of pyodide-build first to make this work.

PR_NUMBER: ${{ github.event.number }}
run: |
if [ -f result/build_output.log ]; then
python tools/parse_build_result.py result/build_output.log > result/build_summary.md
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This script does not handle build failure. If it is for debugging, running this script won't be very useful.

echo ${PR_NUMBER} > result/pr_number

- name: Compress build artifacts
if: always()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

repodata directory will not contain any wheels on build failure.


- name: Store build logs
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
if: always()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logs are also copied after the build succeed.

@mkoeppe mkoeppe marked this pull request as draft February 16, 2026 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants