Skip to content

Commit 98a2fb9

Browse files
author
Alex J Lennon
committed
fix(ci): clippy is_multiple_of, Zephyr SDK for native_sim E2E, artifact upload resilience
- backend_reply: use is_multiple_of(2) for Clippy on stable/beta CI - zephyr-e2e: cache + extract Zephyr SDK 0.17.4, set ZEPHYR_SDK_INSTALL_DIR - ci: continue-on-error on binary artifact upload (transient GitHub 403) Made-with: Cursor
1 parent 272014e commit 98a2fb9

3 files changed

Lines changed: 23 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ jobs:
145145
run: cargo build --release --verbose
146146

147147
- name: Upload artifacts
148+
continue-on-error: true
148149
uses: actions/upload-artifact@v4
149150
with:
150151
name: rsgdb-${{ matrix.os }}

.github/workflows/zephyr-e2e.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ jobs:
3434
name: native_sim (gdbserver → rsgdb → gdb)
3535
runs-on: ubuntu-latest
3636
timeout-minutes: 90
37+
env:
38+
# Required by Zephyr CMake (host tools + toolchain metadata); matches Zephyr 4.x expectations.
39+
ZEPHYR_SDK_INSTALL_DIR: /home/runner/zephyr-sdk-0.17.4
3740
steps:
3841
- uses: actions/checkout@v4
3942

@@ -62,6 +65,23 @@ jobs:
6265
6366
- uses: dtolnay/rust-toolchain@stable
6467

68+
- name: Cache Zephyr SDK
69+
id: zephyr-sdk-cache
70+
uses: actions/cache@v4
71+
with:
72+
path: /home/runner/zephyr-sdk-0.17.4
73+
key: zephyr-sdk-0.17.4-linux-x64-v1
74+
75+
- name: Install Zephyr SDK
76+
if: steps.zephyr-sdk-cache.outputs.cache-hit != 'true'
77+
run: |
78+
set -euo pipefail
79+
cd /tmp
80+
wget -qO zephyr-sdk.tar.xz \
81+
https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v0.17.4/zephyr-sdk-0.17.4_linux-x86_64.tar.xz
82+
tar xf zephyr-sdk.tar.xz -C /home/runner
83+
# CMake finds Zephyr-sdk via ZEPHYR_SDK_INSTALL_DIR (see Zephyr SDK install docs).
84+
6585
- name: Cache Zephyr west workspace
6686
uses: actions/cache@v4
6787
id: zephyr-cache

src/rtos/backend_reply.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ pub fn summarize_backend_thread_payload(data: &[u8]) -> Option<String> {
2929
}
3030

3131
// qThreadExtraInfo reply: hex-encoded UTF-8 name (ASCII hex digits only).
32-
if data.len() >= 2 && data.len() % 2 == 0 && data.iter().all(|b| b.is_ascii_hexdigit()) {
32+
if data.len() >= 2 && data.len().is_multiple_of(2) && data.iter().all(|b| b.is_ascii_hexdigit())
33+
{
3334
if let Ok(bytes) = hex::decode(data) {
3435
if let Ok(text) = String::from_utf8(bytes) {
3536
if text.len() <= 512 {

0 commit comments

Comments
 (0)