Skip to content

Commit 488d90d

Browse files
authored
Run compare-with-main.sh on CI (bytecodealliance#34)
1 parent dc370a6 commit 488d90d

3 files changed

Lines changed: 13 additions & 3 deletions

File tree

.github/workflows/main.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,13 @@ jobs:
7373
run: rustup update stable && rustup default stable && rustup component add rustfmt
7474
- run: cargo fmt -- --check
7575

76+
compare-with-main:
77+
name: wasmparser bench
78+
runs-on: ubuntu-latest
79+
steps:
80+
- uses: actions/checkout@v2
81+
- run: (cd crates/wasmparser && ./compare-with-main.sh)
82+
7683
fuzz:
7784
name: Fuzz
7885
runs-on: ubuntu-latest

crates/wasmparser/benches/benchmark.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ const VALIDATOR_CONFIG: Option<ValidatingParserConfig> = Some(ValidatingParserCo
1919
enable_bulk_memory: true,
2020
enable_multi_value: true,
2121
enable_tail_call: true,
22+
enable_module_linking: true,
2223
},
2324
});
2425

@@ -120,7 +121,8 @@ where
120121
.extension()
121122
.and_then(|ext| ext.to_str().map(|str| str.to_string()));
122123
match ext.as_ref().map(|string| string.as_str()) {
123-
Some("wat") => file_contents.push(read_wat_module(&dir_entry.path())),
124+
// TODO enable wat
125+
// Some("wat") => file_contents.push(read_wat_module(&dir_entry.path())),
124126
Some("wast") => {
125127
for wasm_module in read_wast_module(&dir_entry.path()) {
126128
file_contents.push(wasm_module)
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
#!/usr/bin/env bash
2+
set -e
23

34
# record current bench results
45
cargo bench --bench benchmark -- --noplot --save-baseline after
56

6-
# switch to master and record its bench results
7-
git checkout master && \
7+
# switch to main branch and record its bench results
8+
git checkout main && \
89
cargo bench --bench benchmark -- --noplot --save-baseline before
910

1011
# compare

0 commit comments

Comments
 (0)