11
11
- swiftwasm-release/5.3
12
12
13
13
jobs :
14
- linux_build :
14
+ ubuntu1804_build :
15
15
timeout-minutes : 0
16
16
runs-on : ubuntu-18.04
17
17
@@ -39,17 +39,63 @@ jobs:
39
39
- uses : actions/cache@v1
40
40
with :
41
41
path : ../build-cache
42
- key : ${{ runner.os }} -sccache-v10-${{ steps.cache_timestamp.outputs.timestamp }}
42
+ key : ubuntu-18.04 -sccache-v10-${{ steps.cache_timestamp.outputs.timestamp }}
43
43
restore-keys : |
44
- ${{ runner.os }} -sccache-v10-
45
- - name : Build Linux installable archive
44
+ ubuntu-18.04 -sccache-v10-
45
+ - name : Build Ubuntu 18.04 installable archive
46
46
run : |
47
47
./utils/webassembly/ci.sh
48
- - name : Upload Linux installable archive
48
+ - name : Upload Ubuntu 18.04 installable archive
49
49
uses : actions/upload-artifact@v1
50
50
with :
51
- name : linux-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
53
+ # - name: Pack test results
54
+ # run: tar cJf swift-test-results.tar.gz ../build/*/swift-linux-x86_64/swift-test-results
55
+ # - name: Upload test results
56
+ # uses: actions/upload-artifact@v1
57
+ # with:
58
+ # name: linux-test-results
59
+ # path: ./swift-test-results.tar.gz
60
+
61
+ ubuntu2004_build :
62
+ timeout-minutes : 0
63
+ runs-on : ubuntu-20.04
64
+
65
+ steps :
66
+ - name : Free disk space
67
+ run : |
68
+ df -h
69
+ sudo swapoff -a
70
+ sudo rm -f /swapfile
71
+ sudo rm -rf /opt/hostedtoolcache
72
+ sudo rm -rf /usr/share/dotnet
73
+ sudo apt clean
74
+ docker rmi $(docker image ls -aq)
75
+ df -h
76
+ - uses : actions/checkout@v1
77
+ with :
78
+ path : swift
79
+ - name : Prepare sccache timestamp
80
+ id : cache_timestamp
81
+ shell : cmake -P {0}
82
+ run : |
83
+ string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
84
+ message("::set-output name=timestamp::${current_date}")
85
+ - uses : actions/cache@v1
86
+ with :
87
+ path : ../build-cache
88
+ key : ubuntu-20.04-sccache-v10-${{ steps.cache_timestamp.outputs.timestamp }}
89
+ restore-keys : |
90
+ ubuntu-20.04-sccache-v10-
91
+ - name : Build Ubuntu 20.04 installable archive
92
+ run : |
93
+ ./utils/webassembly/ci.sh
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
53
99
# - name: Pack test results
54
100
# run: tar cJf swift-test-results.tar.gz ../build/*/swift-linux-x86_64/swift-test-results
55
101
# - name: Upload test results
94
140
with :
95
141
name : macos-test-results
96
142
path : ./swift-test-results.tar.gz
143
+
97
144
macos_smoke_test :
98
145
name : Run smoke tests on macOS
99
146
runs-on : macos-latest
@@ -129,15 +176,16 @@ jobs:
129
176
with :
130
177
name : macos-hello.wasm
131
178
path : hello.wasm
132
- linux_smoke_test :
133
- name : Run smoke tests on Linux
179
+
180
+ ubuntu1804_smoke_test :
181
+ name : Run smoke tests on Ubuntu 18.04
134
182
runs-on : ubuntu-18.04
135
- needs : linux_build
183
+ needs : ubuntu1804_build
136
184
steps :
137
- - name : Download installable Linux archive
185
+ - name : Download installable Ubuntu 18.04 archive
138
186
uses : actions/download-artifact@v1
139
187
with :
140
- name : linux -installable
188
+ name : ubuntu18.04 -installable
141
189
- name : Build hello.wasm
142
190
shell : bash
143
191
run : |
@@ -159,8 +207,44 @@ jobs:
159
207
cd test
160
208
$TOOLCHAIN_PATH/usr/bin/swift package init
161
209
$TOOLCHAIN_PATH/usr/bin/swift build --triple wasm32-unknown-wasi
162
- - name : Upload hello.wasm compiled with Linux package
210
+ - name : Upload hello.wasm compiled with Ubuntu 18.04 package
163
211
uses : actions/upload-artifact@v1
164
212
with :
165
- name : linux -hello.wasm
213
+ name : ubuntu18.04 -hello.wasm
166
214
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