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