23
23
24
24
- id : ' darwin-amd64'
25
25
os : ' macos-latest'
26
-
27
- - id : ' linux-amd64'
28
- os : ' ubuntu-18.04'
29
- libwasmer_archive_name : ' wasmer-linux-amd64.tar.gz'
30
26
fail-fast : true
31
27
32
28
runs-on : ${{ matrix.target.os }}
@@ -50,27 +46,13 @@ jobs:
50
46
- name : Set up just
51
47
shell : bash
52
48
run : |
53
- export PATH="$HOME/.cargo/bin:$PATH"
54
49
cargo install just
55
50
56
- - name : Run all the tests (default)
57
- if : ${{ !matrix.target.libwasmer_archive_name }}
51
+ - name : Run all the tests
58
52
shell : bash
59
53
run : |
60
54
just test
61
55
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
-
74
56
- name : Run all the examples
75
57
shell : bash
76
58
run : |
86
68
# mv "bazelisk-${GOOS}-amd64" "${GITHUB_WORKSPACE}/bin/bazel"
87
69
# chmod +x "${GITHUB_WORKSPACE}/bin/bazel"
88
70
# "${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
0 commit comments