6464 actions : write
6565 uses : ./.github/workflows/build_llvm_libraries.yml
6666 with :
67- os : " ubuntu-20 .04"
67+ os : ubuntu-22 .04
6868 arch : " X86"
6969
7070 build_iwasm :
@@ -102,30 +102,22 @@ jobs:
102102 " -DWAMR_DISABLE_HW_BOUND_CHECK=1" ,
103103 " -DWAMR_BUILD_SGX_IPFS=1" ,
104104 ]
105- os : [ubuntu-20 .04]
106- platform : [linux-sgx]
105+ os : [ ubuntu-22 .04 ]
106+ platform : [ linux-sgx ]
107107 exclude :
108108 # incompatible mode and feature
109109 # MINI_LOADER only on INTERP mode
110110 - make_options_run_mode : $AOT_BUILD_OPTIONS
111111 make_options_feature : " -DWAMR_BUILD_MINI_LOADER=1"
112112 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-
126113 - name : checkout
127114 uses : actions/checkout@v4
128115
116+ - name : install SGX SDK and necessary libraries
117+ uses : ./.github/actions/install-linux-sgx
118+ with :
119+ os : ${{ matrix.os }}
120+
129121 - name : Build iwasm
130122 run : |
131123 mkdir build && cd build
@@ -150,15 +142,12 @@ jobs:
150142 # $LLVM_LAZY_JIT_BUILD_OPTIONS,
151143 # $LLVM_EAGER_JIT_BUILD_OPTIONS,
152144 ]
153- os : [ubuntu-20 .04]
145+ os : [ ubuntu-22 .04 ]
154146 iwasm_make_options_feature : [
155147 # Features to be tested: IPFS
156148 " -DWAMR_BUILD_SGX_IPFS=1" ,
157149 ]
158150 platform : [linux-sgx]
159- include :
160- - os : ubuntu-20.04
161- llvm_cache_key : ${{ needs.build_llvm_libraries.outputs.cache_key }}
162151
163152 steps :
164153 - name : checkout
@@ -169,33 +158,10 @@ jobs:
169158 with :
170159 os : ${{ matrix.os }}
171160
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-
188161 - 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
162+ uses : ./.github/actions/install-linux-sgx
163+ with :
164+ os : ${{ matrix.os }}
199165
200166 - name : Build iwasm for testing samples
201167 run : |
@@ -217,7 +183,7 @@ jobs:
217183 ./core/deps/llvm/build/lib
218184 ./core/deps/llvm/build/libexec
219185 ./core/deps/llvm/build/share
220- key : ${{ matrix.llvm_cache_key }}
186+ key : ${{ needs.build_llvm_libraries.outputs.cache_key }}
221187 fail-on-cache-miss : true
222188
223189 - name : Build wamrc only for testing samples in aot mode
@@ -252,13 +218,15 @@ jobs:
252218
253219 spec_test_default :
254220 needs : [build_iwasm, build_llvm_libraries]
255- runs-on : ubuntu-20.04
221+ runs-on : ${{ matrix.os }}
256222 strategy :
257223 matrix :
258224 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 }}"]
225+ test_option :
226+ - " -x -p -s spec -b -P"
227+ - " -x -p -s spec -b -S -P"
228+ - " -x -p -s spec -b -X -P"
229+ os : [ ubuntu-22.04 ]
262230 exclude :
263231 # classic-interp, fast-interp and fast-jit don't support simd
264232 - running_mode : " classic-interp"
@@ -290,23 +258,16 @@ jobs:
290258 ./core/deps/llvm/build/lib
291259 ./core/deps/llvm/build/libexec
292260 ./core/deps/llvm/build/share
293- key : ${{ matrix.llvm_cache_key }}
261+ key : ${{ needs.build_llvm_libraries.outputs.cache_key }}
294262
295263 - name : Quit if cache miss
296264 if : matrix.running_mode == 'aot' && steps.retrieve_llvm_libs.outputs.cache-hit != 'true'
297265 run : echo "::error::can not get prebuilt llvm libraries" && exit 1
298266
299267 - 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
268+ uses : ./.github/actions/install-linux-sgx
269+ with :
270+ os : ${{ matrix.os }}
310271
311272 - name : install for wabt compilation
312273 run : sudo apt update && sudo apt install -y ninja-build
0 commit comments