1111 - swiftwasm-release/5.3
1212
1313jobs :
14- ubuntu_1804_build :
14+ ubuntu1804_build :
1515 timeout-minutes : 0
1616 runs-on : ubuntu-18.04
1717
4848 - name : Upload Ubuntu 18.04 installable archive
4949 uses : actions/upload-artifact@v1
5050 with :
51- name : ubuntu_18 .04-installable
52- path : ../swift-wasm-DEVELOPMENT-SNAPSHOT-linux .tar.gz
51+ name : ubuntu18 .04-installable
52+ path : ../swift-wasm-DEVELOPMENT-SNAPSHOT-ubuntu18.04 .tar.gz
5353# - name: Pack test results
5454# run: tar cJf swift-test-results.tar.gz ../build/*/swift-linux-x86_64/swift-test-results
5555# - name: Upload test results
5858# name: linux-test-results
5959# path: ./swift-test-results.tar.gz
6060
61- ubuntu_2004_build :
61+ ubuntu2004_build :
6262 timeout-minutes : 0
6363 runs-on : ubuntu-20.04
6464
@@ -91,11 +91,11 @@ jobs:
9191 - name : Build Ubuntu 20.04 installable archive
9292 run : |
9393 ./utils/webassembly/ci.sh
94- # - name: Upload Linux installable archive
95- # uses: actions/upload-artifact@v1
96- # with:
97- # name: linux -installable
98- # path: ../swift-wasm-DEVELOPMENT-SNAPSHOT-linux .tar.gz
94+ - name : Upload Ubuntu 20.04 installable archive
95+ uses : actions/upload-artifact@v1
96+ with :
97+ name : ubuntu20.04 -installable
98+ path : ../swift-wasm-DEVELOPMENT-SNAPSHOT-ubuntu20.04 .tar.gz
9999# - name: Pack test results
100100# run: tar cJf swift-test-results.tar.gz ../build/*/swift-linux-x86_64/swift-test-results
101101# - name: Upload test results
@@ -140,6 +140,7 @@ jobs:
140140 with :
141141 name : macos-test-results
142142 path : ./swift-test-results.tar.gz
143+
143144 macos_smoke_test :
144145 name : Run smoke tests on macOS
145146 runs-on : macos-latest
@@ -176,15 +177,15 @@ jobs:
176177 name : macos-hello.wasm
177178 path : hello.wasm
178179
179- ubuntu_1804_smoke_test :
180+ ubuntu1804_smoke_test :
180181 name : Run smoke tests on Ubuntu 18.04
181182 runs-on : ubuntu-18.04
182- needs : ubuntu_1804_build
183+ needs : ubuntu1804_build
183184 steps :
184185 - name : Download installable Ubuntu 18.04 archive
185186 uses : actions/download-artifact@v1
186187 with :
187- name : ubuntu_18 .04-installable
188+ name : ubuntu18 .04-installable
188189 - name : Build hello.wasm
189190 shell : bash
190191 run : |
@@ -209,5 +210,41 @@ jobs:
209210 - name : Upload hello.wasm compiled with Ubuntu 18.04 package
210211 uses : actions/upload-artifact@v1
211212 with :
212- name : linux -hello.wasm
213+ name : ubuntu18.04 -hello.wasm
213214 path : hello.wasm
215+
216+ ubuntu2004_smoke_test :
217+ name : Run smoke tests on Ubuntu 20.04
218+ runs-on : ubuntu-20.04
219+ needs : ubuntu2004_build
220+ steps :
221+ - name : Download installable Ubuntu 20.04 archive
222+ uses : actions/download-artifact@v1
223+ with :
224+ name : ubuntu20.04-installable
225+ - name : Build hello.wasm
226+ shell : bash
227+ run : |
228+ set -x
229+ tar xf $(find . -name "swift-wasm-*.tar.gz" -type f)
230+ TOOLCHAIN_PATH=$(find "$PWD" -name "swift-wasm-*" -type d)
231+ echo 'print("Hello, world!")' > hello.swift
232+ $TOOLCHAIN_PATH/usr/bin/swiftc \
233+ -target wasm32-unknown-wasi \
234+ -sdk $TOOLCHAIN_PATH/usr/share/wasi-sysroot \
235+ hello.swift -o hello.wasm && \
236+ echo "Successfully linked hello.wasm"
237+ - name : Test SwiftPM
238+ shell : bash
239+ run : |
240+ set -x
241+ TOOLCHAIN_PATH=$(find "$PWD" -name "swift-wasm-*" -type d)
242+ mkdir test
243+ cd test
244+ $TOOLCHAIN_PATH/usr/bin/swift package init
245+ $TOOLCHAIN_PATH/usr/bin/swift build --triple wasm32-unknown-wasi
246+ - name : Upload hello.wasm compiled with Ubuntu 20.04 package
247+ uses : actions/upload-artifact@v1
248+ with :
249+ name : ubuntu2004-hello.wasm
250+ path : hello.wasm
0 commit comments