Skip to content

Commit d981982

Browse files
committed
fix: use absolute paths for file arguments in WASI benchmarks
- Pass absolute paths ($PWD_PATH/file) instead of relative paths (file) - WASI requires absolute paths for file operations even with --dir mapping - Fixes 'open baseline_test.txt: errno 2' in regression detection - Applied to both baseline and PR benchmark commands
1 parent 7d471f9 commit d981982

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/performance.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ jobs:
440440
# Test wasmtime command first to ensure it works
441441
echo "Testing wasmtime command..."
442442
PWD_PATH=$(pwd)
443-
wasmtime run --dir=$PWD_PATH bazel-bin/tinygo/file_ops_component.wasm copy_file --src baseline_test.txt --dest baseline_copy.txt || {
443+
wasmtime run --dir=$PWD_PATH bazel-bin/tinygo/file_ops_component.wasm copy_file --src $PWD_PATH/baseline_test.txt --dest $PWD_PATH/baseline_copy.txt || {
444444
echo "ERROR: wasmtime command failed"
445445
exit 1
446446
}
@@ -452,7 +452,7 @@ jobs:
452452
hyperfine --export-json baseline_results/baseline_benchmark.json \
453453
--warmup 3 \
454454
--show-output \
455-
"wasmtime run --dir=$PWD_PATH bazel-bin/tinygo/file_ops_component.wasm copy_file --src baseline_test.txt --dest baseline_copy.txt"
455+
"wasmtime run --dir=$PWD_PATH bazel-bin/tinygo/file_ops_component.wasm copy_file --src $PWD_PATH/baseline_test.txt --dest $PWD_PATH/baseline_copy.txt"
456456
457457
- name: Checkout PR Branch
458458
run: |
@@ -466,7 +466,7 @@ jobs:
466466
# Test wasmtime command first
467467
echo "Testing wasmtime command on PR branch..."
468468
PWD_PATH=$(pwd)
469-
wasmtime run --dir=$PWD_PATH bazel-bin/tinygo/file_ops_component.wasm copy_file --src baseline_test.txt --dest pr_copy.txt || {
469+
wasmtime run --dir=$PWD_PATH bazel-bin/tinygo/file_ops_component.wasm copy_file --src $PWD_PATH/baseline_test.txt --dest $PWD_PATH/pr_copy.txt || {
470470
echo "ERROR: wasmtime command failed on PR branch"
471471
exit 1
472472
}
@@ -478,7 +478,7 @@ jobs:
478478
hyperfine --export-json pr_results/pr_benchmark.json \
479479
--warmup 3 \
480480
--show-output \
481-
"wasmtime run --dir=$PWD_PATH bazel-bin/tinygo/file_ops_component.wasm copy_file --src baseline_test.txt --dest pr_copy.txt"
481+
"wasmtime run --dir=$PWD_PATH bazel-bin/tinygo/file_ops_component.wasm copy_file --src $PWD_PATH/baseline_test.txt --dest $PWD_PATH/pr_copy.txt"
482482
483483
- name: Analyze Performance Regression
484484
run: |

0 commit comments

Comments
 (0)