Skip to content

Upload SwiftWasm artifacts for later inspection #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Nov 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 49 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
uses: actions/upload-artifact@v1
with:
name: macos-installable
path: ../swiftwasm-mac.tar.gz
path: ../swiftwasm-macos.tar.gz

package:
name: Build SwiftWasm packages
Expand All @@ -59,12 +59,56 @@ jobs:
cd swiftwasm-package-sdk
./download-prebuilts.sh

cp ../linux-installable/swiftwasm-linux.tar.gz prebuilt/swiftwasm.tar.gz
cp ../macos-installable/swiftwasm-mac.tar.gz prebuilt/swiftwasm-mac.tar.gz
cp ../linux-installable/swiftwasm-linux.tar.gz \
../macos-installable/swiftwasm-macos.tar.gz \
prebuilt
./build-packages.sh

cd output
tar xf swiftwasm-sdk-linux.tar.xz
tar xf swiftwasm-sdk-linux.tar.xz && echo "Successfully unpacked Linux SDK"

cd swiftwasm-sdk
./swiftwasm example/hello.swift hello.wasm
./swiftwasm example/hello.swift hello.wasm && echo "Successfully linked hello.wasm"

- name: Upload macOS package
uses: actions/upload-artifact@v1
with:
name: macos-package
path: swiftwasm-package-sdk/output/swiftwasm-sdk-macos.tar.xz

- name: Upload Linux package
uses: actions/upload-artifact@v1
with:
name: linux-package
path: swiftwasm-package-sdk/output/swiftwasm-sdk-linux.tar.xz

- name: Upload hello.wasm compiled with Linux package
uses: actions/upload-artifact@v1
with:
name: linux-hello.wasm
path: swiftwasm-package-sdk/output/swiftwasm-sdk/hello.wasm

macos_smoke_test:
name: Compile hello.swift on macOS
runs-on: macOS-10.14
needs: package
steps:
- name: Download SwiftWasm macOS package
uses: actions/download-artifact@v1
with:
name: macos-package

- name: Build hello.wasm
shell: bash
run: |
cd macos-package
tar xf swiftwasm-sdk-macos.tar.xz && echo "Successfully unpacked macOS SDK"

cd swiftwasm-sdk
./swiftwasm example/hello.swift hello.wasm && echo "Successfully linked hello.wasm"

- name: Upload hello.wasm compiled with macOS package
uses: actions/upload-artifact@v1
with:
name: macos-hello.wasm
path: macos-package/swiftwasm-sdk/hello.wasm
2 changes: 1 addition & 1 deletion build-mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ export sourcedir=$PWD/..
--install-swift \
--install-prefix="/opt/swiftwasm-sdk" \
--install-destdir="$sourcedir/install" \
--installable-package="$sourcedir/swiftwasm-mac.tar.gz"
--installable-package="$sourcedir/swiftwasm-macos.tar.gz"