Skip to content
This repository has been archived by the owner on Dec 20, 2023. It is now read-only.

Commit

Permalink
Re-enable nRF52840 lock example targets in travis
Browse files Browse the repository at this point in the history
-- Enable building nRF52840 Lock Example on Linux and OSX
-- Rather than installing dependencies for building lock example
   app in the before install travis script, call the travis prepare script
   from the lock example repo once it has been cloned. This makes sure
   that dependency installation for lock example is not duplicated in
   openweave travis scripts.
  • Loading branch information
suryanshup committed Jul 19, 2019
1 parent 942bc9e commit f9c707f
Show file tree
Hide file tree
Showing 7 changed files with 147 additions and 194 deletions.
10 changes: 8 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#
# Description:
# This file is the Travis CI hosted, distributed continuous
# This file is the Travis CI hosted, distributed continuous
# integration configuration file for the OpenWeave Core library.
#

Expand Down Expand Up @@ -64,6 +64,12 @@ matrix:
compiler: clang
- name: "ESP32 (openweave-esp32-demo)"
env: BUILD_TARGET="esp32"
- name: "nRF52840 Lock Example (Linux)"
env: BUILD_TARGET="nrf52840-lock-example"
os: linux
- name: "nRF52840 Lock Example (OS X)"
env: BUILD_TARGET="nrf52840-lock-example"
os: osx
- name: "Linux with Defaults against GCC Functional and Unit Tests"
env: BUILD_TARGET="linux-auto-gcc-check" CC="gcc"
os: linux
Expand Down Expand Up @@ -104,4 +110,4 @@ deploy:
tags: true
env:
global:
secure: PJdNS8L51Y+Op8xc2C9U13Y6eQUAszDEKigB0jn9LsXB8BZwJsu3mjmtLTQBU99nqAhsCKiN85kxry6APi/xjcDJ3/iRP8IpP8KJ/VV68CChdu1X/2iatSS/EOAT4ZBoo3sUCmP98w4k5G6HiVCpnNprhZOg8xsD9bflVkX9Au67hcwfHfKWyX1c/kbYYyegSWd+7GgkNZRGAws1yuwL1MwGppDqKQJ1bOciALaA1LMzzl1wvrle6t+CWvLH51YoIgndFsTJaphGqXp/hveCIsXEGKY5ZN8RkfuSvs9JupsfoXjA9Nxg2WfLC5c4MeyJV9yvzF9zZNglra9+PTlHFMxnuSvyIKRiHb9rwXMwgtb8Tqwhe0Cikj77gHdRUfZjUNBS34nNRqACSFjSFDM9N862z17BqfMZu0A0znquM24vfm+JV1i7OZ8USdbbmBqtL5qJgimQv2/Y/j3H/o6IrqOLEhuzOXQynclf6xi6AdXlcJ1QmTTicU5JbETJuzkvOYsnUs7TBV0FaPf+j98LEHTXZUPlDtQz4sIu757SiYUuR6Jm357yOwyv+x/PMk250g2op0TtMksjR3HQahnz8HJPYLenOxogYqarqY6E4TNm2P+bRDCPgxQ+dTSvlrcH8qhl+PHImn38q38ghm98WUvqdwxAApI3cZdy4Ja/3WA=
secure: PJdNS8L51Y+Op8xc2C9U13Y6eQUAszDEKigB0jn9LsXB8BZwJsu3mjmtLTQBU99nqAhsCKiN85kxry6APi/xjcDJ3/iRP8IpP8KJ/VV68CChdu1X/2iatSS/EOAT4ZBoo3sUCmP98w4k5G6HiVCpnNprhZOg8xsD9bflVkX9Au67hcwfHfKWyX1c/kbYYyegSWd+7GgkNZRGAws1yuwL1MwGppDqKQJ1bOciALaA1LMzzl1wvrle6t+CWvLH51YoIgndFsTJaphGqXp/hveCIsXEGKY5ZN8RkfuSvs9JupsfoXjA9Nxg2WfLC5c4MeyJV9yvzF9zZNglra9+PTlHFMxnuSvyIKRiHb9rwXMwgtb8Tqwhe0Cikj77gHdRUfZjUNBS34nNRqACSFjSFDM9N862z17BqfMZu0A0znquM24vfm+JV1i7OZ8USdbbmBqtL5qJgimQv2/Y/j3H/o6IrqOLEhuzOXQynclf6xi6AdXlcJ1QmTTicU5JbETJuzkvOYsnUs7TBV0FaPf+j98LEHTXZUPlDtQz4sIu757SiYUuR6Jm357yOwyv+x/PMk250g2op0TtMksjR3HQahnz8HJPYLenOxogYqarqY6E4TNm2P+bRDCPgxQ+dTSvlrcH8qhl+PHImn38q38ghm98WUvqdwxAApI3cZdy4Ja/3WA=
42 changes: 5 additions & 37 deletions .travis/before_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,10 @@

#
# Description:
# This file is the script for Travis CI hosted, distributed continuous
# This file is the script for Travis CI hosted, distributed continuous
# integration 'before_install' trigger of the 'install' step.
#

NORDIC_SDK_FOR_THREAD_URL=https://www.nordicsemi.com/-/media/Software-and-other-downloads/SDKs/nRF5-SDK-for-Thread/nRF5-SDK-for-Thread-and-Zigbee/nRF5SDKforThreadandZigbee20029775ac.zip

NORDIC_COMMAND_LINE_TOOLS_URL=https://www.nordicsemi.com/-/media/Software-and-other-downloads/Desktop-software/nRF5-command-line-tools/sw/nRF-Command-Line-Tools_9_8_1_Linux-x86_64.tar

ARM_GCC_TOOLCHAIN_URL=https://developer.arm.com/-/media/Files/downloads/gnu-rm/7-2018q2/gcc-arm-none-eabi-7-2018-q2-update-linux.tar.bz2

TMPDIR=${TMPDIR-/tmp}

die()
Expand Down Expand Up @@ -74,40 +68,14 @@ installdeps()

;;

nrf5-sdk)
# Install Nordic nRF52840 SDK for Thread and Zigbee
wget -O ${TMPDIR}/nordic_sdk_for_thread.zip -nv ${NORDIC_SDK_FOR_THREAD_URL} || exit 1
unzip -d ${TRAVIS_BUILD_DIR}/nRF5x-SDK-for-Thread-and-Zigbee -q ${TMPDIR}/nordic_sdk_for_thread.zip || exit 1
rm ${TMPDIR}/nordic_sdk_for_thread.zip

;;

nrf5-tools)
# Install Nordic nRF5x Command Line Tools
wget -O ${TMPDIR}/nordic_command_line_tools.tar -nv ${NORDIC_COMMAND_LINE_TOOLS_URL} || exit 1
mkdir ${TRAVIS_BUILD_DIR}/nRF5x-Command-Line-Tools
tar -C ${TRAVIS_BUILD_DIR}/nRF5x-Command-Line-Tools -xf ${TMPDIR}/nordic_command_line_tools.tar || exit 1
rm ${TMPDIR}/nordic_command_line_tools.tar

;;

arm-gcc)
# Install ARM GCC Toolchain
wget -O ${TMPDIR}/arm_gcc_toolchain.tar.bz2 -nv ${ARM_GCC_TOOLCHAIN_URL} || exit 1
mkdir ${TRAVIS_BUILD_DIR}/arm
tar -jxf ${TMPDIR}/arm_gcc_toolchain.tar.bz2 --directory ${TRAVIS_BUILD_DIR}/arm || exit 1
rm ${TMPDIR}/arm_gcc_toolchain.tar.bz2

;;

osx-autotools)
HOMEBREW_NO_AUTO_UPDATE=1 brew install automake libtool
;;

osx-openssl)
HOMEBREW_NO_AUTO_UPDATE=1 brew install openssl
;;

esac
}

Expand Down Expand Up @@ -135,8 +103,8 @@ case "${BUILD_TARGET}" in

;;

nrf52840)
.travis/prepare_nrf52840.sh
nrf52840-lock-example)
.travis/prepare_nrf52840_lock_example.sh

;;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,6 @@
# Travis CI build script for nRF52840 integration builds.
#

# Export NRF5_SDK_ROOT variable pointing to the nRF5x SDK for Thread and Zigbee.
export NRF5_SDK_ROOT=${TRAVIS_BUILD_DIR}/nRF5x-SDK-for-Thread-and-Zigbee

# Export NRF5_TOOLS_ROOT variable pointing to the nRF5x command line tools.
export NRF5_TOOLS_ROOT=${TRAVIS_BUILD_DIR}/nRF5x-Command-Line-Tools

# Export GNU_INSTALL_ROOT variable pointing to the ARM GCC tool chain.
export GNU_INSTALL_ROOT=${TRAVIS_BUILD_DIR}/arm/gcc-arm-none-eabi-7-2018-q2-update/bin/

# Export GNU_VERSION variable.
export GNU_VERSION=7.3.1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,36 +23,8 @@

TMPDIR=${TMPDIR-/tmp}

# Set tools download links
#
NORDIC_SDK_FOR_THREAD_URL=https://www.nordicsemi.com/-/media/Software-and-other-downloads/SDKs/nRF5-SDK-for-Thread/nRF5-SDK-for-Thread-and-Zigbee/nRF5SDKforThreadandZigbeev300d310e71.zip
NORDIC_COMMAND_LINE_TOOLS_URL=https://www.nordicsemi.com/-/media/Software-and-other-downloads/Desktop-software/nRF5-command-line-tools/sw/nRF-Command-Line-Tools_9_8_1_Linux-x86_64.tar
ARM_GCC_TOOLCHAIN_URL=https://developer.arm.com/-/media/Files/downloads/gnu-rm/7-2018q2/gcc-arm-none-eabi-7-2018-q2-update-linux.tar.bz2

# --------------------------------------------------------------------------------

set -x

# Install Nordic nRF52840 SDK for Thread and Zigbee
#
wget -O ${TMPDIR}/nordic_sdk_for_thread.zip -nv ${NORDIC_SDK_FOR_THREAD_URL} || exit 1
unzip -d ${TRAVIS_BUILD_DIR}/nRF5x-SDK-for-Thread-and-Zigbee -q ${TMPDIR}/nordic_sdk_for_thread.zip || exit 1
rm ${TMPDIR}/nordic_sdk_for_thread.zip

# Install Nordic nRF5x Command Line Tools
#
wget -O ${TMPDIR}/nordic_command_line_tools.tar -nv ${NORDIC_COMMAND_LINE_TOOLS_URL} || exit 1
mkdir ${TRAVIS_BUILD_DIR}/nRF5x-Command-Line-Tools
tar -C ${TRAVIS_BUILD_DIR}/nRF5x-Command-Line-Tools -xf ${TMPDIR}/nordic_command_line_tools.tar || exit 1
rm ${TMPDIR}/nordic_command_line_tools.tar

# Install ARM GCC Toolchain
#
wget -O ${TMPDIR}/arm_gcc_toolchain.tar.bz2 -nv ${ARM_GCC_TOOLCHAIN_URL} || exit 1
mkdir ${TRAVIS_BUILD_DIR}/arm
tar -jxf ${TMPDIR}/arm_gcc_toolchain.tar.bz2 --directory ${TRAVIS_BUILD_DIR}/arm || exit 1
rm ${TMPDIR}/arm_gcc_toolchain.tar.bz2

# Clone the openweave-nrf52840-lock-example application. This code will be used to
# test the ability to build OpenWeave for the nRF52840.
#
Expand All @@ -71,6 +43,10 @@ if git -C ${TRAVIS_BUILD_DIR}/openweave-nrf52840-lock-example rev-parse --verify
fi
EXAMPLE_APP_BRANCH=`git -C ${TRAVIS_BUILD_DIR}/openweave-nrf52840-lock-example rev-parse --abbrev-ref HEAD`

# Call the prepare script in the lock example repo to install related
# dependencies.
source ${TRAVIS_BUILD_DIR}/openweave-nrf52840-lock-example/.travis/prepare.sh

# Initialize and update all submodules within the example app EXCEPT the
# OpenWeave submodule.
#
Expand All @@ -87,7 +63,7 @@ echo 'nRF52840 Build Preparation Complete'
echo ''
echo "openweave-core branch: ${TRAVIS_BRANCH}"
echo "openweave-nrf52840-lock-example branch: ${EXAMPLE_APP_BRANCH}"
echo "Nordic SDK for Thread and Zigbee: ${NORDIC_SDK_FOR_THREAD_URL}"
echo "Nordic SDK for Thread and Zigbee: ${NORDIC_SDK_URL}"
echo "Nordic nRF5x Command Line Tools: ${NORDIC_COMMAND_LINE_TOOLS_URL}"
echo "ARM GCC Toolchain: ${ARM_GCC_TOOLCHAIN_URL}"
echo 'Commit Hashes'
Expand Down
8 changes: 4 additions & 4 deletions .travis/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#
# Description:
# This file is the script for Travis CI hosted, distributed continuous
# This file is the script for Travis CI hosted, distributed continuous
# integration 'script' step.
#

Expand Down Expand Up @@ -97,8 +97,8 @@ case "${BUILD_TARGET}" in
.travis/build_esp32.sh
;;

nrf52840)
.travis/build_nrf52840.sh
nrf52840-lock-example)
.travis/build_nrf52840_lock_example.sh
;;

linux-auto-*-distcheck)
Expand All @@ -112,6 +112,6 @@ case "${BUILD_TARGET}" in
*)
die "Unknown build target \"${BUILD_TARGET}\"."
;;

esac

84 changes: 42 additions & 42 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -28,59 +28,59 @@ include $(abs_top_nlbuild_autotools_dir)/automake/pre.am

.NOTPARALLEL:

AM_MAKEFLAGS = --no-print-directory
AM_MAKEFLAGS = --no-print-directory

SUBDIRS = \
third_party \
src \
doc \
SUBDIRS = \
third_party \
src \
doc \
$(NULL)

PRETTY_SUBDIRS = \
$(filter-out third_party,$(SUBDIRS)) \
PRETTY_SUBDIRS = \
$(filter-out third_party,$(SUBDIRS)) \
$(NULL)

EXTRA_DIST = \
BUILDING-ESP32.md \
BUILDING.md \
CONTRIBUTING.md \
Makefile-Android \
Makefile-bootstrap \
Makefile-iOS \
Makefile-Standalone \
README.md \
.default-version \
.travis.yml \
.travis/before_install.sh \
.travis/build_esp32.sh \
.travis/build_nrf52840.sh \
.travis/prepare_esp32.sh \
.travis/prepare_nrf52840.sh \
.travis/script.sh \
bootstrap \
bootstrap-configure \
repos.conf \
$(srcdir)/build/autoconf \
$(srcdir)/build/config \
$(srcdir)/build/cstyle/cstyle.options \
$(srcdir)/build/esp32 \
$(srcdir)/build/jenkins \
$(srcdir)/build/make \
$(srcdir)/build/scripts \
$(srcdir)/certs \
EXTRA_DIST = \
BUILDING-ESP32.md \
BUILDING.md \
CONTRIBUTING.md \
Makefile-Android \
Makefile-bootstrap \
Makefile-iOS \
Makefile-Standalone \
README.md \
.default-version \
.travis.yml \
.travis/before_install.sh \
.travis/build_esp32.sh \
.travis/build_nrf52840_lock_example.sh \
.travis/prepare_esp32.sh \
.travis/prepare_nrf52840_lock_example.sh \
.travis/script.sh \
bootstrap \
bootstrap-configure \
repos.conf \
$(srcdir)/build/autoconf \
$(srcdir)/build/config \
$(srcdir)/build/cstyle/cstyle.options \
$(srcdir)/build/esp32 \
$(srcdir)/build/jenkins \
$(srcdir)/build/make \
$(srcdir)/build/scripts \
$(srcdir)/certs \
$(NULL)

BUILT_SOURCES = \
.local-version \
BUILT_SOURCES = \
.local-version \
$(NULL)

dist_doc_DATA = \
CHANGELOG \
LICENSE \
dist_doc_DATA = \
CHANGELOG \
LICENSE \
$(NULL)

DISTCLEANFILES = \
.local-version \
DISTCLEANFILES = \
.local-version \
$(NULL)

# There are no source files to lint or prettify in this subdirectory.
Expand Down
Loading

0 comments on commit f9c707f

Please sign in to comment.