diff --git a/.devcontainer/linux/Dockerfile b/.devcontainer/linux/Dockerfile index 6fb29f14..e154758f 100644 --- a/.devcontainer/linux/Dockerfile +++ b/.devcontainer/linux/Dockerfile @@ -42,10 +42,17 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && apt-get clean -y\ && update-alternatives --install /usr/bin/python python /usr/bin/python3 50 -# Install wasi-sdk -RUN mkdir /opt/wasi-sdk && \ - curl -sSL https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-$WASI_SDK_VERSION/wasi-sdk-$WASI_SDK_VERSION.0-$(uname -m | sed s/aarch64/arm64/)-linux.tar.gz | \ - tar zxvf - --strip-components=1 -C /opt/wasi-sdk +# Install wasi-sdk (pre-built binaries available for x86_64 and arm64 only) +RUN ARCH=$(uname -m); \ + if [ "$ARCH" = "aarch64" ]; then ARCH=arm64; fi; \ + if [ "$ARCH" = "x86_64" ] || [ "$ARCH" = "arm64" ]; then \ + mkdir /opt/wasi-sdk && \ + curl -sSL https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-$WASI_SDK_VERSION/wasi-sdk-$WASI_SDK_VERSION.0-${ARCH}-linux.tar.gz | \ + tar zxvf - --strip-components=1 -C /opt/wasi-sdk; \ + else \ + mkdir -p /opt/wasi-sdk; \ + echo "WASI-SDK not available for $(uname -m), skipping (use -DOCRE_BUILD_DEMO_CONTAINERS=OFF)"; \ + fi FROM ocre-ci AS ocre-dev diff --git a/.devcontainer/zephyr/Dockerfile b/.devcontainer/zephyr/Dockerfile index 57c48bb7..0fb4930a 100644 --- a/.devcontainer/zephyr/Dockerfile +++ b/.devcontainer/zephyr/Dockerfile @@ -51,10 +51,17 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && apt-get clean -y\ && update-alternatives --install /usr/bin/python python /usr/bin/python3 50 -# Install wasi-sdk -RUN mkdir /opt/wasi-sdk && \ - curl -sSL https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-$WASI_SDK_VERSION/wasi-sdk-$WASI_SDK_VERSION.0-$(uname -m | sed s/aarch64/arm64/)-linux.tar.gz | \ - tar zxvf - --strip-components=1 -C /opt/wasi-sdk +# Install wasi-sdk (pre-built binaries available for x86_64 and arm64 only) +RUN ARCH=$(uname -m); \ + if [ "$ARCH" = "aarch64" ]; then ARCH=arm64; fi; \ + if [ "$ARCH" = "x86_64" ] || [ "$ARCH" = "arm64" ]; then \ + mkdir /opt/wasi-sdk && \ + curl -sSL https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-$WASI_SDK_VERSION/wasi-sdk-$WASI_SDK_VERSION.0-${ARCH}-linux.tar.gz | \ + tar zxvf - --strip-components=1 -C /opt/wasi-sdk; \ + else \ + mkdir -p /opt/wasi-sdk; \ + echo "WASI-SDK not available for $(uname -m), skipping (use -DOCRE_BUILD_DEMO_CONTAINERS=OFF)"; \ + fi RUN python -m venv /opt/zephyr-venv && \ . /opt/zephyr-venv/bin/activate && \ @@ -78,7 +85,8 @@ RUN . /opt/zephyr-venv/bin/activate && \ west sdk install --install-base /opt -t \ x86_64-zephyr-elf \ aarch64-zephyr-elf \ - arm-zephyr-eabi + arm-zephyr-eabi \ + riscv64-zephyr-elf FROM base AS ocre-ci diff --git a/.github/workflows/zephyr.yml b/.github/workflows/zephyr.yml index 1e89ff68..3a2f7cfb 100644 --- a/.github/workflows/zephyr.yml +++ b/.github/workflows/zephyr.yml @@ -27,6 +27,7 @@ jobs: - pico_plus2/rp2350b/m33 - native_sim/native/64 - b_u585i_iot02a + - qemu_riscv64 app: - mini - demo