Skip to content

Commit 5fb9b36

Browse files
committed
test: Try custom_wasmer_runtime with a custom build from Wasmer@master.
1 parent cab6cc4 commit 5fb9b36

File tree

2 files changed

+52
-25
lines changed

2 files changed

+52
-25
lines changed

.github/workflows/test.yml

Lines changed: 50 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ jobs:
2323

2424
- id: 'darwin-amd64'
2525
os: 'macos-latest'
26-
27-
- id: 'linux-amd64'
28-
os: 'ubuntu-18.04'
29-
libwasmer_archive_name: 'wasmer-linux-amd64.tar.gz'
3026
fail-fast: true
3127

3228
runs-on: ${{ matrix.target.os }}
@@ -50,27 +46,13 @@ jobs:
5046
- name: Set up just
5147
shell: bash
5248
run: |
53-
export PATH="$HOME/.cargo/bin:$PATH"
5449
cargo install just
5550
56-
- name: Run all the tests (default)
57-
if: ${{ !matrix.target.libwasmer_archive_name }}
51+
- name: Run all the tests
5852
shell: bash
5953
run: |
6054
just test
6155
62-
- name: Run all the tests (with custom Wasmer runtime)
63-
if: matrix.target.libwasmer_archive_name
64-
shell: bash
65-
run: |
66-
libwasmer_url=$(curl -s https://api.github.com/repos/wasmerio/wasmer/releases/latest | jq --raw-output '.assets[] | select(.name == "${{ matrix.target.libwasmer_archive_name }}") | .browser_download_url')
67-
mkdir -p libwasmer
68-
curl -L $libwasmer_url > release.tar.gz
69-
tar xzvf release.tar.gz -C libwasmer
70-
export CGO_CFLAGS="-I$(pwd)/libwasmer/include/"
71-
export CGO_LDFLAGS="-Wl,-rpath,$(pwd)/libwasmer/lib/ -L$(pwd)/libwasmer/lib/ -lwasmer"
72-
just test -tags custom_wasmer_runtime
73-
7456
- name: Run all the examples
7557
shell: bash
7658
run: |
@@ -86,3 +68,52 @@ jobs:
8668
# mv "bazelisk-${GOOS}-amd64" "${GITHUB_WORKSPACE}/bin/bazel"
8769
# chmod +x "${GITHUB_WORKSPACE}/bin/bazel"
8870
# "${GITHUB_WORKSPACE}/bin/bazel" build //...
71+
72+
73+
test-custom-lib:
74+
name: Build and Test against a custom Wasmer library
75+
76+
strategy:
77+
matrix:
78+
go: [1.15]
79+
target:
80+
- id: 'linux-amd64'
81+
os: 'ubuntu-18.04'
82+
83+
- id: 'linux-aarch64'
84+
os: ['self-hosted', 'linux', 'ARM64']
85+
86+
- id: 'darwin-amd64'
87+
os: 'macos-latest'
88+
fail-fast: true
89+
90+
runs-on: ${{ matrix.target.os }}
91+
92+
steps:
93+
- name: Check out code
94+
uses: actions/checkout@v2
95+
96+
- name: Set up Rust
97+
uses: actions-rs/toolchain@v1
98+
with:
99+
toolchain: stable
100+
override: true
101+
default: false
102+
103+
- name: Set up Go
104+
uses: actions/setup-go@v2
105+
with:
106+
go-version: ${{ matrix.go }}
107+
108+
- name: Set up just
109+
shell: bash
110+
run: |
111+
cargo install just
112+
113+
- name: Run all the tests
114+
shell: bash
115+
run: |
116+
cargo build --release
117+
export CGO_CFLAGS="-I$(pwd)/wasmer/packaged/include/"
118+
export CGO_LDFLAGS="-Wl,-rpath,$(pwd)/target/release/ -L$(pwd)/target/release/ -lwasmer_go"
119+
just test -tags custom_wasmer_runtime

bors.toml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
status = [
2-
"Build and Test (1.14, linux-amd64, ubuntu-%)",
3-
"Build and Test (1.14, linux-aarch64, self-hosted, linux, ARM64)",
4-
"Build and Test (1.14, darwin-amd64, macos-%)",
5-
"Build and Test (1.15, linux-amd64, ubuntu-%)",
6-
"Build and Test (1.15, linux-aarch64, self-hosted, linux, ARM64)",
7-
"Build and Test (1.15, darwin-amd64, macos-%)"
2+
"Build and Test (%)",
3+
"Build and Test against a custom Wasmer library (%)",
84
]
95
required_approvals = 1
106
timeout_sec = 7200

0 commit comments

Comments
 (0)