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 4, 2022
1 parent 7e417a6 commit 1e31a6d
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 14 deletions.
12 changes: 2 additions & 10 deletions .cargo/config
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
[env]
RUST_TEST_THREADS = "1"
RUST_BACKTRACE_DETAILS = "1"
WASMTIME_BACKTRACE_DETAILS = "1"

[build]
target = "wasm32-wasi"
rustflags = ["--cfg", "tokio_unstable"]

[target.wasm32-wasi]
rustflags = ["--cfg", "tokio_unstable"]
#runner = ["enarx", "run", "--wasmcfgfile", "Enarx.toml"]
runner = ["wasmtime", "run", "--dir=testdata/", "--tcplisten", "127.0.0.1:8080", "--env", "FD_COUNT=3", "--"]
runner = ["wasmtime", "run", "--dir=testdata/", "--tcplisten", "127.0.0.1:8080", "--env", "FD_COUNT=3", "--"]
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: install wasmtime
run: curl https://wasmtime.dev/install.sh -sSf | bash
- name: setup wasmtime
run: source ~/.bashrc
- 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.

3 changes: 3 additions & 0 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ allow = [
"BSD-3-Clause",
"Unicode-DFS-2016",
]

[sources.allow-org]
github = ["rjzak"] # temporary until Hyper PR #2900 is merged

0 comments on commit 1e31a6d

Please sign in to comment.