@@ -17,30 +17,52 @@ jobs:
17
17
build_toolchain :
18
18
env :
19
19
TOOLCHAIN_CHANNEL : DEVELOPMENT
20
+ DEVELOPER_DIR : /Applications/Xcode_12.5.app/Contents/Developer/
20
21
strategy :
21
22
matrix :
22
23
include :
23
24
- build_os : ubuntu-18.04
25
+ agent_query : ubuntu-18.04
24
26
target : ubuntu18.04_x86_64
27
+ run_stdlib_test : false
25
28
run_full_test : false
26
29
run_e2e_test : true
27
30
build_hello_wasm : true
31
+ clean_build_dir : false
28
32
29
33
- build_os : ubuntu-20.04
34
+ agent_query : ubuntu-20.04
30
35
target : ubuntu20.04_x86_64
36
+ run_stdlib_test : false
31
37
run_full_test : false
32
38
run_e2e_test : true
33
39
build_hello_wasm : true
40
+ clean_build_dir : false
34
41
35
- - build_os : macos-10.15
42
+ - build_os : macos-11
43
+ agent_query : macos-11
36
44
target : macos_x86_64
45
+ run_stdlib_test : true
37
46
run_full_test : true
38
47
run_e2e_test : true
39
48
build_hello_wasm : true
49
+ clean_build_dir : false
50
+
51
+ - build_os : macos-11
52
+ agent_query : [self-hosted, macOS, ARM64]
53
+ target : macos_arm64
54
+ # FIXME: Enable stdlib test after wasmer fixes singlepass bug on arm64,
55
+ # fixes cranelift bug on x64, or wasmtime supports arm64
56
+ # Currently it's hard to run tests on both x64 and arm64.
57
+ run_stdlib_test : false
58
+ run_full_test : false
59
+ run_e2e_test : false
60
+ build_hello_wasm : true
61
+ clean_build_dir : true
40
62
41
63
name : Target ${{ matrix.target }}
42
64
timeout-minutes : 0
43
- runs-on : ${{ matrix.build_os }}
65
+ runs-on : ${{ matrix.agent_query }}
44
66
steps :
45
67
# TODO(katei): Remove this step after https://bugs.swift.org/browse/SR-15135 will be resolved
46
68
- name : (Workaround) Uninstall pre-installed Swift toolchain on Linux
@@ -75,26 +97,33 @@ jobs:
75
97
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
76
98
message("::set-output name=timestamp::${current_date}")
77
99
100
+ - name : Check Xcode version
101
+ if : ${{ startsWith(matrix.build_os, 'macos-') }}
102
+ run : |
103
+ xcodebuild -version
104
+
78
105
- uses : actions/cache@v1
79
106
with :
80
107
path : build-cache
81
108
key : ${{ matrix.target }}-sccache-v11-${{ steps.cache_timestamp.outputs.timestamp }}
82
109
restore-keys : |
83
110
${{ matrix.target }}-sccache-v11-
84
111
85
- - name : Select Xcode version
86
- if : ${{ matrix.build_os == 'macos-10.15' }}
112
+ - name : Clean stdlib build directory
113
+ if : ${{ matrix.clean_build_dir }}
87
114
run : |
88
- sudo xcode-select --switch /Applications/Xcode_12.3.app/Contents/Developer/
89
- xcodebuild -version
115
+ rm -rf ${{ github.workspace }}/target-build \
116
+ ${{ github.workspace }}/host-build \
117
+ ${{ github.workspace }}/host-toolchain-sdk \
118
+ ${{ github.workspace }}/dist-toolchain-sdk
90
119
91
120
- name : Build ${{ matrix.target }} installable archive
92
121
env :
93
122
SKIP_XCODE_VERSION_CHECK : 1
94
123
run : |
95
124
96
125
case "${{ matrix.target }}" in
97
- "ubuntu20.04_x86_64" | "ubuntu18.04_x86_64" | "macos_x86_64")
126
+ "ubuntu20.04_x86_64" | "ubuntu18.04_x86_64" | "macos_x86_64" | "macos_arm64" )
98
127
./swift/utils/webassembly/ci.sh
99
128
;;
100
129
*)
@@ -112,6 +141,23 @@ jobs:
112
141
name : ${{ matrix.target }}-installable
113
142
path : swift-wasm-${{ env.TOOLCHAIN_CHANNEL }}-SNAPSHOT-${{ matrix.target }}.tar.gz
114
143
144
+ - name : Add wasmer in PATH for testing
145
+ run : echo "$HOME/.wasmer/bin" >> $GITHUB_PATH
146
+
147
+ - name : Run stdlib tests for wasi-wasm32
148
+ if : ${{ matrix.run_stdlib_test }}
149
+ run : |
150
+ TARGET_STDLIB_BUILD_DIR=${{ github.workspace }}/target-build/swift-stdlib-wasi-wasm32
151
+ ./swift/utils/run-test --build-dir "$TARGET_STDLIB_BUILD_DIR" --target wasi-wasm32 \
152
+ "$TARGET_STDLIB_BUILD_DIR/test-wasi-wasm32/stdlib"
153
+
154
+ - name : Run all tests for wasi-wasm32
155
+ if : ${{ matrix.run_full_test }}
156
+ run : |
157
+ TARGET_STDLIB_BUILD_DIR=${{ github.workspace }}/target-build/swift-stdlib-wasi-wasm32
158
+ # Run all tests but ignore failure temporarily
159
+ ninja check-swift-wasi-wasm32 -C "$TARGET_STDLIB_BUILD_DIR" || true
160
+
115
161
- name : Pack test results
116
162
if : ${{ matrix.run_full_test }}
117
163
run : |
@@ -156,4 +202,3 @@ jobs:
156
202
run : |
157
203
$TOOLCHAIN/usr/bin/swift run # Use TOOLCHAIN env value
158
204
working-directory : ${{ github.workspace }}/integration-tests
159
-
0 commit comments