Skip to content

Commit a6e3164

Browse files
committed
Reuse script that is used in just file
Signed-off-by: James Sturtevant <jsturtevant@gmail.com>
1 parent 021bf6d commit a6e3164

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

.github/workflows/dep_build_wasm_examples.yml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -77,20 +77,13 @@ jobs:
7777
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/wasm-clang-builder:buildcache
7878
cache-to: ${{ env.CACHE_TO }}
7979
- name: Build Modules
80-
run: |
81-
for FILENAME in $(find . -name '*.c')
82-
do
83-
echo Building ${FILENAME}
84-
docker run --rm -i -v "${PWD}:/tmp/host" ghcr.io/${{ github.repository_owner }}/wasm-clang-builder:latest /opt/wasi-sdk/bin/clang -flto -ffunction-sections -mexec-model=reactor -O3 -z stack-size=4096 -Wl,--initial-memory=65536 -Wl,--export=__data_end -Wl,--export=__heap_base,--export=malloc,--export=free,--export=__wasm_call_ctors -Wl,--strip-all,--no-entry -Wl,--allow-undefined -Wl,--gc-sections -o /tmp/host/${FILENAME%.*}-wasi-libc.wasm /tmp/host/${FILENAME}
85-
cargo run -p hyperlight-wasm-aot compile ${FILENAME%.*}-wasi-libc.wasm ${FILENAME%.*}.aot
86-
cp ${FILENAME%.*}.aot ${FILENAME%.*}.wasm
87-
done
80+
run: just build-wasm-examples release
8881
shell: bash
8982
working-directory: src/wasmsamples
9083
- name: Upload Wasm Modules
9184
uses: actions/upload-artifact@v4
9285
with:
9386
name: guest-modules
9487
path: |
95-
src/wasmsamples/*.wasm
96-
src/wasmsamples/*.aot
88+
src/x64/release/*.wasm
89+
src/x64/release/*.aot

Justfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ examples-components target=default-target features="": (build-rust-component-exa
104104

105105
# warning, compares to and then OVERWRITES the given baseline
106106
bench-ci baseline target="release" features="":
107-
cd src/hyperlight_wasm && cargo bench --profile={{ if target == "debug" {"dev"} else { target } }} {{ if features =="" {''} else { "--features " + features } }} -- --verbose --save-baseline {{baseline}}
107+
cd src/hyperlight_wasm && cargo bench --profile={{ if target == "debug" {"dev"} else { target } }} {{ if features =="" {''} else { "--features " + features } }} --bench benchmarks -- --verbose --save-baseline {{baseline}}
108+
cd src/hyperlight_wasm && {{wit-world-c}} cargo bench --profile={{ if target == "debug" {"dev"} else { target } }} {{ if features =="" {''} else { "--features " + features } }} --bench benchmarks_components -- --verbose --save-baseline {{baseline}}-components
108109
bench target="release" features="": (bench-wasm target features) (bench-components target features)
109110
bench-wasm target="release" features="":
110111
cd src/hyperlight_wasm && cargo bench --profile={{ if target == "debug" {"dev"} else { target } }} {{ if features =="" {''} else { "--features " + features } }} --bench benchmarks -- --verbose

0 commit comments

Comments
 (0)