Skip to content

Commit bed5f13

Browse files
committedJan 26, 2024
ci: fix ci
Signed-off-by: Henry Gressmann <mail@henrygressmann.de>
1 parent bbb1e0b commit bed5f13

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed
 

‎.github/workflows/test.yaml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,14 @@ jobs:
1616
with:
1717
submodules: true
1818

19-
- name: Install stable Rust toolchain
20-
run: rustup update stable
19+
- name: Install stable Rust toolchain & Binaryen
20+
run: |
21+
rustup update stable
22+
rustup update nightly
23+
sudo apt-get install -y binaryen
24+
25+
- name: Build wasm
26+
run: ./examples/rust/build.sh
2127

2228
- name: Build (stable)
2329
run: cargo +stable build --workspace
@@ -37,8 +43,13 @@ jobs:
3743
with:
3844
submodules: true
3945

40-
- name: Install nightly Rust toolchain
41-
run: rustup update nightly
46+
- name: Install nightly Rust toolchain & Binaryen
47+
run: |
48+
rustup update nightly
49+
sudo apt-get install -y binaryen
50+
51+
- name: Build wasm
52+
run: ./examples/rust/build.sh
4253

4354
- name: Build (nightly, no default features)
4455
run: cargo +nightly build --workspace --no-default-features

‎examples/wasm-rust.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
use color_eyre::eyre::Result;
22
use tinywasm::{Extern, FuncContext, Imports, Module, Store};
33

4-
#[cfg(not(test))]
54
fn main() -> Result<()> {
65
let args = std::env::args().collect::<Vec<_>>();
76
if args.len() < 2 {
@@ -22,7 +21,6 @@ fn main() -> Result<()> {
2221
Ok(())
2322
}
2423

25-
#[cfg(not(test))]
2624
fn tinywasm() -> Result<()> {
2725
const TINYWASM: &[u8] = include_bytes!("./rust/out/tinywasm.wasm");
2826
let module = Module::parse_bytes(&TINYWASM)?;
@@ -45,7 +43,6 @@ fn tinywasm() -> Result<()> {
4543
Ok(())
4644
}
4745

48-
#[cfg(not(test))]
4946
fn hello() -> Result<()> {
5047
const HELLO_WASM: &[u8] = include_bytes!("./rust/out/hello.wasm");
5148
let module = Module::parse_bytes(&HELLO_WASM)?;
@@ -68,7 +65,6 @@ fn hello() -> Result<()> {
6865
Ok(())
6966
}
7067

71-
#[cfg(not(test))]
7268
fn fibonacci() -> Result<()> {
7369
const FIBONACCI_WASM: &[u8] = include_bytes!("./rust/out/fibonacci.wasm");
7470
let module = Module::parse_bytes(&FIBONACCI_WASM)?;

0 commit comments

Comments
 (0)