53
53
FAST_JIT_BUILD_OPTIONS : " -DWAMR_BUILD_AOT=1 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=1 -DWAMR_BUILD_FAST_JIT=1 -DWAMR_BUILD_JIT=0 -DWAMR_BUILD_LAZY_JIT=1"
54
54
LLVM_LAZY_JIT_BUILD_OPTIONS : " -DWAMR_BUILD_AOT=1 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=0 -DWAMR_BUILD_JIT=1 -DWAMR_BUILD_LAZY_JIT=1"
55
55
LLVM_EAGER_JIT_BUILD_OPTIONS : " -DWAMR_BUILD_AOT=1 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=0 -DWAMR_BUILD_JIT=1 -DWAMR_BUILD_LAZY_JIT=0"
56
+ # For Spec Test
57
+ DEFAULT_TEST_OPTIONS : " -s spec -x -p -b"
58
+ SIMD_TEST_OPTIONS : " -s spec -x -p -b -S"
59
+ XIP_TEST_OPTIONS : " -s spec -x -p -b -X"
56
60
57
61
permissions :
58
62
contents : read
64
68
actions : write
65
69
uses : ./.github/workflows/build_llvm_libraries.yml
66
70
with :
67
- os : " ubuntu-20 .04"
71
+ os : ubuntu-22 .04
68
72
arch : " X86"
69
73
70
74
build_iwasm :
@@ -102,30 +106,22 @@ jobs:
102
106
" -DWAMR_DISABLE_HW_BOUND_CHECK=1" ,
103
107
" -DWAMR_BUILD_SGX_IPFS=1" ,
104
108
]
105
- os : [ubuntu-20 .04]
109
+ os : [ubuntu-22 .04]
106
110
platform : [linux-sgx]
107
111
exclude :
108
112
# incompatible mode and feature
109
113
# MINI_LOADER only on INTERP mode
110
114
- make_options_run_mode : $AOT_BUILD_OPTIONS
111
115
make_options_feature : " -DWAMR_BUILD_MINI_LOADER=1"
112
116
steps :
113
- - name : install SGX SDK and necessary libraries
114
- run : |
115
- mkdir -p /opt/intel
116
- cd /opt/intel
117
- wget https://download.01.org/intel-sgx/sgx-linux/2.15/distro/ubuntu20.04-server/sgx_linux_x64_sdk_2.15.100.3.bin
118
- chmod +x sgx_linux_x64_sdk_2.15.100.3.bin
119
- echo 'yes' | ./sgx_linux_x64_sdk_2.15.100.3.bin
120
- echo 'deb [arch=amd64] https://download.01.org/intel-sgx/sgx_repo/ubuntu focal main' | sudo tee /etc/apt/sources.list.d/intel-sgx.list
121
- wget -qO - https://download.01.org/intel-sgx/sgx_repo/ubuntu/intel-sgx-deb.key | sudo apt-key add -
122
- sudo apt update
123
- sudo apt install -y libsgx-launch libsgx-urts
124
- source /opt/intel/sgxsdk/environment
125
-
126
117
- name : checkout
127
118
uses : actions/checkout@v4
128
119
120
+ - name : install SGX SDK and necessary libraries
121
+ uses : ./.github/actions/install-linux-sgx
122
+ with :
123
+ os : ${{ matrix.os }}
124
+
129
125
- name : Build iwasm
130
126
run : |
131
127
mkdir build && cd build
@@ -150,7 +146,7 @@ jobs:
150
146
# $LLVM_LAZY_JIT_BUILD_OPTIONS,
151
147
# $LLVM_EAGER_JIT_BUILD_OPTIONS,
152
148
]
153
- os : [ubuntu-20 .04]
149
+ os : [ubuntu-22 .04]
154
150
wasi_sdk_release :
155
151
[
156
152
" https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-19/wasi-sdk-19.0-linux.tar.gz" ,
@@ -165,7 +161,7 @@ jobs:
165
161
]
166
162
platform : [linux-sgx]
167
163
include :
168
- - os : ubuntu-20 .04
164
+ - os : ubuntu-22 .04
169
165
llvm_cache_key : ${{ needs.build_llvm_libraries.outputs.cache_key }}
170
166
171
167
steps :
@@ -186,33 +182,10 @@ jobs:
186
182
sudo tar -xzf wabt-1.0.31-*.tar.gz
187
183
sudo mv wabt-1.0.31 wabt
188
184
189
- - name : build wasi-libc (needed for wasi-threads)
190
- run : |
191
- mkdir wasi-libc
192
- cd wasi-libc
193
- git init
194
- # "Fix a_store operation in atomic.h" commit on main branch
195
- git fetch https://github.com/WebAssembly/wasi-libc \
196
- 1dfe5c302d1c5ab621f7abf04620fae92700fd22
197
- git checkout FETCH_HEAD
198
- make \
199
- AR=/opt/wasi-sdk/bin/llvm-ar \
200
- NM=/opt/wasi-sdk/bin/llvm-nm \
201
- CC=/opt/wasi-sdk/bin/clang \
202
- THREAD_MODEL=posix
203
- working-directory : core/deps
204
-
205
185
- name : install SGX SDK and necessary libraries
206
- run : |
207
- mkdir -p /opt/intel
208
- cd /opt/intel
209
- wget https://download.01.org/intel-sgx/sgx-linux/2.15/distro/ubuntu20.04-server/sgx_linux_x64_sdk_2.15.100.3.bin
210
- chmod +x sgx_linux_x64_sdk_2.15.100.3.bin
211
- echo 'yes' | ./sgx_linux_x64_sdk_2.15.100.3.bin
212
- echo 'deb [arch=amd64] https://download.01.org/intel-sgx/sgx_repo/ubuntu focal main' | sudo tee /etc/apt/sources.list.d/intel-sgx.list
213
- wget -qO - https://download.01.org/intel-sgx/sgx_repo/ubuntu/intel-sgx-deb.key | sudo apt-key add -
214
- sudo apt update
215
- sudo apt install -y libsgx-launch libsgx-urts
186
+ uses : ./.github/actions/install-linux-sgx
187
+ with :
188
+ os : ${{ matrix.os }}
216
189
217
190
- name : Build iwasm for testing samples
218
191
run : |
@@ -271,28 +244,32 @@ jobs:
271
244
272
245
spec_test_default :
273
246
needs : [build_iwasm, build_llvm_libraries]
274
- runs-on : ubuntu-20.04
247
+ runs-on : ${{ matrix.os }}
275
248
strategy :
276
249
matrix :
277
- running_mode : ["classic-interp", "fast-interp", "aot", "fast-jit"]
278
- # FIXME: use binary release(adding -b) instead of building from source after upgrading to 22.04
279
- test_option : ["-x -p -s spec -P", "-x -p -s spec -S -P", "-x -p -s spec -X -P"]
280
- llvm_cache_key : ["${{ needs.build_llvm_libraries.outputs.cache_key }}"]
250
+ # (workaround) disable "fast-interp" because of SIMDE
251
+ running_mode : ["classic-interp", "aot", "fast-jit"]
252
+ test_option :
253
+ [$DEFAULT_TEST_OPTIONS, $SIMD_TEST_OPTIONS, $XIP_TEST_OPTIONS]
254
+ os : [ubuntu-22.04]
281
255
exclude :
282
256
# classic-interp, fast-interp and fast-jit don't support simd
283
257
- running_mode : " classic-interp"
284
- test_option : " -x -p -s spec -S -P "
258
+ test_option : $SIMD_TEST_OPTIONS
285
259
- running_mode : " fast-interp"
286
- test_option : " -x -p -s spec -S -P "
260
+ test_option : $SIMD_TEST_OPTIONS
287
261
- running_mode : " fast-jit"
288
- test_option : " -x -p -s spec -S -P "
262
+ test_option : $SIMD_TEST_OPTIONS
289
263
# classic-interp, fast-interp and fast jit don't support XIP
290
264
- running_mode : " classic-interp"
291
- test_option : " -x -p -s spec -X -P "
265
+ test_option : $XIP_TEST_OPTIONS
292
266
- running_mode : " fast-interp"
293
- test_option : " -x -p -s spec -X -P "
267
+ test_option : $XIP_TEST_OPTIONS
294
268
- running_mode : " fast-jit"
295
- test_option : " -x -p -s spec -X -P"
269
+ test_option : $XIP_TEST_OPTIONS
270
+ include :
271
+ - os : ubuntu-22.04
272
+ llvm_cache_key : ${{ needs.build_llvm_libraries.outputs.cache_key }}
296
273
297
274
steps :
298
275
- name : checkout
@@ -316,19 +293,19 @@ jobs:
316
293
run : echo "::error::can not get prebuilt llvm libraries" && exit 1
317
294
318
295
- name : install SGX SDK and necessary libraries
319
- run : |
320
- mkdir -p /opt/intel
321
- cd /opt/intel
322
- wget https://download.01.org/intel-sgx/sgx-linux/2.15/distro/ubuntu20.04-server/sgx_linux_x64_sdk_2.15.100.3.bin
323
- chmod +x sgx_linux_x64_sdk_2.15.100.3.bin
324
- echo 'yes' | ./sgx_linux_x64_sdk_2.15.100.3.bin
325
- echo 'deb [arch=amd64] https://download.01.org/intel-sgx/sgx_repo/ubuntu focal main' | sudo tee /etc/apt/sources.list.d/intel-sgx.list
326
- wget -qO - https://download.01.org/intel-sgx/sgx_repo/ubuntu/intel-sgx-deb.key | sudo apt-key add -
327
- sudo apt update
328
- sudo apt install -y libsgx-launch libsgx-urts
296
+ uses : ./.github/actions/install-linux-sgx
297
+ with :
298
+ os : ${{ matrix.os }}
329
299
330
- - name : install for wabt compilation
331
- run : sudo apt update && sudo apt install -y ninja-build
300
+ # workaround about a https://github.com/actions/runner-images/issues/6680#issuecomment-2640923706
301
+ - name : Increase swapfile
302
+ run : |
303
+ sudo swapoff -a
304
+ sudo fallocate -l 15G /swapfile
305
+ sudo chmod 600 /swapfile
306
+ sudo mkswap /swapfile
307
+ sudo swapon /swapfile
308
+ sudo swapon --show
332
309
333
310
- name : run spec tests
334
311
run : |
0 commit comments