test: wasi target_os and hyper conditional
Signed-off-by: Anton Whalley <anton@venshare.com>
This commit is contained in:
parent
345facef90
commit
50320654ab
|
@ -22,15 +22,18 @@ jobs:
|
|||
- x86_64-unknown-linux-gnu
|
||||
- x86_64-unknown-linux-musl
|
||||
- wasm32-unknown-unknown
|
||||
- wasm32-wasi
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
# setup wasmedge
|
||||
- run: curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | sudo bash -s -- -p /usr/local
|
||||
# Setup musl if needed
|
||||
- run: sudo apt-get update
|
||||
if: matrix.target == 'x86_64-unknown-linux-musl'
|
||||
- run: sudo apt-get install -y musl musl-dev musl-tools cmake
|
||||
if: matrix.target == 'x86_64-unknown-linux-musl'
|
||||
|
||||
|
||||
# # Caching stuff
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
|
@ -96,7 +99,22 @@ jobs:
|
|||
command: build
|
||||
toolchain: ${{ matrix.toolchain }}
|
||||
args: --target wasm32-unknown-unknown --features reqwest
|
||||
|
||||
- uses: actions-rs/cargo@v1
|
||||
name: "Build"
|
||||
if: matrix.target == 'wasm32-wasi'
|
||||
with:
|
||||
command: build
|
||||
toolchain: ${{ matrix.toolchain }}
|
||||
args: --target wasm32-wasi --features "http-binding hyper hyper_wasi"
|
||||
- uses: actions-rs/cargo@v1
|
||||
name: "Test"
|
||||
if: matrix.target == 'wasm32-wasi'
|
||||
with:
|
||||
command: test
|
||||
toolchain: ${{ matrix.toolchain }}
|
||||
args: --target ${{ matrix.target }} --features "http-binding hyper hyper_wasi"
|
||||
env:
|
||||
CARGO_TARGET_WASM32_WASI_RUNNER: wasmedge
|
||||
# Build examples
|
||||
- uses: actions-rs/cargo@v1
|
||||
name: "Build reqwest-wasm-example"
|
||||
|
|
|
@ -54,7 +54,6 @@ async-trait = { version = "^0.1.33", optional = true }
|
|||
bytes = { version = "^1.0", optional = true }
|
||||
futures = { version = "^0.3", optional = true }
|
||||
http = { version = "0.2", optional = true }
|
||||
hyper = { version = "^0.14", optional = true }
|
||||
axum-lib = { version = "^0.6", optional = true, package = "axum" }
|
||||
http-body = { version = "^0.4", optional = true }
|
||||
poem-lib = { version = "=1.2.34", optional = true, package = "poem" }
|
||||
|
|
Loading…
Reference in New Issue