Skip to content

upload_test_binaries clears testsuite before downloading artifact #116

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

wingo
Copy link
Contributor

@wingo wingo commented Aug 21, 2025

The previous state was that the build_assemblyscript, build_c, and build_rust workflows upload tests/*/testsuite as an artifact, and then upload_test_binaries runs once for each of {rust,assemblyscript,c}, removing any wasm file in tests/lang/testsuite, downloading the artifact, unpacking it to tests/lang/testsuite, and adding and committing to prod/testsuite/base if any file differed.

This PR implements a more simple and robust approach, which is to just have upload_test_binaries remove tests/lang/testsuite before unpacking the artifact.

@wingo wingo marked this pull request as ready for review August 21, 2025 12:05
@@ -164,6 +164,6 @@ jobs:
- name: Publish changes to consumer branch
shell: bash
run: |
git add tests/${{ matrix.suite }}/testsuite/*.wasm -f
git diff --quiet --cached || git commit -m "Update test binaries for ${{ matrix.suite }} test suite"
git add -f tests/${{ matrix.suite }}/testsuite
Copy link
Collaborator

Choose a reason for hiding this comment

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

could you doublecheck that testsuite folder (which is a build folder only now) doesn't have any build leftovers that should not be checked in?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The testsuite folder will be build-only -- its contents will be populated exclusively by the build.py scripts, not by the language-specific toolchains -- but until #112 et al are merged, these dirs are still managed by git and have some source files in them. However that's fine, there's no build artifacts.

To verify, you can look at the checks for this PR: https://github.com/WebAssembly/wasi-testsuite/actions/runs/17126318193. If you open the "Build C tests (ubuntu-latest)" jobs, you can click through to the "upload precompiled tests" action, which gives you a link to the artifact, in this case https://github.com/WebAssembly/wasi-testsuite/actions/runs/17126318193/artifacts/3818409902. Its contents are the contents of tests/c/testsuite from main git, plus the wasm files. In future its content will just be the wasm files, json files, and the test directory. Same for the Assemblyscript and Rust tests.

The previous state was that the build_assemblyscript, build_c, and
build_rust workflows upload tests/*/testsuite as an artifact, and then
upload_test_binaries runs once for each of {rust,assemblyscript,c},
removing any wasm file in tests/*lang*/testsuite, downloading the
artifact, unpacking it to tests/*lang*/testsuite, and adding and
committing to prod/testsuite/base if any file differed.

This PR implements a more simple and robust approach, which is to just
have upload_test_binaries remove tests/*lang*/testsuite before unpacking
the artifact.
@wingo wingo force-pushed the simplify-upload-test-binaries branch from c6b9717 to 3b0b6fd Compare August 21, 2025 14:29
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