@@ -44,23 +44,35 @@ jobs:
4444 build-linux :
4545 strategy :
4646 matrix :
47- swift :
48- - " 5.8-focal"
49- - " 5.8-amazonlinux2"
50- - " 5.9-focal"
51- - " 5.9-amazonlinux2"
47+ include :
48+ - swift : " 5.8-focal"
49+ swiftwasm-download : " https://github.com/swiftwasm/swift/releases/download/swift-wasm-5.8.0-RELEASE/swift-wasm-5.8.0-RELEASE-ubuntu20.04_x86_64.tar.gz"
50+ - swift : " 5.8-amazonlinux2"
51+ swiftwasm-download : " https://github.com/swiftwasm/swift/releases/download/swift-wasm-5.8.0-RELEASE/swift-wasm-5.8.0-RELEASE-amazonlinux2_x86_64.tar.gz"
52+ - swift : " 5.9-focal"
53+ swiftwasm-download : " https://github.com/swiftwasm/swift/releases/download/swift-wasm-5.9.2-RELEASE/swift-wasm-5.9.2-RELEASE-ubuntu20.04_x86_64.tar.gz"
54+ - swift : " 5.9-amazonlinux2"
55+ swiftwasm-download : " https://github.com/swiftwasm/swift/releases/download/swift-wasm-5.9.2-RELEASE/swift-wasm-5.9.2-RELEASE-amazonlinux2_x86_64.tar.gz"
5256
53- container :
54- image : swift:${{ matrix.swift }}
5557 runs-on : ubuntu-20.04
58+ name : " build-linux (${{ matrix.swift }})"
5659
5760 steps :
5861 - uses : actions/checkout@v3
59- - id : setup-swiftwasm
60- uses : swiftwasm/setup-swiftwasm@v1
61- with :
62- swift-version : " wasm-5.8.0-RELEASE"
63- add-to-path : false
62+ - name : Configure container
63+ run : |
64+ docker run -dit --name build-container -v $PWD:/workspace -w /workspace swift:${{ matrix.swift }}
65+ echo 'docker exec -i build-container "$@"' > ./build-exec
66+ chmod +x ./build-exec
67+
68+ - name : Install WebAssembly toolchain
69+ id : setup-swiftwasm
70+ run : |
71+ toolchain_path="/opt/swiftwasm"
72+ ./build-exec mkdir -p "$toolchain_path"
73+ curl -L ${{ matrix.swiftwasm-download }} | ./build-exec tar xz --strip-component 1 -C "$toolchain_path"
74+ echo "toolchain-path=$toolchain_path" >> $GITHUB_OUTPUT
75+
6476 - name : Configure Tests/default.json
6577 run : |
6678 cat <<EOS > Tests/default.json
6981 "hostSwiftExecutablePath": "/usr/bin/swift"
7082 }
7183 EOS
72- - run : swift test
73- - run : ./CI/check-spectest.sh
74- - run : ./CI/check-wasi-testsuite.sh
84+ - run : ./build-exec swift test
85+ - run : ./build-exec ./ CI/check-spectest.sh
86+ - run : ./build-exec ./ CI/check-wasi-testsuite.sh
7587
7688 build-windows :
7789 runs-on : windows-latest
0 commit comments