diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5ae84579..a646dc57 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -118,8 +118,10 @@ jobs: path: nxp/nxp-twrkv58f220m-lwip-freertos - name: infineon-xmc4700_4800-lwip-rtx-rtos path: infineon/infineon-xmc4700_4800-lwip-rtx-rtos + - name: zephyr + path: zephyr name: ${{ matrix.example.name }} steps: - uses: actions/checkout@v3 - name: ${{ matrix.example.name }} - run: make -C examples/${{ matrix.example.path }} build + run: make -C examples/${{ matrix.example.path }} build \ No newline at end of file diff --git a/examples/zephyr/.zephyr_install.sh b/examples/zephyr/.zephyr_install.sh new file mode 100644 index 00000000..36d90e13 --- /dev/null +++ b/examples/zephyr/.zephyr_install.sh @@ -0,0 +1,26 @@ +# See https://docs.zephyrproject.org/latest/develop/getting_started/index.html +# for script details + +ZEPHYR_SDK_VER=0.14.0 + +cd ~ +sudo apt install -y wget +rm -rf kitware-archive.sh +wget https://apt.kitware.com/kitware-archive.sh +sudo bash kitware-archive.sh +sudo apt install --no-install-recommends -y git cmake ninja-build gperf ccache dfu-util device-tree-compiler wget python3-dev python3-pip python3-setuptools python3-tk python3-wheel xz-utils file make gcc gcc-multilib g++-multilib libsdl2-dev +pip3 install --user -U west +export PATH=~/.local/bin:"$PATH" +rm -rf ~/zephyrproject +west init ~/zephyrproject +cd ~/zephyrproject +west update +west zephyr-export +pip3 install --user -r ~/zephyrproject/zephyr/scripts/requirements.txt +cd ~ +rm -rf zephyr-sdk-${ZEPHYR_SDK_VER}_linux-x86_64.tar.gz +echo Downloading zephyr-sdk-${ZEPHYR_SDK_VER} +wget -q https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v${ZEPHYR_SDK_VER}/zephyr-sdk-${ZEPHYR_SDK_VER}_linux-x86_64.tar.gz +tar xf zephyr-sdk-${ZEPHYR_SDK_VER}_linux-x86_64.tar.gz +cd zephyr-sdk-${ZEPHYR_SDK_VER} +./setup.sh -c diff --git a/examples/zephyr/Makefile b/examples/zephyr/Makefile index 07b4c689..7942a544 100644 --- a/examples/zephyr/Makefile +++ b/examples/zephyr/Makefile @@ -2,7 +2,11 @@ example: true build: - echo "Add Zephyr installation and call sub-makefiles to build examples" + sh .zephyr_install.sh + make -C http-client build + make -C http-server build + make -C mqtt-aws-client build + make -C websocket-server build clean: rm -rf */*/mongoose.* diff --git a/examples/zephyr/http-client/Makefile b/examples/zephyr/http-client/Makefile index 1e56e8c0..6b3e6bdc 100644 --- a/examples/zephyr/http-client/Makefile +++ b/examples/zephyr/http-client/Makefile @@ -1,5 +1,5 @@ CWD = $(realpath $(CURDIR)) -ZEPHYR_DIR ?= $(realpath ../../../../zephyrproject) +ZEPHYR_DIR ?= $(realpath ../../../../../../zephyrproject) BOARD ?= nucleo_h743zi example: diff --git a/examples/zephyr/http-server/Makefile b/examples/zephyr/http-server/Makefile index 1e56e8c0..6b3e6bdc 100644 --- a/examples/zephyr/http-server/Makefile +++ b/examples/zephyr/http-server/Makefile @@ -1,5 +1,5 @@ CWD = $(realpath $(CURDIR)) -ZEPHYR_DIR ?= $(realpath ../../../../zephyrproject) +ZEPHYR_DIR ?= $(realpath ../../../../../../zephyrproject) BOARD ?= nucleo_h743zi example: diff --git a/examples/zephyr/mqtt-aws-client/Makefile b/examples/zephyr/mqtt-aws-client/Makefile index 1e56e8c0..6b3e6bdc 100644 --- a/examples/zephyr/mqtt-aws-client/Makefile +++ b/examples/zephyr/mqtt-aws-client/Makefile @@ -1,5 +1,5 @@ CWD = $(realpath $(CURDIR)) -ZEPHYR_DIR ?= $(realpath ../../../../zephyrproject) +ZEPHYR_DIR ?= $(realpath ../../../../../../zephyrproject) BOARD ?= nucleo_h743zi example: diff --git a/examples/zephyr/websocket-server/Makefile b/examples/zephyr/websocket-server/Makefile index 1e56e8c0..6b3e6bdc 100644 --- a/examples/zephyr/websocket-server/Makefile +++ b/examples/zephyr/websocket-server/Makefile @@ -1,5 +1,5 @@ CWD = $(realpath $(CURDIR)) -ZEPHYR_DIR ?= $(realpath ../../../../zephyrproject) +ZEPHYR_DIR ?= $(realpath ../../../../../../zephyrproject) BOARD ?= nucleo_h743zi example: