Skip to content

Commit b56cfb9

Browse files
authored
Try #211:
2 parents daa306d + 5fb9b36 commit b56cfb9

File tree

4 files changed

+54
-11
lines changed

4 files changed

+54
-11
lines changed

.github/workflows/test.yml

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ jobs:
4646
- name: Set up just
4747
shell: bash
4848
run: |
49-
export PATH="$HOME/.cargo/bin:$PATH"
5049
cargo install just
5150
5251
- name: Run all the tests
@@ -69,3 +68,52 @@ jobs:
6968
# mv "bazelisk-${GOOS}-amd64" "${GITHUB_WORKSPACE}/bin/bazel"
7069
# chmod +x "${GITHUB_WORKSPACE}/bin/bazel"
7170
# "${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

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,7 @@ this library works (and is tested) on the following platforms:
126126
$ export CGO_LDFLAGS="-Wl,-rpath,$(pwd)/target/release/ -L$(pwd)/target/release/ -lwasmer_go"
127127
$
128128
$ # Run the tests.
129-
$ cd wasmer
130-
$ go test -v -tags custom_wasmer_runtime
129+
$ just test -tags custom_wasmer_runtime
131130
```
132131
</details>
133132

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

justfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Run all the tests.
2-
test:
2+
test *ARGS:
33
#!/usr/bin/env bash
44
cd wasmer
55
# Run the tests.
6-
GODEBUG=cgocheck=2 go test -v
6+
GODEBUG=cgocheck=2 go test -v {{ARGS}}
77

88
examples:
99
#!/usr/bin/env bash

0 commit comments

Comments
 (0)