@@ -180,26 +180,19 @@ jobs:
180180 --security-opt seccomp=unconfined \
181181 -dit \
182182 -e CI=$CI \
183- -e ONLY_SWIFT_SDK=${{ matrix.only_swift_sdk }} \
184183 -w /home/build-user/ \
185184 -v ${{ github.workspace }}:/source \
186185 -v oss-swift-package:/home/build-user \
187186 ${{ matrix.container }}
188187 docker exec swiftwasm-ci-buildbot /bin/bash -lc 'env; cp -r /source/* /home/build-user/; ./swiftwasm-build/tools/build/ci.sh ${{ matrix.scheme }}'
189188
190- - name : Extract installable archive from Docker container
191- if : ${{ matrix.container != null && !matrix.only_swift_sdk }}
192- run : |
193- docker cp swiftwasm-ci-buildbot:/home/build-user/swift-wasm-${{ matrix.toolchain_channel }}-SNAPSHOT-${{ matrix.target }}.tar.gz .
194- docker cp swiftwasm-ci-buildbot:/home/build-user/swift-wasm-${{ matrix.toolchain_channel }}-SNAPSHOT-${{ matrix.target }}.artifactbundle.zip . || true
195-
196189 - name : Extract installable archive from Docker container (wasm32-unknown-wasi)
197- if : ${{ matrix.container != null && matrix.only_swift_sdk }}
190+ if : ${{ matrix.container != null }}
198191 run : |
199192 docker cp swiftwasm-ci-buildbot:/home/build-user/swift-wasm-${{ matrix.toolchain_channel }}-SNAPSHOT-wasm32-unknown-wasi.artifactbundle.zip .
200193 # release-6.0 doesn't have wasm32-unknown-wasip1-threads SDK support yet
201194 - name : Extract installable archive from Docker container (wasm32-unknown-wasip1-threads)
202- if : ${{ matrix.container != null && matrix.only_swift_sdk && matrix. scheme != 'release-6.0' }}
195+ if : ${{ matrix.container != null && matrix.scheme != 'release-6.0' }}
203196 run : |
204197 docker cp swiftwasm-ci-buildbot:/home/build-user/swift-wasm-${{ matrix.toolchain_channel }}-SNAPSHOT-wasm32-unknown-wasip1-threads.artifactbundle.zip .
205198
@@ -228,23 +221,13 @@ jobs:
228221 name : ${{ matrix.target }}-${{ matrix.scheme }}-installable
229222 path : swift-wasm-${{ matrix.toolchain_channel }}-SNAPSHOT-${{ matrix.target }}.tar.gz
230223
231- - name : Upload ${{ matrix.target }} SDK artifact bundle
232- uses : actions/upload-artifact@v4
233- if : ${{ !matrix.only_swift_sdk }}
234- with :
235- name : ${{ matrix.target }}-${{ matrix.scheme }}-artifactbundle
236- path : swift-wasm-${{ matrix.toolchain_channel }}-SNAPSHOT-${{ matrix.target }}.artifactbundle.zip
237- if-no-files-found : ignore
238-
239224 - name : Upload Swift SDK artifact bundle (wasm32-unknown-wasi)
240225 uses : actions/upload-artifact@v4
241- if : ${{ matrix.only_swift_sdk }}
242226 with :
243227 name : ${{ matrix.scheme }}-wasm32-unknown-wasi-artifactbundle
244228 path : swift-wasm-${{ matrix.toolchain_channel }}-SNAPSHOT-wasm32-unknown-wasi.artifactbundle.zip
245229 - name : Upload Swift SDK artifact bundle (wasm32-unknown-wasip1-threads)
246230 uses : actions/upload-artifact@v4
247- if : ${{ matrix.only_swift_sdk }}
248231 with :
249232 name : ${{ matrix.scheme }}-wasm32-unknown-wasip1-threads-artifactbundle
250233 path : swift-wasm-${{ matrix.toolchain_channel }}-SNAPSHOT-wasm32-unknown-wasip1-threads.artifactbundle.zip
@@ -270,11 +253,6 @@ jobs:
270253 docker exec swiftwasm-ci-buildbot /bin/bash -lc \
271254 "./swiftwasm-build/schemes/${{ matrix.scheme }}/build/run-test.sh"
272255
273- # We need this step to save disk space for the next steps when building toolchain
274- - name : Cleanup build directory
275- if : ${{ matrix.run_stdlib_test && matrix.container != null && !matrix.only_swift_sdk }}
276- run : docker exec swiftwasm-ci-buildbot /bin/bash -lc "rm -rf build"
277-
278256 - name : Run stdlib tests for wasi-wasm32
279257 if : ${{ matrix.run_stdlib_test && matrix.container == null }}
280258 run : ./swiftwasm-build/schemes/${{ matrix.scheme }}/build/run-test.sh
@@ -291,7 +269,7 @@ jobs:
291269 path : ./swift-test-results.tar.gz
292270
293271 - name : Run integration tests (Swift SDK)
294- if : ${{ matrix.run_e2e_test && matrix.only_swift_sdk }}
272+ if : ${{ matrix.run_e2e_test }}
295273 run : |
296274 docker exec swiftwasm-ci-buildbot /bin/bash -lc \
297275 "./llvm-project/llvm/utils/lit/lit.py \
@@ -305,32 +283,3 @@ jobs:
305283 docker stop swiftwasm-ci-buildbot
306284 docker rm swiftwasm-ci-buildbot
307285 docker volume rm --force oss-swift-package
308-
309- # Run e2e test
310- - name : Prepare E2E test
311- if : ${{ !matrix.only_swift_sdk }}
312- run : |
313- INSTALL_DIR=$(mktemp -d)
314- tar xf swift-wasm-${{ matrix.toolchain_channel }}-SNAPSHOT-${{ matrix.target }}.tar.gz -C "$INSTALL_DIR"
315- echo "TOOLCHAIN=$(find "$INSTALL_DIR" -name "swift-wasm-${{ matrix.toolchain_channel }}-*" -type d | head -n1)" >> $GITHUB_ENV
316- - name : Build hello.wasm
317- shell : bash
318- if : ${{ matrix.build_hello_wasm && !matrix.only_swift_sdk }}
319- run : |
320- echo 'print("Hello, world!")' > hello.swift
321- $TOOLCHAIN/usr/bin/swiftc \
322- -target wasm32-unknown-wasi \
323- -sdk $TOOLCHAIN/usr/share/wasi-sysroot \
324- -resource-dir $TOOLCHAIN/usr/lib/swift_static \
325- hello.swift -o hello.wasm && \
326- echo "Successfully linked hello.wasm"
327- - name : Upload hello.wasm
328- if : ${{ matrix.build_hello_wasm && !matrix.only_swift_sdk && matrix.scheme == 'main' }}
329- uses : actions/upload-artifact@v4
330- with :
331- name : ${{ matrix.target }}-hello.wasm
332- path : hello.wasm
333-
334- - name : Run integration tests
335- if : ${{ matrix.run_e2e_test && !matrix.only_swift_sdk }}
336- run : ${{ github.workspace }}/llvm-project/llvm/utils/lit/lit.py --param package-path=$TOOLCHAIN --param scheme=${{ matrix.scheme }} ${{ github.workspace }}/swiftwasm-build/test -vv
0 commit comments