Skip to content

Commit d9ee203

Browse files
committed
ci: build and propagate collision.wasm in CI
Add collision.wasm to the witguest-wit Justfile recipe so it is built from the collision-test/ WIT directory alongside interface.wasm and twoworlds.wasm. Upload and download it as a CI artifact so the collision integration tests can run in the test workflow. Signed-off-by: James Sturtevant <jsturtevant@gmail.com>
1 parent 769cf21 commit d9ee203

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

.github/workflows/dep_build_guests.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,3 +111,12 @@ jobs:
111111
path: src/tests/rust_guests/witguest/twoworlds.wasm
112112
retention-days: 1
113113
if-no-files-found: error
114+
115+
- name: Upload collision.wasm
116+
if: inputs.config == 'debug'
117+
uses: actions/upload-artifact@v7
118+
with:
119+
name: collision-wasm
120+
path: src/tests/rust_guests/witguest/collision.wasm
121+
retention-days: 1
122+
if-no-files-found: error

.github/workflows/dep_build_test.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,12 @@ jobs:
9191
name: twoworlds-wasm
9292
path: src/tests/rust_guests/witguest/
9393

94+
- name: Download collision.wasm
95+
uses: actions/download-artifact@v8
96+
with:
97+
name: collision-wasm
98+
path: src/tests/rust_guests/witguest/
99+
94100
- name: Build
95101
run: just build ${{ inputs.config }}
96102

Justfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ witguest-wit:
5050
{{ if os() == "windows" { "if (-not (Get-Command wasm-tools -ErrorAction SilentlyContinue)) { cargo install --locked wasm-tools }" } else { "command -v wasm-tools >/dev/null 2>&1 || cargo install --locked wasm-tools" } }}
5151
cd src/tests/rust_guests/witguest && wasm-tools component wit guest.wit -w -o interface.wasm
5252
cd src/tests/rust_guests/witguest && wasm-tools component wit two_worlds.wit -w -o twoworlds.wasm
53+
cd src/tests/rust_guests/witguest && wasm-tools component wit collision-test/ -w -o collision.wasm
5354

5455
build-rust-guests target=default-target features="": (witguest-wit) (ensure-cargo-hyperlight)
5556
cd src/tests/rust_guests/simpleguest && cargo hyperlight build {{ if features =="" {''} else if features=="no-default-features" {"--no-default-features" } else {"--no-default-features -F " + features } }} --profile={{ if target == "debug" { "dev" } else { target } }}

0 commit comments

Comments
 (0)