-
Notifications
You must be signed in to change notification settings - Fork 11
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
Improve CI for wasmer_wamr feature #116
Changes from 7 commits
c67bc39
368a8e2
2eb5669
202eb30
ef93147
1cb1ba7
f39f46c
ac0cb24
7da05db
f1f6960
e8e1d7b
e4994bb
3a2c0e9
63d9dd5
44a8af5
4fddfc3
bd0cec3
3494a1a
57315e0
5ee2e5d
9052f8a
5d4b7ef
07d12b4
9e1a670
921e7cf
936089c
39d9653
7bd6b19
0e76b8e
5dac331
01cddc7
d8211d8
4b47005
376dcf8
335e994
78d3b9c
fa80b89
30b4b3f
5aea0ba
7d52f17
90735f5
3bf4dbe
85eacf3
cdba5b5
03d570f
9204bfe
47cdd4f
9094d37
a8af8f9
6dfcc86
73e1aba
aa46052
c5cc0f7
8d497c7
782990b
2ae1eda
4d8277b
4c1a0c8
69ba4a7
94c8ab2
e0f1780
cd985e0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,8 +11,9 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
script: ["./test.sh", "./bench.sh"] | ||
script: ["test", "bench"] | ||
os: ["ubuntu-latest", "macos-latest"] | ||
wasmer-feature: ["wasmer_sys", "wasmer_wamr"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Separate ci jobs for each wasmer feature for ease of review. |
||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
@@ -24,4 +25,20 @@ jobs: | |
with: | ||
name: holochain-ci | ||
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" | ||
- run: nix develop --command ${{ matrix.script }} | ||
- run: nix develop --command ./${{ matrix.script }}-${{ matrix.wasmer-feature }}.sh | ||
|
||
test-windows: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
runs-on: windows-latest | ||
matrix: | ||
wasmer-feature: ["wasmer_sys", "wasmer_wamr"] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
with: | ||
targets: wasm32-unknown-unknown | ||
- name: test root | ||
run: cargo test --release --no-default-features --features ${{ matrix.wasmer-feature }} -- --nocapture | ||
- name: test | ||
run: cargo test --release --manifest-path test/Cargo.toml --no-default-features --features ${{ matrix.wasmer-feature }} -- --nocapture | ||
- name: bench | ||
run: cd test && cargo bench --no-default-features --features ${{ matrix.wasmer-feature }} |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -103,7 +103,7 @@ very reasonable overhead for the host to build a completely fresh instance. | |
Calling a function with `holochain_wasmer_host::guest::call()` takes several `us` | ||
for small input/output values and some `ms` for ~1mb of input/output data. | ||
|
||
To see benchmarks on your system run `nix-shell --run ./bench.sh`. | ||
To see benchmarks on your system run `nix-shell --run ./scripts/bench.sh`. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Move all scripts into |
||
|
||
With low overhead like this, core is relatively free to decide when it wants to | ||
re-instantiate an already-in-memory module. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#! /usr/bin/env bash | ||
( | ||
cd test && \ | ||
cargo bench --no-default-features --features wasmer_wamr | ||
) | ||
|
||
# it's possible to flamegraph the benchmarks like this: | ||
# | ||
# cd test | ||
# flamegraph cargo bench --bench bench -- --profile-time 10 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#! /usr/bin/env bash | ||
|
||
./bench-wasmer_sys.sh && \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any reason to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess so that if the first command fails you see the failure output as the last text in the terminal rather than having it get buried by the output of the subsequent command. I don't have a strong preference either way. |
||
./bench-wasmer_wamr.sh |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#! /usr/bin/env bash | ||
cargo test | ||
cargo test --manifest-path test/Cargo.toml | ||
|
||
cargo test-fuzz "$FUZZ_TARGET" --no-default-features --features wasmer_wamr |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#! /usr/bin/env bash | ||
|
||
./fuzz-wasmer_sys.sh && \ | ||
./fuzz-wasmer_wamr.sh |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/usr/bin/env bash | ||
set -euxo pipefail | ||
|
||
export RUST_BACKTRACE=full | ||
export WASMER_BACKTRACE=1 | ||
|
||
cargo clippy --no-default-features --features wasmer_wamr | ||
( cd test && cargo clippy --no-default-features --features wasmer_wamr ) | ||
|
||
# build wasm and run the "full" tests for wasmer_wamr | ||
cargo test --release --manifest-path test/Cargo.toml --no-default-features --features wasmer_wamr ${1-} -- --nocapture |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#! /usr/bin/env bash | ||
|
||
./test-wasmer_sys.sh && \ | ||
./test-wasmer_wamr.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not being used anymore and appears years outdated.