Skip to content

Commit a732d98

Browse files
MaxDesiatovkateinoigakukun
authored andcommitted
Run packaging scripts and smoke test on CI (#15)
Any changes in this repository should be tested with the packaging script and a basic smoke test that compiles `hello.swift` on CI. In the future packaging and linking scripts should be moved to this repository, `swiftwasm-sdk` and `swiftwasm-package-sdk` projects probably would be archived when that happens. For now we're pulling the scripts from `swiftwasm-package-sdk` as it is. * Run packaging scripts and smoke test on CI * Make prepare-package.sh executable * Make SymbolLookup.swift compilable for wasm * Use GitHub Actions upload/download steps * Remove packaging steps from ci-*.sh * Move prepare-package.sh to main.yml to avoid clone * Refine formatting in .github/workflows/main.yml
1 parent 3d08a9f commit a732d98

File tree

2 files changed

+45
-3
lines changed

2 files changed

+45
-3
lines changed

.github/workflows/main.yml

+44-2
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,56 @@ jobs:
1515

1616
steps:
1717
- uses: actions/checkout@v1
18-
- name: Run a multi-line script
18+
- name: Build Linux installable archive
1919
run: ./ci-linux.sh
20+
- name: Upload Linux installable archive
21+
uses: actions/upload-artifact@v1
22+
with:
23+
name: linux-installable
24+
path: ../swiftwasm-linux.tar.gz
2025

2126
macos_build:
2227
timeout-minutes: 0
2328
runs-on: macOS-10.14
2429

2530
steps:
2631
- uses: actions/checkout@v1
27-
- name: Run a multi-line script
32+
- name: Build macOS installable archive
2833
run: ./ci-mac.sh
34+
- name: Upload macOS installable archive
35+
uses: actions/upload-artifact@v1
36+
with:
37+
name: macos-installable
38+
path: ../swiftwasm-mac.tar.gz
39+
40+
package:
41+
name: Build SwiftWasm packages
42+
needs:
43+
- linux_build
44+
- macos_build
45+
runs-on: ubuntu-18.04
46+
steps:
47+
- name: Download installable Linux archive
48+
uses: actions/download-artifact@v1
49+
with:
50+
name: linux-installable
51+
- name: Download installable macOS archive
52+
uses: actions/download-artifact@v1
53+
with:
54+
name: macos-installable
55+
- name: Build the packages
56+
shell: bash
57+
run: |
58+
git clone https://github.com/swiftwasm/swiftwasm-package-sdk.git
59+
cd swiftwasm-package-sdk
60+
./download-prebuilts.sh
61+
62+
cp ../linux-installable/swiftwasm-linux.tar.gz prebuilt/swiftwasm.tar.gz
63+
cp ../macos-installable/swiftwasm-mac.tar.gz prebuilt/swiftwasm-mac.tar.gz
64+
./build-packages.sh
65+
66+
cd output
67+
tar xf swiftwasm-sdk-linux.tar.xz
68+
69+
cd swiftwasm-sdk
70+
./swiftwasm example/hello.swift hello.wasm

build-linux.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export sourcedir=$PWD/..
1616
--install-destdir="$sourcedir/install" \
1717
--install-prefix="/opt/swiftwasm-sdk" \
1818
--install-swift \
19-
--installable-package="$sourcedir/swiftwasm.tar.gz" \
19+
--installable-package="$sourcedir/swiftwasm-linux.tar.gz" \
2020
--llvm-targets-to-build "X86;WebAssembly" \
2121
--stdlib-deployment-targets "wasm-wasm32" \
2222
--wasm-icu-data "todo-icu-data" \

0 commit comments

Comments
 (0)