5353 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"
5454 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"
5555 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"
5660
5761permissions :
5862 contents : read
6468 actions : write
6569 uses : ./.github/workflows/build_llvm_libraries.yml
6670 with :
67- os : " ubuntu-20 .04"
71+ os : ubuntu-22 .04
6872 arch : " X86"
6973
7074 build_iwasm :
@@ -102,30 +106,22 @@ jobs:
102106 " -DWAMR_DISABLE_HW_BOUND_CHECK=1" ,
103107 " -DWAMR_BUILD_SGX_IPFS=1" ,
104108 ]
105- os : [ubuntu-20 .04]
109+ os : [ubuntu-22 .04]
106110 platform : [linux-sgx]
107111 exclude :
108112 # incompatible mode and feature
109113 # MINI_LOADER only on INTERP mode
110114 - make_options_run_mode : $AOT_BUILD_OPTIONS
111115 make_options_feature : " -DWAMR_BUILD_MINI_LOADER=1"
112116 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-
126117 - name : checkout
127118 uses : actions/checkout@v4
128119
120+ - name : install SGX SDK and necessary libraries
121+ uses : ./.github/actions/install-linux-sgx
122+ with :
123+ os : ${{ matrix.os }}
124+
129125 - name : Build iwasm
130126 run : |
131127 mkdir build && cd build
@@ -150,7 +146,7 @@ jobs:
150146 # $LLVM_LAZY_JIT_BUILD_OPTIONS,
151147 # $LLVM_EAGER_JIT_BUILD_OPTIONS,
152148 ]
153- os : [ubuntu-20 .04]
149+ os : [ubuntu-22 .04]
154150 wasi_sdk_release :
155151 [
156152 " https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-19/wasi-sdk-19.0-linux.tar.gz" ,
@@ -165,7 +161,7 @@ jobs:
165161 ]
166162 platform : [linux-sgx]
167163 include :
168- - os : ubuntu-20 .04
164+ - os : ubuntu-22 .04
169165 llvm_cache_key : ${{ needs.build_llvm_libraries.outputs.cache_key }}
170166
171167 steps :
@@ -186,33 +182,10 @@ jobs:
186182 sudo tar -xzf wabt-1.0.31-*.tar.gz
187183 sudo mv wabt-1.0.31 wabt
188184
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-
205185 - 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 }}
216189
217190 - name : Build iwasm for testing samples
218191 run : |
@@ -271,28 +244,32 @@ jobs:
271244
272245 spec_test_default :
273246 needs : [build_iwasm, build_llvm_libraries]
274- runs-on : ubuntu-20.04
247+ runs-on : ${{ matrix.os }}
275248 strategy :
276249 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]
281255 exclude :
282256 # classic-interp, fast-interp and fast-jit don't support simd
283257 - running_mode : " classic-interp"
284- test_option : " -x -p -s spec -S -P "
258+ test_option : $SIMD_TEST_OPTIONS
285259 - running_mode : " fast-interp"
286- test_option : " -x -p -s spec -S -P "
260+ test_option : $SIMD_TEST_OPTIONS
287261 - running_mode : " fast-jit"
288- test_option : " -x -p -s spec -S -P "
262+ test_option : $SIMD_TEST_OPTIONS
289263 # classic-interp, fast-interp and fast jit don't support XIP
290264 - running_mode : " classic-interp"
291- test_option : " -x -p -s spec -X -P "
265+ test_option : $XIP_TEST_OPTIONS
292266 - running_mode : " fast-interp"
293- test_option : " -x -p -s spec -X -P "
267+ test_option : $XIP_TEST_OPTIONS
294268 - 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 }}
296273
297274 steps :
298275 - name : checkout
@@ -316,19 +293,19 @@ jobs:
316293 run : echo "::error::can not get prebuilt llvm libraries" && exit 1
317294
318295 - 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 }}
329299
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
332309
333310 - name : run spec tests
334311 run : |
0 commit comments