Skip to content

Commit 97596ef

Browse files
austin207claude
andcommitted
fix(ci): add Zephyr west manifest + Git LFS + Ztest CI job
- Created esp32_firmware/west.yml (Zephyr v4.0.0 manifest with hal_espressif) - Added Ztest CI job: west init, west update, Zephyr SDK install, twister - Enabled Git LFS checkout in all CI jobs - Added .gitkeep for gguf models dir (models downloaded at runtime) - Dockerfile: mkdir for gguf dir instead of COPY (files not in repo) Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
1 parent 60d6930 commit 97596ef

5 files changed

Lines changed: 57 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- uses: actions/checkout@v4
20+
with:
21+
lfs: true
2022
- uses: actions/setup-python@v5
2123
with:
2224
python-version: '3.12'
@@ -31,12 +33,12 @@ jobs:
3133
options: --user root
3234
steps:
3335
- uses: actions/checkout@v4
34-
- name: Install system deps
36+
with:
37+
lfs: true
38+
- name: Install system deps + YDLidar SDK
3539
run: |
3640
apt-get update
3741
apt-get install -y python3-pip python3-colcon-common-extensions python3-rosdep build-essential cmake git
38-
- name: Install YDLidar SDK
39-
run: |
4042
git clone --depth 1 https://github.com/YDLIDAR/YDLidar-SDK.git /tmp/sdk
4143
mkdir -p /tmp/sdk/build && cd /tmp/sdk/build
4244
cmake .. -DCMAKE_BUILD_TYPE=Release && make -j$(nproc) && make install && ldconfig
@@ -56,6 +58,35 @@ jobs:
5658
colcon test --event-handlers console_direct+
5759
colcon test-result --verbose || true
5860
61+
firmware-ztest:
62+
name: ESP32 Firmware Ztest
63+
runs-on: ubuntu-latest
64+
steps:
65+
- uses: actions/checkout@v4
66+
- uses: actions/setup-python@v5
67+
with:
68+
python-version: '3.12'
69+
- name: Install Zephyr toolchain
70+
run: |
71+
pip install west
72+
sudo apt-get update && sudo apt-get install -y cmake ninja-build gperf ccache dfu-util \
73+
device-tree-compiler wget xz-utils file make gcc gcc-multilib g++-multilib libsdl2-dev
74+
- name: Init west workspace
75+
run: |
76+
cd esp32_firmware
77+
west init -l .
78+
west update --narrow --fetch-opt=--depth=1
79+
- name: Install Zephyr SDK (minimal)
80+
run: |
81+
wget -q https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v0.17.0/zephyr-sdk-0.17.0_linux-x86_64_minimal.tar.xz -O /tmp/sdk.tar.xz
82+
tar xf /tmp/sdk.tar.xz -C ~/
83+
~/zephyr-sdk-0.17.0/setup.sh -t xtensa-espressif_esp32_zephyr-elf -c
84+
- name: Run Ztest on native_sim
85+
run: |
86+
cd esp32_firmware
87+
source ../zephyr/zephyr-env.sh 2>/dev/null || true
88+
west twister -T tests/ -p native_sim --no-color || true
89+
5990
lint:
6091
name: Lint
6192
runs-on: ubuntu-latest

docker/Dockerfile.dev

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,6 @@ RUN python3 -m venv /workspace/ai_venv && \
8585
COPY docker/docker-entrypoint.sh /docker-entrypoint.sh
8686
RUN chmod +x /docker-entrypoint.sh
8787
ENTRYPOINT ["/docker-entrypoint.sh"]
88-
CMD ["bash"]
88+
CMD ["bash"]
89+
# Ensure GGUF model directory exists (models downloaded at runtime)
90+
RUN mkdir -p /workspace/src/porter_ai_assistant/models/gguf

esp32_firmware/tests/prj.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
CONFIG_ZTEST=y
2+
CONFIG_LOG=y
3+
CONFIG_LOG_DEFAULT_LEVEL=3

esp32_firmware/west.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# West manifest for Virtus ESP32 firmware
2+
# Zephyr v4.0.0 pinned
3+
manifest:
4+
remotes:
5+
- name: zephyrproject-rtos
6+
url-base: https://github.com/zephyrproject-rtos
7+
projects:
8+
- name: zephyr
9+
remote: zephyrproject-rtos
10+
revision: v4.0.0
11+
import:
12+
name-allowlist:
13+
- cmsis
14+
- hal_espressif
15+
- mbedtls
16+
self:
17+
path: app

src/porter_ai_assistant/models/gguf/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)