Skip to content

Commit

Permalink
ci: fix ci
Browse files Browse the repository at this point in the history
Signed-off-by: Henry Gressmann <mail@henrygressmann.de>
  • Loading branch information
explodingcamera committed Jan 26, 2024
1 parent bbb1e0b commit bed5f13
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
19 changes: 15 additions & 4 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,14 @@ jobs:
with:
submodules: true

- name: Install stable Rust toolchain
run: rustup update stable
- name: Install stable Rust toolchain & Binaryen
run: |
rustup update stable
rustup update nightly
sudo apt-get install -y binaryen
- name: Build wasm
run: ./examples/rust/build.sh

- name: Build (stable)
run: cargo +stable build --workspace
Expand All @@ -37,8 +43,13 @@ jobs:
with:
submodules: true

- name: Install nightly Rust toolchain
run: rustup update nightly
- name: Install nightly Rust toolchain & Binaryen
run: |
rustup update nightly
sudo apt-get install -y binaryen
- name: Build wasm
run: ./examples/rust/build.sh

- name: Build (nightly, no default features)
run: cargo +nightly build --workspace --no-default-features
Expand Down
4 changes: 0 additions & 4 deletions examples/wasm-rust.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use color_eyre::eyre::Result;
use tinywasm::{Extern, FuncContext, Imports, Module, Store};

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

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

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

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

0 comments on commit bed5f13

Please sign in to comment.