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

Commit 7a0d846

Browse files
authored
Merge pull request #1 from openweave/master
Updating fork from openweave-core
2 parents b3ecfb1 + 1eea311 commit 7a0d846

File tree

533 files changed

+33489
-14602
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

533 files changed

+33489
-14602
lines changed

.default-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.1.0
1+
4.1.2

.travis.yml

Lines changed: 37 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright 2018 Google LLC. All Rights Reserved.
2+
# Copyright 2018-2019 Google LLC. All Rights Reserved.
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
@@ -43,18 +43,10 @@ matrix:
4343
env: BUILD_TARGET="linux-auto-gcc-lint" CC="gcc"
4444
os: linux
4545
compiler: gcc
46-
- name: "Linux with Defaults against GCC Functional and Unit Tests"
47-
env: BUILD_TARGET="linux-auto-gcc-check" CC="gcc"
48-
os: linux
49-
compiler: gcc
5046
- name: "Linux with Defaults against clang/LLVM"
5147
env: BUILD_TARGET="linux-auto-clang" CC="clang"
5248
os: linux
5349
compiler: clang
54-
- name: "Linux with LwIP against GCC Functional and Unit Tests"
55-
env: BUILD_TARGET="linux-lwip-gcc-check" CC="gcc"
56-
os: linux
57-
compiler: gcc
5850
- name: "Linux with LWIP against clang/LLVM"
5951
env: BUILD_TARGET="linux-lwip-clang" CC="clang"
6052
os: linux
@@ -67,11 +59,43 @@ matrix:
6759
env: BUILD_TARGET="osx-lwip-clang" CC="clang"
6860
os: osx
6961
compiler: clang
70-
- name: "Linux with Defaults against GCC Network and Service (Happy) Tests"
62+
- name: "ESP32 (openweave-esp32-demo)"
63+
env: BUILD_TARGET="esp32"
64+
- name: "Linux with Defaults against GCC Functional and Unit Tests"
65+
env: BUILD_TARGET="linux-auto-gcc-check" CC="gcc"
7166
os: linux
7267
compiler: gcc
73-
env: BUILD_TARGET="linux-auto-gcc-check-happy"
74-
- name: "ESP32"
75-
env: BUILD_TARGET="esp32"
68+
- name: "Linux with LwIP against GCC Functional and Unit Tests"
69+
env: BUILD_TARGET="linux-lwip-gcc-check" CC="gcc"
70+
os: linux
71+
compiler: gcc
72+
- name: "Linux with Defaults against GCC Network and Service Tests"
73+
os: linux
74+
compiler: gcc
75+
env: BUILD_TARGET="linux-auto-gcc-check-happy" TRAVIS_TAG="true"
76+
- name: "Linux with LwIP against GCC Network and Service Tests"
77+
os: linux
78+
compiler: gcc
79+
env: BUILD_TARGET="linux-lwip-gcc-check-happy" TRAVIS_TAG="true"
7680

81+
#
82+
# deploy description:
83+
# Travis CI supports uploading to Google Cloud Storage (GCS).
84+
# openweave gcs bucket location: happy-test-log/<build_number> under link: https://storage.cloud.google.com/openweave"
85+
# tags: true: deployment is triggered if and only if $TRAVIS_TAG is set here.
86+
# Travis-CI help link: https://docs.travis-ci.com/user/deployment/gcs/
87+
#
7788

89+
deploy:
90+
provider: gcs
91+
access_key_id: GOOGNPZYTVTEPZM5VBRAVVUU
92+
secret_access_key:
93+
secure: HH/3FOuU8M4AG9Gdwjs52yw2L1JnAvupcLbFurJtrfqfspXYj/1JKTbGjbmVcb6jS/mK9pNPCs2q/L111JeufWa5cR8RAw49CZ9ENqUHs0t7FV0vgk2h7O+QrQVDCQqN9XvgTGpe071IFJOPCpASRYTT1NT6wqEFyPyCl6b+eU8RLXkRwSQrd2heAdKlD/sHBda3AA9OE8AnKRdY5ZKLhtAt2xl9z4w6vWi1MTbmoRVZaCZaAjmtM5OmRAbqTz4kO41Zy57u1350uEiuOV6l/1QVpfd8zk3iYMC4T5OGrDVzk53WejnHa+Ne1nanswW6HBnsrunBcJV3KWSx2O3mdKBsBunJ4t+gjYAtYaPdMIqqvswXXN95d6VOayTvFBJfmcPLNz4h4ypDf9wYBrSdCpnHWTJh8lmgC2vd8k2tvy/67OgVlYUUX5X+cOkLZI4cfVwOrx2wFIYvxcbsh1LyUQ/EE97QOuftcgnI654u/VLJXuPK9lTj3tEDlH27Hz7h8aJ/dpsOTTCC4t0AqAiXaU7S4HO7B3WnQf4ObVzUCcIQLeqHAlzg+BcOCgy+Jvrqrq4A1PB10YAdwIWjBtIZ2fEuuCCFNCcE9rMp5ddnc3sVVX+NEfDm+O9HeNRvg2VRTWq4Bm5sBSjzJ+SDP5bK9BQrSoXwiqDRM+AGheB1B1w=
94+
bucket: openweave
95+
skip_cleanup: true
96+
acl: public-read
97+
upload-dir: happy-test-log/$TRAVIS_BUILD_NUMBER
98+
local-dir: "$TRAVIS_BUILD_DIR/happy-test-logs"
99+
on:
100+
repo: openweave/openweave-core
101+
tags: true

.travis/before_install.sh

Lines changed: 52 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22

33
#
4-
# Copyright 2018 Google LLC All Rights Reserved.
4+
# Copyright 2018-2019 Google LLC All Rights Reserved.
55
#
66
# Licensed under the Apache License, Version 2.0 (the "License");
77
# you may not use this file except in compliance with the License.
@@ -22,6 +22,14 @@
2222
# integration 'before_install' trigger of the 'install' step.
2323
#
2424

25+
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
26+
27+
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
28+
29+
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
30+
31+
TMPDIR=${TMPDIR-/tmp}
32+
2533
die()
2634
{
2735
echo " *** ERROR: " ${*}
@@ -61,12 +69,45 @@ installdeps()
6169
# OpenWeave Core may use OpenSSL for cryptography. The
6270
# OpenSSL version included in package depends on the
6371
# perl Text::Template mmodule.
64-
6572
curl -L https://cpanmin.us | sudo perl - --sudo App::cpanminus
6673
sudo cpanm "Text::Template"
6774

6875
;;
6976

77+
nrf5-sdk)
78+
# Install Nordic nRF52840 SDK for Thread and Zigbee
79+
wget -O ${TMPDIR}/nordic_sdk_for_thread.zip -nv ${NORDIC_SDK_FOR_THREAD_URL} || exit 1
80+
unzip -d ${TRAVIS_BUILD_DIR}/nRF5x-SDK-for-Thread-and-Zigbee -q ${TMPDIR}/nordic_sdk_for_thread.zip || exit 1
81+
rm ${TMPDIR}/nordic_sdk_for_thread.zip
82+
83+
;;
84+
85+
nrf5-tools)
86+
# Install Nordic nRF5x Command Line Tools
87+
wget -O ${TMPDIR}/nordic_command_line_tools.tar -nv ${NORDIC_COMMAND_LINE_TOOLS_URL} || exit 1
88+
mkdir ${TRAVIS_BUILD_DIR}/nRF5x-Command-Line-Tools
89+
tar -C ${TRAVIS_BUILD_DIR}/nRF5x-Command-Line-Tools -xf ${TMPDIR}/nordic_command_line_tools.tar || exit 1
90+
rm ${TMPDIR}/nordic_command_line_tools.tar
91+
92+
;;
93+
94+
arm-gcc)
95+
# Install ARM GCC Toolchain
96+
wget -O ${TMPDIR}/arm_gcc_toolchain.tar.bz2 -nv ${ARM_GCC_TOOLCHAIN_URL} || exit 1
97+
mkdir ${TRAVIS_BUILD_DIR}/arm
98+
tar -jxf ${TMPDIR}/arm_gcc_toolchain.tar.bz2 --directory ${TRAVIS_BUILD_DIR}/arm || exit 1
99+
rm ${TMPDIR}/arm_gcc_toolchain.tar.bz2
100+
101+
;;
102+
103+
osx-autotools)
104+
HOMEBREW_NO_AUTO_UPDATE=1 brew install automake libtool
105+
;;
106+
107+
osx-openssl)
108+
HOMEBREW_NO_AUTO_UPDATE=1 brew install openssl
109+
;;
110+
70111
esac
71112
}
72113

@@ -94,16 +135,17 @@ case "${BUILD_TARGET}" in
94135

95136
;;
96137

97-
osx-auto-clang|osx-lwip-clang)
98-
# By default, OpenWeave Core uses OpenSSL for cryptography on
99-
# OS X and the OpenSSL version included in package depends
100-
# on the perl Text::Template mmodule.
101-
102-
installdeps "openssl-deps"
138+
nrf52840)
139+
.travis/prepare_nrf52840.sh
103140

104141
;;
105142

106-
linux-auto-gcc-check-happy)
143+
osx-*)
144+
installdeps "osx-autotools"
145+
installdeps "osx-openssl"
146+
;;
147+
148+
linux-auto-gcc-check-happy|linux-lwip-gcc-check-happy)
107149
# By default, the BLE layer is enabled in OpenWeave Core and,
108150
# by default on Linux, the BLE layer is implemented by
109151
# BlueZ. Satisfy its dependencies.
@@ -120,15 +162,9 @@ case "${BUILD_TARGET}" in
120162

121163
cd $HOME
122164
git clone https://github.com/openweave/happy.git
123-
124-
mkdir -p ve
125-
cd ve
126-
virtualenv happy
127-
ls ./happy/bin/activate
128-
. ./happy/bin/activate
129165
cd ${HOME}/happy
166+
make install
130167
python pip_packages.py
131-
python setup.py develop
132168
pip install pexpect
133169
sudo apt install python-gobject
134170
sudo apt install python-dbus

.travis/build_nrf52840.sh

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#!/bin/sh
2+
3+
#
4+
# Copyright 2019 Google LLC All Rights Reserved.
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#
18+
19+
#
20+
# Description:
21+
# Travis CI build script for nRF52840 integration builds.
22+
#
23+
24+
# Export NRF5_SDK_ROOT variable pointing to the nRF5x SDK for Thread and Zigbee.
25+
export NRF5_SDK_ROOT=${TRAVIS_BUILD_DIR}/nRF5x-SDK-for-Thread-and-Zigbee
26+
27+
# Export NRF5_TOOLS_ROOT variable pointing to the nRF5x command line tools.
28+
export NRF5_TOOLS_ROOT=${TRAVIS_BUILD_DIR}/nRF5x-Command-Line-Tools
29+
30+
# Export GNU_INSTALL_ROOT variable pointing to the ARM GCC tool chain.
31+
export GNU_INSTALL_ROOT=${TRAVIS_BUILD_DIR}/arm/gcc-arm-none-eabi-7-2018-q2-update/bin/
32+
33+
# Export GNU_VERSION variable.
34+
export GNU_VERSION=7.3.1
35+
36+
# Add Nordic nRF jprog tool to the path.
37+
export PATH=${PATH}:${NRF5_TOOLS_ROOT}/nrfjprog
38+
39+
# Set OPENWEAVE_ROOT to the Travis build directory. This will result in the example app being
40+
# built using the target OpenWeave commit.
41+
export OPENWEAVE_ROOT=${TRAVIS_BUILD_DIR}
42+
43+
# Build the example application.
44+
make -C ${TRAVIS_BUILD_DIR}/openweave-nrf52840-lock-example || exit 1

.travis/github_deploy_key.enc

3.34 KB
Binary file not shown.

.travis/prepare_esp32.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,12 @@
2121
# Travis CI build preparation script for the ESP32 target on Linux.
2222
#
2323

24+
TMPDIR=${TMPDIR-/tmp}
25+
26+
# Set tools download links
27+
#
2428
XTENSA_TOOL_CHAIN_URL=https://dl.espressif.com/dl/xtensa-esp32-elf-linux64-1.22.0-80-g6c4433a-5.2.0.tar.gz
2529
ESP_IDF_VERSION=v3.0.4
26-
TMPDIR=${TMPDIR-/tmp}
2730

2831
# --------------------------------------------------------------------------------
2932

@@ -62,6 +65,7 @@ fi
6265
if git -C ${TRAVIS_BUILD_DIR}/openweave-esp32-demo rev-parse --verify origin/${SOURCE_BRANCH} >/dev/null 2>&1; then
6366
git -C ${TRAVIS_BUILD_DIR}/openweave-esp32-demo checkout ${SOURCE_BRANCH}
6467
fi
68+
DEMO_APP_BRANCH=`git -C ${TRAVIS_BUILD_DIR}/openweave-esp32-demo rev-parse --abbrev-ref HEAD`
6569

6670
# Initialize and update all submodules within the demo app EXCEPT the
6771
# OpenWeave submodule.
@@ -85,7 +89,7 @@ echo '--------------------------------------------------------------------------
8589
echo 'ESP32 Build Preparation Complete'
8690
echo ''
8791
echo "openweave-core branch: ${TRAVIS_BRANCH}"
88-
echo 'openweave-esp32-demo branch: '`git -C ${TRAVIS_BUILD_DIR}/openweave-esp32-demo rev-parse --abbrev-ref HEAD`
92+
echo "openweave-esp32-demo branch: ${DEMO_APP_BRANCH}"
8993
echo "ESP-IDF version: ${ESP_IDF_VERSION}"
9094
echo "Xtensa Tool Chain: ${XTENSA_TOOL_CHAIN_URL}"
9195
echo 'Commit Hashes'

.travis/prepare_nrf52840.sh

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
#!/bin/sh
2+
3+
#
4+
# Copyright 2019 Google LLC All Rights Reserved.
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#
18+
19+
#
20+
# Description:
21+
# Travis CI build preparation script for the nRF52840 target on Linux.
22+
#
23+
24+
TMPDIR=${TMPDIR-/tmp}
25+
26+
# Set tools download links
27+
#
28+
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
29+
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
30+
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
31+
32+
# --------------------------------------------------------------------------------
33+
34+
set -x
35+
36+
# Install Nordic nRF52840 SDK for Thread and Zigbee
37+
#
38+
wget -O ${TMPDIR}/nordic_sdk_for_thread.zip -nv ${NORDIC_SDK_FOR_THREAD_URL} || exit 1
39+
unzip -d ${TRAVIS_BUILD_DIR}/nRF5x-SDK-for-Thread-and-Zigbee -q ${TMPDIR}/nordic_sdk_for_thread.zip || exit 1
40+
rm ${TMPDIR}/nordic_sdk_for_thread.zip
41+
42+
# Install Nordic nRF5x Command Line Tools
43+
#
44+
wget -O ${TMPDIR}/nordic_command_line_tools.tar -nv ${NORDIC_COMMAND_LINE_TOOLS_URL} || exit 1
45+
mkdir ${TRAVIS_BUILD_DIR}/nRF5x-Command-Line-Tools
46+
tar -C ${TRAVIS_BUILD_DIR}/nRF5x-Command-Line-Tools -xf ${TMPDIR}/nordic_command_line_tools.tar || exit 1
47+
rm ${TMPDIR}/nordic_command_line_tools.tar
48+
49+
# Install ARM GCC Toolchain
50+
#
51+
wget -O ${TMPDIR}/arm_gcc_toolchain.tar.bz2 -nv ${ARM_GCC_TOOLCHAIN_URL} || exit 1
52+
mkdir ${TRAVIS_BUILD_DIR}/arm
53+
tar -jxf ${TMPDIR}/arm_gcc_toolchain.tar.bz2 --directory ${TRAVIS_BUILD_DIR}/arm || exit 1
54+
rm ${TMPDIR}/arm_gcc_toolchain.tar.bz2
55+
56+
# Clone the openweave-nrf52840-lock-example application. This code will be used to
57+
# test the ability to build OpenWeave for the nRF52840.
58+
#
59+
git -C ${TRAVIS_BUILD_DIR} clone https://github.com/openweave/openweave-nrf52840-lock-example.git || exit 1
60+
61+
# Test if a parallel branch exists in the example repo with the same name
62+
# as the OpenWeave branch being built. If so, build using that branch of
63+
# the example app.
64+
#
65+
SOURCE_BRANCH=${TRAVIS_PULL_REQUEST_BRANCH}
66+
if [ -z "${SOURCE_BRANCH}" ]; then
67+
SOURCE_BRANCH=${TRAVIS_BRANCH}
68+
fi
69+
if git -C ${TRAVIS_BUILD_DIR}/openweave-nrf52840-lock-example rev-parse --verify origin/${SOURCE_BRANCH} >/dev/null 2>&1; then
70+
git -C ${TRAVIS_BUILD_DIR}/openweave-nrf52840-lock-example checkout ${SOURCE_BRANCH}
71+
fi
72+
EXAMPLE_APP_BRANCH=`git -C ${TRAVIS_BUILD_DIR}/openweave-nrf52840-lock-example rev-parse --abbrev-ref HEAD`
73+
74+
# Initialize and update all submodules within the example app EXCEPT the
75+
# OpenWeave submodule.
76+
#
77+
git -C ${TRAVIS_BUILD_DIR}/openweave-nrf52840-lock-example submodule init || exit 1
78+
git -C ${TRAVIS_BUILD_DIR}/openweave-nrf52840-lock-example submodule deinit third_party/openweave-core || exit 1
79+
git -C ${TRAVIS_BUILD_DIR}/openweave-nrf52840-lock-example submodule update || exit 1
80+
81+
set +x
82+
83+
# Log relevant build information.
84+
#
85+
echo '---------------------------------------------------------------------------'
86+
echo 'nRF52840 Build Preparation Complete'
87+
echo ''
88+
echo "openweave-core branch: ${TRAVIS_BRANCH}"
89+
echo "openweave-nrf52840-lock-example branch: ${EXAMPLE_APP_BRANCH}"
90+
echo "Nordic SDK for Thread and Zigbee: ${NORDIC_SDK_FOR_THREAD_URL}"
91+
echo "Nordic nRF5x Command Line Tools: ${NORDIC_COMMAND_LINE_TOOLS_URL}"
92+
echo "ARM GCC Toolchain: ${ARM_GCC_TOOLCHAIN_URL}"
93+
echo 'Commit Hashes'
94+
echo ' openweave-core: '`git -C ${TRAVIS_BUILD_DIR} rev-parse --short HEAD`
95+
echo ' openweave-nrf52840-lock-example: '`git -C ${TRAVIS_BUILD_DIR}/openweave-nrf52840-lock-example rev-parse --short HEAD`
96+
git -C ${TRAVIS_BUILD_DIR}/openweave-nrf52840-lock-example submodule --quiet foreach 'echo " openweave-nrf52840-lock-example/$path: "`git rev-parse --short HEAD`'
97+
echo '---------------------------------------------------------------------------'

0 commit comments

Comments
 (0)