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 -X -b"
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,15 +146,12 @@ 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 iwasm_make_options_feature : [
155151 # Features to be tested: IPFS
156152 " -DWAMR_BUILD_SGX_IPFS=1" ,
157153 ]
158154 platform : [linux-sgx]
159- include :
160- - os : ubuntu-20.04
161- llvm_cache_key : ${{ needs.build_llvm_libraries.outputs.cache_key }}
162155
163156 steps :
164157 - name : checkout
@@ -169,33 +162,10 @@ jobs:
169162 with :
170163 os : ${{ matrix.os }}
171164
172- # - name: build wasi-libc (needed for wasi-threads)
173- # run: |
174- # mkdir wasi-libc
175- # cd wasi-libc
176- # git init
177- # # "Fix a_store operation in atomic.h" commit on main branch
178- # git fetch https://github.com/WebAssembly/wasi-libc \
179- # 1dfe5c302d1c5ab621f7abf04620fae92700fd22
180- # git checkout FETCH_HEAD
181- # make \
182- # AR=/opt/wasi-sdk/bin/llvm-ar \
183- # NM=/opt/wasi-sdk/bin/llvm-nm \
184- # CC=/opt/wasi-sdk/bin/clang \
185- # THREAD_MODEL=posix
186- # working-directory: core/deps
187-
188165 - name : install SGX SDK and necessary libraries
189- run : |
190- mkdir -p /opt/intel
191- cd /opt/intel
192- wget https://download.01.org/intel-sgx/sgx-linux/2.15/distro/ubuntu20.04-server/sgx_linux_x64_sdk_2.15.100.3.bin
193- chmod +x sgx_linux_x64_sdk_2.15.100.3.bin
194- echo 'yes' | ./sgx_linux_x64_sdk_2.15.100.3.bin
195- 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
196- wget -qO - https://download.01.org/intel-sgx/sgx_repo/ubuntu/intel-sgx-deb.key | sudo apt-key add -
197- sudo apt update
198- sudo apt install -y libsgx-launch libsgx-urts
166+ uses : ./.github/actions/install-linux-sgx
167+ with :
168+ os : ${{ matrix.os }}
199169
200170 - name : Build iwasm for testing samples
201171 run : |
@@ -217,7 +187,7 @@ jobs:
217187 ./core/deps/llvm/build/lib
218188 ./core/deps/llvm/build/libexec
219189 ./core/deps/llvm/build/share
220- key : ${{ matrix.llvm_cache_key }}
190+ key : ${{ needs.build_llvm_libraries.outputs.cache_key }}
221191 fail-on-cache-miss : true
222192
223193 - name : Build wamrc only for testing samples in aot mode
@@ -252,28 +222,29 @@ jobs:
252222
253223 spec_test_default :
254224 needs : [build_iwasm, build_llvm_libraries]
255- runs-on : ubuntu-20.04
225+ runs-on : ${{ matrix.os }}
256226 strategy :
257227 matrix :
258- running_mode : ["classic-interp", "fast-interp", "aot", "fast-jit"]
259- # FIXME: use binary release(adding -b) instead of building from source after upgrading to 22.04
260- test_option : ["-x -p -s spec -P", "-x -p -s spec -S -P", "-x -p -s spec -X -P"]
261- llvm_cache_key : ["${{ needs.build_llvm_libraries.outputs.cache_key }}"]
228+ # "fast-interp" because of SIMDE
229+ running_mode : ["classic-interp", "aot", "fast-jit"]
230+ test_option :
231+ [$DEFAULT_TEST_OPTIONS, $SIMD_TEST_OPTIONS, $XIP_TEST_OPTIONS]
232+ os : [ubuntu-22.04]
262233 exclude :
263234 # classic-interp, fast-interp and fast-jit don't support simd
264235 - running_mode : " classic-interp"
265- test_option : " -x -p -s spec -S -P "
236+ test_option : $SIMD_TEST_OPTIONS
266237 - running_mode : " fast-interp"
267- test_option : " -x -p -s spec -S -P "
238+ test_option : $SIMD_TEST_OPTIONS
268239 - running_mode : " fast-jit"
269- test_option : " -x -p -s spec -S -P "
240+ test_option : $SIMD_TEST_OPTIONS
270241 # classic-interp, fast-interp and fast jit don't support XIP
271242 - running_mode : " classic-interp"
272- test_option : " -x -p -s spec -X -P "
243+ test_option : $XIP_TEST_OPTIONS
273244 - running_mode : " fast-interp"
274- test_option : " -x -p -s spec -X -P "
245+ test_option : $XIP_TEST_OPTIONS
275246 - running_mode : " fast-jit"
276- test_option : " -x -p -s spec -X -P "
247+ test_option : $XIP_TEST_OPTIONS
277248
278249 steps :
279250 - name : checkout
@@ -290,23 +261,16 @@ jobs:
290261 ./core/deps/llvm/build/lib
291262 ./core/deps/llvm/build/libexec
292263 ./core/deps/llvm/build/share
293- key : ${{ matrix.llvm_cache_key }}
264+ key : ${{ needs.build_llvm_libraries.outputs.cache_key }}
294265
295266 - name : Quit if cache miss
296267 if : matrix.running_mode == 'aot' && steps.retrieve_llvm_libs.outputs.cache-hit != 'true'
297268 run : echo "::error::can not get prebuilt llvm libraries" && exit 1
298269
299270 - name : install SGX SDK and necessary libraries
300- run : |
301- mkdir -p /opt/intel
302- cd /opt/intel
303- wget https://download.01.org/intel-sgx/sgx-linux/2.15/distro/ubuntu20.04-server/sgx_linux_x64_sdk_2.15.100.3.bin
304- chmod +x sgx_linux_x64_sdk_2.15.100.3.bin
305- echo 'yes' | ./sgx_linux_x64_sdk_2.15.100.3.bin
306- 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
307- wget -qO - https://download.01.org/intel-sgx/sgx_repo/ubuntu/intel-sgx-deb.key | sudo apt-key add -
308- sudo apt update
309- sudo apt install -y libsgx-launch libsgx-urts
271+ uses : ./.github/actions/install-linux-sgx
272+ with :
273+ os : ${{ matrix.os }}
310274
311275 - name : install for wabt compilation
312276 run : sudo apt update && sudo apt install -y ninja-build
0 commit comments