@@ -153,32 +153,39 @@ jobs:
153
153
uses : actions/download-artifact@v1
154
154
with :
155
155
name : macos-installable
156
- - name : Build hello.wasm
157
- shell : bash
156
+ - name : Unpack toolchain
158
157
run : |
159
158
set -x
160
159
tar xf $(find . -name "swift-wasm-*.tar.gz" -type f)
161
- TOOLCHAIN_PATH=$(find "$PWD" -name "swift-wasm-*" -type d)
160
+ echo "TOOLCHAIN=$(find "$PWD" -name "swift-wasm-*" -type d)" >> $GITHUB_ENV
161
+ - name : Build hello.wasm
162
+ shell : bash
163
+ run : |
162
164
echo 'print("Hello, world!")' > hello.swift
163
- $TOOLCHAIN_PATH /usr/bin/swiftc \
165
+ $TOOLCHAIN /usr/bin/swiftc \
164
166
-target wasm32-unknown-wasi \
165
- -sdk $TOOLCHAIN_PATH /usr/share/wasi-sysroot \
167
+ -sdk $TOOLCHAIN /usr/share/wasi-sysroot \
166
168
hello.swift -o hello.wasm && \
167
169
echo "Successfully linked hello.wasm"
168
170
- name : Test SwiftPM
169
171
shell : bash
170
172
run : |
171
173
set -x
172
- TOOLCHAIN_PATH=$(find "$PWD" -name "swift-wasm-*" -type d)
173
174
mkdir test
174
175
cd test
175
- $TOOLCHAIN_PATH /usr/bin/swift package init
176
- $TOOLCHAIN_PATH /usr/bin/swift build --triple wasm32-unknown-wasi
176
+ $TOOLCHAIN /usr/bin/swift package init
177
+ $TOOLCHAIN /usr/bin/swift build --triple wasm32-unknown-wasi
177
178
- name : Upload hello.wasm compiled with macOS package
178
179
uses : actions/upload-artifact@v1
179
180
with :
180
181
name : macos-hello.wasm
181
182
path : hello.wasm
183
+ - name : Checkout integration-tests
184
+ uses : actions/checkout@v2
185
+ with :
186
+ repository : swiftwasm/integration-tests
187
+ - name : Run integration tests
188
+ run : swift run # Use TOOLCHAIN env value
182
189
183
190
ubuntu1804_smoke_test :
184
191
name : Run smoke tests on Ubuntu 18.04
@@ -189,32 +196,39 @@ jobs:
189
196
uses : actions/download-artifact@v1
190
197
with :
191
198
name : ubuntu18.04-installable
192
- - name : Build hello.wasm
193
- shell : bash
199
+ - name : Unpack toolchain
194
200
run : |
195
201
set -x
196
202
tar xf $(find . -name "swift-wasm-*.tar.gz" -type f)
197
- TOOLCHAIN_PATH=$(find "$PWD" -name "swift-wasm-*" -type d)
203
+ echo "TOOLCHAIN=$(find "$PWD" -name "swift-wasm-*" -type d)" >> $GITHUB_ENV
204
+ - name : Build hello.wasm
205
+ shell : bash
206
+ run : |
198
207
echo 'print("Hello, world!")' > hello.swift
199
- $TOOLCHAIN_PATH /usr/bin/swiftc \
208
+ $TOOLCHAIN /usr/bin/swiftc \
200
209
-target wasm32-unknown-wasi \
201
- -sdk $TOOLCHAIN_PATH /usr/share/wasi-sysroot \
210
+ -sdk $TOOLCHAIN /usr/share/wasi-sysroot \
202
211
hello.swift -o hello.wasm && \
203
212
echo "Successfully linked hello.wasm"
204
213
- name : Test SwiftPM
205
214
shell : bash
206
215
run : |
207
216
set -x
208
- TOOLCHAIN_PATH=$(find "$PWD" -name "swift-wasm-*" -type d)
209
217
mkdir test
210
218
cd test
211
- $TOOLCHAIN_PATH /usr/bin/swift package init
212
- $TOOLCHAIN_PATH /usr/bin/swift build --triple wasm32-unknown-wasi
219
+ $TOOLCHAIN /usr/bin/swift package init
220
+ $TOOLCHAIN /usr/bin/swift build --triple wasm32-unknown-wasi
213
221
- name : Upload hello.wasm compiled with Ubuntu 18.04 package
214
222
uses : actions/upload-artifact@v1
215
223
with :
216
224
name : ubuntu18.04-hello.wasm
217
225
path : hello.wasm
226
+ - name : Checkout integration-tests
227
+ uses : actions/checkout@v2
228
+ with :
229
+ repository : swiftwasm/integration-tests
230
+ - name : Run integration tests
231
+ run : swift run # Use TOOLCHAIN env value
218
232
219
233
ubuntu2004_smoke_test :
220
234
name : Run smoke tests on Ubuntu 20.04
@@ -225,29 +239,36 @@ jobs:
225
239
uses : actions/download-artifact@v1
226
240
with :
227
241
name : ubuntu20.04-installable
228
- - name : Build hello.wasm
229
- shell : bash
242
+ - name : Unpack toolchain
230
243
run : |
231
244
set -x
232
245
tar xf $(find . -name "swift-wasm-*.tar.gz" -type f)
233
- TOOLCHAIN_PATH=$(find "$PWD" -name "swift-wasm-*" -type d)
246
+ echo "TOOLCHAIN=$(find "$PWD" -name "swift-wasm-*" -type d)" >> $GITHUB_ENV
247
+ - name : Build hello.wasm
248
+ shell : bash
249
+ run : |
234
250
echo 'print("Hello, world!")' > hello.swift
235
- $TOOLCHAIN_PATH /usr/bin/swiftc \
251
+ $TOOLCHAIN /usr/bin/swiftc \
236
252
-target wasm32-unknown-wasi \
237
- -sdk $TOOLCHAIN_PATH /usr/share/wasi-sysroot \
253
+ -sdk $TOOLCHAIN /usr/share/wasi-sysroot \
238
254
hello.swift -o hello.wasm && \
239
255
echo "Successfully linked hello.wasm"
240
256
- name : Test SwiftPM
241
257
shell : bash
242
258
run : |
243
259
set -x
244
- TOOLCHAIN_PATH=$(find "$PWD" -name "swift-wasm-*" -type d)
245
260
mkdir test
246
261
cd test
247
- $TOOLCHAIN_PATH /usr/bin/swift package init
248
- $TOOLCHAIN_PATH /usr/bin/swift build --triple wasm32-unknown-wasi
262
+ $TOOLCHAIN /usr/bin/swift package init
263
+ $TOOLCHAIN /usr/bin/swift build --triple wasm32-unknown-wasi
249
264
- name : Upload hello.wasm compiled with Ubuntu 20.04 package
250
265
uses : actions/upload-artifact@v1
251
266
with :
252
267
name : ubuntu20.04-hello.wasm
253
268
path : hello.wasm
269
+ - name : Checkout integration-tests
270
+ uses : actions/checkout@v2
271
+ with :
272
+ repository : swiftwasm/integration-tests
273
+ - name : Run integration tests
274
+ run : swift run # Use TOOLCHAIN env value
0 commit comments