@@ -56,95 +56,115 @@ permissions:
5656
5757jobs :
5858 smoke_test :
59- runs-on : ubuntu-latest
59+ runs-on : ubuntu-22.04
60+ container :
61+ # For Zephyr 3.7 LTS, use the v0.26-branch or the latest v0.26.x release Docker image.
62+ image : ghcr.io/zephyrproject-rtos/ci:v0.26-branch
63+ options : --user root
64+
6065 steps :
66+ # https://docs.zephyrproject.org/latest/develop/application/index.html#zephyr-workspace-application
67+ # zephyrproject/
68+ # ├─── .west/
69+ # │ └─── config
70+ # ├─── zephyr/
71+ # ├─── bootloader/
72+ # ├─── modules/
73+ # ├─── tools/
74+ # ├─── vendor/
75+ # │ └─── wasm-micro-runtime/
76+ # └─── applications/
77+ # └─── smoke-test/
78+
6179 - name : Checkout code
6280 uses : actions/checkout@v3
81+ with :
82+ path : vendor
6383
64- - name : Install dependencies for Zephyr
84+ - name : DBG#2
6585 shell : bash
6686 run : |
67- sudo apt-get update
68- sudo apt-get install -y --no-install-recommends git cmake ninja-build gperf \
69- ccache dfu-util device-tree-compiler wget \
70- python3-dev python3-pip python3-setuptools python3-tk python3-wheel xz-utils file \
71- make gcc gcc-multilib g++-multilib libsdl2-dev libmagic1
72- sudo apt-get clean -y
73-
74- - name : Download Zephyr SDK
87+ pwd
88+ ls -l .
89+ ls -l vendor
90+ ls -l applications
91+
92+ # - name: Generate a minimum Zephyr project
93+ # shell: bash
94+ # run: |
95+ # mkdir -p applications/smoke-test
96+ # cp vendor/wasm-micro-runtime/product-mini/platforms/zephyr/simple/west_lite.yml applications/smoke-test/west_lite.yml
97+
98+ - name : Setup Zephyr project
99+ uses : zephyrproject-rtos/action-zephyr-setup@v1
100+ with :
101+ app-path : applications/smoke-test
102+ # manifest-file-name: west_lite.yml
103+ sdk-version : ${{ env.ZEPHYR_SDK_VERSION }}
104+ toolchains : arc-zephyr-elf:arc64-zephyr-elf
105+
106+ - name : DBG#1
75107 shell : bash
76108 run : |
77- cd /opt
78- sudo wget --progress=dot:giga https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v${{ env.ZEPHYR_SDK_VERSION }}/zephyr-sdk-${{ env.ZEPHYR_SDK_VERSION }}_linux-x86_64.tar.xz
79- sudo wget --progress=dot:giga -O - https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v${{ env.ZEPHYR_SDK_VERSION }}/sha256.sum | shasum --check --ignore-missing
80- sudo tar xf zephyr-sdk-${{ env.ZEPHYR_SDK_VERSION }}_linux-x86_64.tar.xz
81- working-directory : /opt
82-
83- - name : Install Zephyr SDK. host tools and Zephyr SDK CMake package
84- shell : bash
85- run : |
86- sudo ./setup.sh -h -c
87- working-directory : /opt/zephyr-sdk-${{ env.ZEPHYR_SDK_VERSION }}
88-
89- - name : Setup Zephyr
90- shell : bash
91- run : |
92- pip3 install west
93-
94- - name : Generate a minimum Zephyr project
95- shell : bash
96- run : |
97- mkdir -p ./zephyrproject/modules/zephyr
98- mkdir -p ./zephyrproject/smoke-test
99- cp product-mini/platforms/zephyr/simple/west_lite.yml ./zephyrproject/smoke-test/west.yml
100-
101- - name : Initialize west
102- shell : bash
103- run : |
104- west init -l .
105- working-directory : ./zephyrproject/smoke-test
106-
107- - name : Update west to fetch the Zephyr project
108- shell : bash
109- run : west update --stats
110- working-directory : ./zephyrproject
111-
112- - name : Export Zephyr environment
113- shell : bash
114- run : |
115- west zephyr-export
116- pip3 install -r ./scripts/requirements.txt
117- working-directory : ./zephyrproject/modules/zephyr
118-
119- - name : Set Environment Variables
120- shell : bash
121- run : |
122- echo "ZEPHYR_BASE=$(realpath ./zephyrproject/modules/zephyr)" >> $GITHUB_ENV
123-
124- - name : Build a sample application(simple)
125- run : |
126- pushd product-mini/platforms/zephyr/simple
127- west build . -b qemu_arc/qemu_arc_hs -p always -- -DWAMR_BUILD_TARGET=ARC
128- popd
129-
130- # west build -t run will fork several processes, which will cause the job to hang.
131- # run in the background and kill it after 5 seconds
132- .github/scripts/run_qemu_arc.sh \
133- /opt/zephyr-sdk-${{ env.ZEPHYR_SDK_VERSION }} \
134- product-mini/platforms/zephyr/simple/build/zephyr/zephyr.elf &
135- sleep 5
136- pkill qemu-system-arc
137-
138- - name : Build a sample application(user-mode)
139- run : |
140- pushd product-mini/platforms/zephyr/user-mode
141- west build . -b qemu_arc/qemu_arc_hs -p always -- -DWAMR_BUILD_TARGET=ARC
142- popd
143-
144- # west build -t run will fork several processes, which will cause the job to hang.
145- # run in the background and kill it after 5 seconds
146- .github/scripts/run_qemu_arc.sh \
147- /opt/zephyr-sdk-${{ env.ZEPHYR_SDK_VERSION }} \
148- product-mini/platforms/zephyr/user-mode/build/zephyr/zephyr.elf &
149- sleep 5
150- pkill qemu-system-arc
109+ pwd
110+ ls -l .
111+ ls -l applications
112+ ls -l applications/wasm-micro-runtime
113+
114+ # - name: Generate a minimum Zephyr project
115+ # shell: bash
116+ # run: |
117+ # mkdir -p ./zephyrproject/modules/zephyr
118+ # mkdir -p ./zephyrproject/smoke-test
119+ # cp product-mini/platforms/zephyr/simple/west_lite.yml ./zephyrproject/smoke-test/west.yml
120+
121+ # - name: Initialize west
122+ # shell: bash
123+ # run: |
124+ # west init -l .
125+ # working-directory: ./zephyrproject/smoke-test
126+
127+ # - name: Update west to fetch the Zephyr project
128+ # shell: bash
129+ # run: west update --stats
130+ # working-directory: ./zephyrproject
131+
132+ # - name: Export Zephyr environment
133+ # shell: bash
134+ # run: |
135+ # west zephyr-export
136+ # pip3 install -r ./scripts/requirements.txt
137+ # working-directory: ./zephyrproject/modules/zephyr
138+
139+ # - name: Set Environment Variables
140+ # shell: bash
141+ # run: |
142+ # echo "ZEPHYR_BASE=$(realpath ./zephyrproject/modules/zephyr)" >> $GITHUB_ENV
143+
144+ # - name: Build a sample application(simple)
145+ # run: |
146+ # pushd product-mini/platforms/zephyr/simple
147+ # west build . -b qemu_arc/qemu_arc_hs -p always -- -DWAMR_BUILD_TARGET=ARC
148+ # popd
149+
150+ # # west build -t run will fork several processes, which will cause the job to hang.
151+ # # run in the background and kill it after 5 seconds
152+ # .github/scripts/run_qemu_arc.sh \
153+ # /opt/zephyr-sdk-${{ env.ZEPHYR_SDK_VERSION }} \
154+ # product-mini/platforms/zephyr/simple/build/zephyr/zephyr.elf &
155+ # sleep 5
156+ # pkill qemu-system-arc
157+
158+ # - name: Build a sample application(user-mode)
159+ # run: |
160+ # pushd product-mini/platforms/zephyr/user-mode
161+ # west build . -b qemu_arc/qemu_arc_hs -p always -- -DWAMR_BUILD_TARGET=ARC
162+ # popd
163+
164+ # # west build -t run will fork several processes, which will cause the job to hang.
165+ # # run in the background and kill it after 5 seconds
166+ # .github/scripts/run_qemu_arc.sh \
167+ # /opt/zephyr-sdk-${{ env.ZEPHYR_SDK_VERSION }} \
168+ # product-mini/platforms/zephyr/user-mode/build/zephyr/zephyr.elf &
169+ # sleep 5
170+ # pkill qemu-system-arc
0 commit comments