Skip to content

Commit 5cead96

Browse files
authored
Merge branch main into dev/zephyr_file_socket (#4531)
1 parent b8e8230 commit 5cead96

File tree

148 files changed

+6788
-1771
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

148 files changed

+6788
-1771
lines changed

.github/scripts/run_qemu_arc.sh

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#!/bin/bash
2+
3+
# THIS SCRIPT IS USED TO RUN QEMU ARC EMULATOR DIRECTLY ON CI ONLY.
4+
# USUALLY, you SHOULD NOT RUN IT ON YOUR LOCAL MACHINE.
5+
# INSTEAD, YOU SHOULD USE `west build -t run` COMMAND.
6+
7+
# Two arguments. first is the path to the zephyr-sdk, second is the path to the zephyr elf.
8+
if [ "$#" -ne 2 ]; then
9+
echo "Usage: $0 <path_to_zephyr_sdk> <path_to_zephyr_elf>"
10+
exit 1
11+
fi
12+
13+
ZEPHYR_SDK_PATH=$1
14+
ZEPHYR_ELF_PATH=$2
15+
16+
if [ ! -d "$ZEPHYR_SDK_PATH" ]; then
17+
echo "Error: Zephyr SDK path does not exist: $ZEPHYR_SDK_PATH"
18+
exit 1
19+
fi
20+
if [ ! -f "$ZEPHYR_ELF_PATH" ]; then
21+
echo "Error: Zephyr ELF file does not exist: $ZEPHYR_ELF_PATH"
22+
exit 1
23+
fi
24+
25+
# this command is copied from the content of build.ninja which is generated by west build.
26+
# please do not modify it unless synchronizing with the build.ninja file.
27+
$ZEPHYR_SDK_PATH/sysroots/x86_64-pokysdk-linux/usr/bin/qemu-system-arc \
28+
-cpu arcem -m 8M \
29+
-nographic -no-reboot -monitor none \
30+
-global cpu.firq=false \
31+
-global cpu.num-irqlevels=15 \
32+
-global cpu.num-irq=25 \
33+
-global cpu.ext-irq=20 \
34+
-global cpu.freq_hz=10000000 \
35+
-global cpu.timer0=true \
36+
-global cpu.timer1=true \
37+
-global cpu.has-mpu=true \
38+
-global cpu.mpu-numreg=16 \
39+
-net none \
40+
-pidfile qemu.pid \
41+
-chardev stdio,id=con,mux=on \
42+
-serial chardev:con \
43+
-mon chardev=con,mode=readline \
44+
-icount shift=6,align=off,sleep=off \
45+
-rtc clock=vm \
46+
-kernel $ZEPHYR_ELF_PATH

.github/workflows/build_iwasm_release.yml

Lines changed: 78 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ on:
2323
type: string
2424
required: true
2525
upload_url:
26-
description: a semantic version number. it is required when `release` is true.
26+
description: upload binary assets to the URL of release
2727
type: string
2828
required: false
2929
ver_num:
@@ -32,60 +32,60 @@ on:
3232
required: false
3333

3434
env:
35-
DEFAULT_BUILD_OPTIONS:
35+
DEFAULT_BUILD_OPTIONS:
3636
"-DWAMR_BUILD_AOT=1 -DWAMR_BUILD_INTERP=1 -DWAMR_BUILD_FAST_JIT=1 -DWAMR_BUILD_JIT=1 \
37-
-DWAMR_BUILD_CUSTOM_NAME_SECTION=0 \
38-
-DWAMR_BUILD_DEBUG_INTERP=0 \
39-
-DWAMR_BUILD_DEBUG_AOT=0 \
40-
-DWAMR_BUILD_DUMP_CALL_STACK=0 \
41-
-DWAMR_BUILD_LIBC_UVWASI=0 \
42-
-DWAMR_BUILD_LIBC_EMCC=0 \
43-
-DWAMR_BUILD_LIB_RATS=0 \
44-
-DWAMR_BUILD_LOAD_CUSTOM_SECTION=0 \
45-
-DWAMR_BUILD_MEMORY_PROFILING=0 \
46-
-DWAMR_BUILD_MINI_LOADER=0 \
47-
-DWAMR_BUILD_MULTI_MODULE=0 \
48-
-DWAMR_BUILD_PERF_PROFILING=0 \
49-
-DWAMR_BUILD_SPEC_TEST=0 \
50-
-DWAMR_BUILD_BULK_MEMORY=1 \
51-
-DWAMR_BUILD_LIB_PTHREAD=1 \
52-
-DWAMR_BUILD_LIB_PTHREAD_SEMAPHORE=1 \
53-
-DWAMR_BUILD_LIB_WASI_THREADS=1 \
54-
-DWAMR_BUILD_LIBC_BUILTIN=1 \
55-
-DWAMR_BUILD_LIBC_WASI=1 \
56-
-DWAMR_BUILD_REF_TYPES=1 \
57-
-DWAMR_BUILD_SIMD=1 \
58-
-DWAMR_BUILD_SHARED_MEMORY=1 \
59-
-DWAMR_BUILD_TAIL_CALL=1 \
60-
-DWAMR_BUILD_THREAD_MGR=1"
37+
-DWAMR_BUILD_CUSTOM_NAME_SECTION=0 \
38+
-DWAMR_BUILD_DEBUG_INTERP=0 \
39+
-DWAMR_BUILD_DEBUG_AOT=0 \
40+
-DWAMR_BUILD_DUMP_CALL_STACK=0 \
41+
-DWAMR_BUILD_LIBC_UVWASI=0 \
42+
-DWAMR_BUILD_LIBC_EMCC=0 \
43+
-DWAMR_BUILD_LIB_RATS=0 \
44+
-DWAMR_BUILD_LOAD_CUSTOM_SECTION=0 \
45+
-DWAMR_BUILD_MEMORY_PROFILING=0 \
46+
-DWAMR_BUILD_MINI_LOADER=0 \
47+
-DWAMR_BUILD_MULTI_MODULE=0 \
48+
-DWAMR_BUILD_PERF_PROFILING=0 \
49+
-DWAMR_BUILD_SPEC_TEST=0 \
50+
-DWAMR_BUILD_BULK_MEMORY=1 \
51+
-DWAMR_BUILD_LIB_PTHREAD=1 \
52+
-DWAMR_BUILD_LIB_PTHREAD_SEMAPHORE=1 \
53+
-DWAMR_BUILD_LIB_WASI_THREADS=1 \
54+
-DWAMR_BUILD_LIBC_BUILTIN=1 \
55+
-DWAMR_BUILD_LIBC_WASI=1 \
56+
-DWAMR_BUILD_REF_TYPES=1 \
57+
-DWAMR_BUILD_SIMD=1 \
58+
-DWAMR_BUILD_SHARED_MEMORY=1 \
59+
-DWAMR_BUILD_TAIL_CALL=1 \
60+
-DWAMR_BUILD_THREAD_MGR=1"
6161
GC_EH_BUILD_OPTIONS:
6262
"-DWAMR_BUILD_AOT=1 -DWAMR_BUILD_INTERP=1 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_FAST_JIT=0 -DWAMR_BUILD_JIT=0 \
63-
-DWAMR_BUILD_CUSTOM_NAME_SECTION=0 \
64-
-DWAMR_BUILD_DEBUG_INTERP=0 \
65-
-DWAMR_BUILD_DEBUG_AOT=0 \
66-
-DWAMR_BUILD_DUMP_CALL_STACK=0 \
67-
-DWAMR_BUILD_LIBC_UVWASI=0 \
68-
-DWAMR_BUILD_LIBC_EMCC=0 \
69-
-DWAMR_BUILD_LIB_RATS=0 \
70-
-DWAMR_BUILD_LOAD_CUSTOM_SECTION=0 \
71-
-DWAMR_BUILD_MEMORY_PROFILING=0 \
72-
-DWAMR_BUILD_MINI_LOADER=0 \
73-
-DWAMR_BUILD_MULTI_MODULE=0 \
74-
-DWAMR_BUILD_PERF_PROFILING=0 \
75-
-DWAMR_BUILD_SPEC_TEST=0 \
76-
-DWAMR_BUILD_BULK_MEMORY=1 \
77-
-DWAMR_BUILD_LIB_PTHREAD=1 \
78-
-DWAMR_BUILD_LIB_PTHREAD_SEMAPHORE=1 \
79-
-DWAMR_BUILD_LIB_WASI_THREADS=1 \
80-
-DWAMR_BUILD_LIBC_BUILTIN=1 \
81-
-DWAMR_BUILD_LIBC_WASI=1 \
82-
-DWAMR_BUILD_REF_TYPES=1 \
83-
-DWAMR_BUILD_SIMD=1 \
84-
-DWAMR_BUILD_SHARED_MEMORY=1 \
85-
-DWAMR_BUILD_TAIL_CALL=1 \
86-
-DWAMR_BUILD_THREAD_MGR=1 \
87-
-DWAMR_BUILD_EXCE_HANDLING=1 \
88-
-DWAMR_BUILD_GC=1"
63+
-DWAMR_BUILD_CUSTOM_NAME_SECTION=0 \
64+
-DWAMR_BUILD_DEBUG_INTERP=0 \
65+
-DWAMR_BUILD_DEBUG_AOT=0 \
66+
-DWAMR_BUILD_DUMP_CALL_STACK=0 \
67+
-DWAMR_BUILD_LIBC_UVWASI=0 \
68+
-DWAMR_BUILD_LIBC_EMCC=0 \
69+
-DWAMR_BUILD_LIB_RATS=0 \
70+
-DWAMR_BUILD_LOAD_CUSTOM_SECTION=0 \
71+
-DWAMR_BUILD_MEMORY_PROFILING=0 \
72+
-DWAMR_BUILD_MINI_LOADER=0 \
73+
-DWAMR_BUILD_MULTI_MODULE=0 \
74+
-DWAMR_BUILD_PERF_PROFILING=0 \
75+
-DWAMR_BUILD_SPEC_TEST=0 \
76+
-DWAMR_BUILD_BULK_MEMORY=1 \
77+
-DWAMR_BUILD_LIB_PTHREAD=1 \
78+
-DWAMR_BUILD_LIB_PTHREAD_SEMAPHORE=1 \
79+
-DWAMR_BUILD_LIB_WASI_THREADS=1 \
80+
-DWAMR_BUILD_LIBC_BUILTIN=1 \
81+
-DWAMR_BUILD_LIBC_WASI=1 \
82+
-DWAMR_BUILD_REF_TYPES=1 \
83+
-DWAMR_BUILD_SIMD=1 \
84+
-DWAMR_BUILD_SHARED_MEMORY=1 \
85+
-DWAMR_BUILD_TAIL_CALL=1 \
86+
-DWAMR_BUILD_THREAD_MGR=1 \
87+
-DWAMR_BUILD_EXCE_HANDLING=1 \
88+
-DWAMR_BUILD_GC=1"
8989

9090
permissions:
9191
contents: read
@@ -97,9 +97,9 @@ jobs:
9797
matrix:
9898
include:
9999
- build_options: $DEFAULT_BUILD_OPTIONS
100-
suffix: ''
100+
suffix: ""
101101
- build_options: $GC_EH_BUILD_OPTIONS
102-
suffix: '-gc-eh'
102+
suffix: "-gc-eh"
103103
permissions:
104104
contents: write # for uploading release artifacts
105105

@@ -126,6 +126,30 @@ jobs:
126126
cmake --build build --config Release --parallel 4
127127
working-directory: ${{ inputs.cwd }}
128128

129+
- name: smoke test on non-Windows
130+
if: ${{ !startsWith(inputs.runner, 'windows') }}
131+
shell: bash
132+
run: |
133+
if [[ ! -f build/iwasm ]]; then
134+
echo "iwasm binary is not found in the expected location."
135+
exit 1
136+
fi
137+
138+
build/iwasm --version
139+
working-directory: ${{ inputs.cwd }}
140+
141+
- name: smoke test on Windows
142+
if: ${{ startsWith(inputs.runner, 'windows') }}
143+
shell: bash
144+
run: |
145+
if [[ ! -f build/Release/iwasm ]]; then
146+
echo "iwasm binary is not found in the expected location."
147+
exit 1
148+
fi
149+
150+
build/Release/iwasm --version
151+
working-directory: ${{ inputs.cwd }}
152+
129153
- name: Compress the binary on Windows
130154
if: inputs.runner == 'windows-latest'
131155
run: |
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Copyright (C) 2019 Intel Corporation. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
3+
4+
name: build wamr_wasi_extensions release
5+
6+
on:
7+
workflow_call:
8+
inputs:
9+
upload_url:
10+
description: upload binary assets to the URL of release
11+
type: string
12+
required: false
13+
ver_num:
14+
description: a semantic version number. it is required when `release` is true.
15+
type: string
16+
required: false
17+
18+
permissions:
19+
contents: read
20+
21+
jobs:
22+
build_wamr_wasi_extensions:
23+
runs-on: ${{ matrix.os }}
24+
permissions:
25+
contents: write # for uploading release artifacts
26+
strategy:
27+
matrix:
28+
os: [ubuntu-22.04]
29+
steps:
30+
- name: checkout
31+
uses: actions/checkout@v4
32+
33+
- name: install-wasi-sdk-wabt
34+
uses: ./.github/actions/install-wasi-sdk-wabt
35+
with:
36+
os: ${{ matrix.os }}
37+
38+
- name: Build wamr-wasi-extensions
39+
run: |
40+
mkdir dist
41+
./build_libs.sh $(pwd)/dist/wamr-wasi-extensions
42+
working-directory: wamr-wasi-extensions
43+
44+
- name: Compress the binary
45+
run: |
46+
zip -r wamr-wasi-extensions-${{ inputs.ver_num }}.zip wamr-wasi-extensions
47+
working-directory: wamr-wasi-extensions/dist
48+
49+
- name: Upload release zip
50+
uses: actions/upload-release-asset@v1
51+
env:
52+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53+
with:
54+
upload_url: ${{ inputs.upload_url }}
55+
asset_path: wamr-wasi-extensions/dist/wamr-wasi-extensions-${{ inputs.ver_num }}.zip
56+
asset_name: wamr-wasi-extensions-${{ inputs.ver_num }}.zip
57+
asset_content_type: application/zip

.github/workflows/build_wamrc.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ on:
2323
type: string
2424
required: true
2525
upload_url:
26-
description: a semantic version number. it is required when `release` is true.
26+
description: upload binary assets to the URL of release
2727
type: string
2828
required: false
2929
ver_num:
@@ -62,6 +62,30 @@ jobs:
6262
cmake --build build --config Release --parallel 4
6363
working-directory: wamr-compiler
6464

65+
- name: smoke test on non-windows
66+
if: ${{ !startsWith(inputs.runner, 'windows') }}
67+
shell: bash
68+
run: |
69+
if [[ ! -f build/wamrc ]]; then
70+
echo "wamrc binary is not found in the expected location."
71+
exit 1
72+
fi
73+
74+
build/wamrc --version
75+
working-directory: wamr-compiler
76+
77+
- name: smoke test on Windows
78+
if: ${{ startsWith(inputs.runner, 'windows') }}
79+
shell: bash
80+
run: |
81+
if [[ ! -f build/Release/wamrc ]]; then
82+
echo "wamrc binary is not found in the expected location."
83+
exit 1
84+
fi
85+
86+
build/Release/wamrc --version
87+
working-directory: wamr-compiler
88+
6589
- name: Compress the binary on Windows
6690
if: inputs.runner == 'windows-latest' && inputs.release
6791
run: |

.github/workflows/codeql.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353

5454
# Initializes the CodeQL tools for scanning.
5555
- name: Initialize CodeQL
56-
uses: github/codeql-action/[email protected].0
56+
uses: github/codeql-action/[email protected].4
5757
with:
5858
languages: ${{ matrix.language }}
5959

@@ -70,7 +70,7 @@ jobs:
7070
- run: |
7171
./.github/scripts/codeql_buildscript.sh
7272
- name: Perform CodeQL Analysis
73-
uses: github/codeql-action/[email protected].0
73+
uses: github/codeql-action/[email protected].4
7474
with:
7575
category: "/language:${{matrix.language}}"
7676
upload: false
@@ -99,7 +99,7 @@ jobs:
9999
output: ${{ steps.step1.outputs.sarif-output }}/cpp.sarif
100100

101101
- name: Upload CodeQL results to code scanning
102-
uses: github/codeql-action/[email protected].0
102+
uses: github/codeql-action/[email protected].4
103103
with:
104104
sarif_file: ${{ steps.step1.outputs.sarif-output }}
105105
category: "/language:${{matrix.language}}"

0 commit comments

Comments
 (0)