Skip to content

Commit 4ccc04f

Browse files
authored
Merge pull request #1084 from swiftwasm/maxd/smoke-test-linux
Run smoke test for the Linux build on CI
2 parents e3ca041 + 7fb9fc1 commit 4ccc04f

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/main.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,3 +103,30 @@ jobs:
103103
with:
104104
name: macos-hello.wasm
105105
path: hello.wasm
106+
linux_smoke_test:
107+
name: Compile hello.swift on Linux
108+
runs-on: ubuntu-18.04
109+
needs: linux_build
110+
steps:
111+
- name: Download installable Linux archive
112+
uses: actions/download-artifact@v1
113+
with:
114+
name: linux-installable
115+
- name: Build hello.wasm
116+
shell: bash
117+
run: |
118+
set -x
119+
tar xf $(find . -name "swift-wasm-*.tar.gz" -type f)
120+
TOOLCHAIN_PATH=$(find . -name "swift-wasm-*" -type d)
121+
echo 'print("Hello, world!")' > hello.swift
122+
$TOOLCHAIN_PATH/usr/bin/swiftc \
123+
-target wasm32-unknown-wasi \
124+
-sdk $TOOLCHAIN_PATH/usr/share/wasi-sysroot \
125+
hello.swift -o hello.wasm && \
126+
echo "Successfully linked hello.wasm"
127+
128+
- name: Upload hello.wasm compiled with Linux package
129+
uses: actions/upload-artifact@v1
130+
with:
131+
name: linux-hello.wasm
132+
path: hello.wasm

0 commit comments

Comments
 (0)