fix #141
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI workflow | |
on: [push] | |
jobs: | |
go-wasm-test: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Code checkout | |
uses: actions/checkout@v3 | |
- name: Install Rust and rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
override: true | |
- name: Install Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: '^1.18.3' | |
- name: Install Wabt (wat2wasm) | |
run: | | |
wget https://github.com/WebAssembly/wabt/releases/download/1.0.29/wabt-1.0.29-ubuntu.tar.gz | |
tar -zxf wabt-1.0.29-ubuntu.tar.gz | |
sudo cp wabt-1.0.29/bin/wat2wasm /usr/local/bin | |
- name: Check go mod cache | |
uses: actions/cache@v3 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-owasmer-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go-owasmer- | |
- name: Check cargo cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-rust-owasmer-${{ hashFiles('**/Cargo.lock') }} | |
- name: Build libgo_owasm | |
run: | | |
(cd libgo_owasm && cargo build --release) | |
cp libgo_owasm/target/release/libgo_owasm.so api/libgo_owasm.so | |
- name: Run rust tests | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --manifest-path libgo_owasm/Cargo.toml --all | |
- name: Run go tests | |
run: go test ./... |