Skip to content

Commit 073a647

Browse files
authored
Try #211:
2 parents daa306d + d2d61ef commit 073a647

File tree

3 files changed

+21
-5
lines changed

3 files changed

+21
-5
lines changed

.github/workflows/test.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ 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'
2630
fail-fast: true
2731

2832
runs-on: ${{ matrix.target.os }}
@@ -49,11 +53,24 @@ jobs:
4953
export PATH="$HOME/.cargo/bin:$PATH"
5054
cargo install just
5155
52-
- name: Run all the tests
56+
- name: Run all the tests (default)
57+
if: ${{ !matrix.target.libwasmer_archive_name }}
5358
shell: bash
5459
run: |
5560
just test
5661
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-nightly/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+
5774
- name: Run all the examples
5875
shell: bash
5976
run: |

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

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)