Skip to content

Commit

Permalink
chore: test wasm32-wasi
Browse files Browse the repository at this point in the history
Signed-off-by: Richard Zak <richard@profian.com>
  • Loading branch information
rjzak committed Oct 5, 2022
1 parent 982a6a1 commit 7af23c6
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 6 deletions.
3 changes: 1 addition & 2 deletions .cargo/config
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[build]
target = "wasm32-wasi"
[target.wasm32-wasi]
rustflags = ["--cfg", "tokio_unstable"]
runner = ["enarx", "run", "--wasmcfgfile", "Enarx.toml"]
24 changes: 21 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,32 @@
name: Test
on: [ push, pull_request ]
jobs:
test:
test_native:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.4.0
- name: Setup Rust toolchain
run: rustup show
- name: cargo test
- name: cargo test native
uses: actions-rs/cargo@v1
with:
command: test
args: --workspace --all-features
args: --workspace --all-features --target=x86_64-unknown-linux-musl

test_wasi:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.4.0
- name: Setup Rust toolchain
run: rustup show
- name: install wasi
run: rustup target install wasm32-wasi
- name: download enarx
run: curl -sLO https://github.com/enarx/enarx/releases/download/v0.6.4/enarx-0.6.4-1_amd64.deb
- name: install enarx
run: sudo dpkg -i enarx-0.6.4-1_amd64.deb
- name: cargo test wasm32-wasi
uses: actions-rs/cargo@v1
with:
command: test
args: --workspace --all-features --target=wasm32-wasi
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
self;

cargoLock.lockFileContents = builtins.readFile "${self}/Cargo.lock";
cargoLock.outputHashes."hyper-0.14.20" = "sha256-4/uxChnly5UMY2XB9kr64303N5wlEz+RKPD0GGW8SuI=";
});

nativeBin = buildPackage pkgs [] {};
Expand Down

0 comments on commit 7af23c6

Please sign in to comment.