nvlsianpu commented on a change in pull request #13: Add Zephyr support to CI
URL: https://github.com/apache/mynewt-nffs/pull/13#discussion_r242846317
##########
File path: ci/zephyr_install.sh
##########
@@ -0,0 +1,33 @@
+#!/bin/bash -x
+
+PWD=$(pwd)
+
+ZEPHYR_SDK_RELEASE="0.9.5"
+ZEPHYR_SDK="zephyr-sdk-${ZEPHYR_SDK_RELEASE}-setup.run"
+ZEPHYR_SDK_URL="https://github.com/zephyrproject-rtos/meta-zephyr-sdk/releases/download/${ZEPHYR_SDK_RELEASE}/${ZEPHYR_SDK}"
+ZEPHYR_SDK_DIR="${HOME}/zephyr-sdk"
+
+export ZEPHYR_BASE="$HOME/zephyr"
+ZEPHYR_NFFS_DIR="${ZEPHYR_BASE}/ext/fs/nffs"
+
+export ZEPHYR_TOOLCHAIN_VARIANT=zephyr
+
+git clone --depth=1 https://github.com/zephyrproject-rtos/zephyr.git
$ZEPHYR_BASE
+source ${ZEPHYR_BASE}/zephyr-env.sh
+
+download_dir=$HOME/zephyr_sdk_download
+mkdir -p ${download_dir}
+
+# TODO: cache zephyr-sdk
+wget -O ${download_dir}/${ZEPHYR_SDK} -c ${ZEPHYR_SDK_URL}
+[[ $? -ne 0 ]] && exit 1
+
+chmod +x ${download_dir}/${ZEPHYR_SDK}
+${download_dir}/${ZEPHYR_SDK} --quiet -- -d "${ZEPHYR_SDK_DIR}"
+[[ $? -ne 0 ]] && exit 1
+
+pip install PyYAML pyelftools
Review comment:
why not use zephyr/scripts/requirements.txt?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services