Permalink
Browse files

Travis and DTLS build fix

  • Loading branch information...
darconeous committed Apr 4, 2017
1 parent cb0f86c commit ec4fc211b1cdabe72896f822e6db82f5caa0ffc0
View
@@ -1,5 +1,17 @@
language: c
addons:
apt:
packages:
- git
- bsdtar
- libtool
- automake
- autoconf
- autoconf-archive
- libreadline-dev
- libssl-dev
os:
- linux
- osx
@@ -23,21 +35,21 @@ after_success:
env:
- BUILD_MAKEARGS='distcheck' BUILD_PLATFORM='unix' BUILD_MAKEPATH='build'
- BUILD_MAKEARGS='check' BUILD_CONFIGFLAGS='--enable-embedded NYOCI_CONF_TRANS_ENABLE_BLOCK2=1 NYOCI_CONF_TRANS_ENABLE_OBSERVING=1' BUILD_PLATFORM='unix' BUILD_MAKEPATH='build'
- BUILD_MAKEARGS='check' BUILD_CONFIGFLAGS='--enable-dtls' BUILD_PLATFORM='unix' BUILD_MAKEPATH='build'
- BUILD_MAKEARGS='check' BUILD_CONFIGFLAGS='--enable-tls' BUILD_PLATFORM='unix' BUILD_MAKEPATH='build'
matrix:
exclude:
- os: osx
compiler: gcc
- os: osx
env: BUILD_MAKEARGS='check' BUILD_CONFIGFLAGS='--enable-dtls' BUILD_PLATFORM='unix' BUILD_MAKEPATH='build'
env: BUILD_MAKEARGS='check' BUILD_CONFIGFLAGS='--enable-tls' BUILD_PLATFORM='unix' BUILD_MAKEPATH='build'
include:
- os: linux
compiler: gcc
env: BUILD_PLATFORM='contiki' BUILD_MAKEPATH='contiki-src/examples/nyoci-plugtest' BUILD_MAKEARGS='TARGET=minimal-net CONTIKI=../../../contiki'
env: BUILD_PLATFORM='contiki' BUILD_MAKEPATH='contiki-src/examples/nyoci-plugtest' BUILD_MAKEARGS='TARGET=minimal-net CONTIKI=../../../contiki' SUPPORTED_CONTIKI_REF='1d69099'
- os: linux
compiler: gcc
env: BUILD_PLATFORM='contiki' BUILD_MAKEPATH='contiki-src/examples/nyoci-complex' BUILD_MAKEARGS='TARGET=native CONTIKI=../../../contiki'
env: BUILD_PLATFORM='contiki' BUILD_MAKEPATH='contiki-src/examples/nyoci-complex' BUILD_MAKEARGS='TARGET=native CONTIKI=../../../contiki' SUPPORTED_CONTIKI_REF='1d69099'
- os: linux
compiler: gcc
env: BUILD_PLATFORM='contiki' BUILD_MAKEPATH='contiki-src/examples/nyoci-simple' BUILD_MAKEARGS='TARGET=minimal-net CONTIKI=../../../contiki'
env: BUILD_PLATFORM='contiki' BUILD_MAKEPATH='contiki-src/examples/nyoci-simple' BUILD_MAKEARGS='TARGET=minimal-net CONTIKI=../../../contiki' SUPPORTED_CONTIKI_REF='1d69099'
View
@@ -12,9 +12,7 @@ set -x
prep_ssh_key() {
openssl aes-256-cbc -K "${encrypted_0f1462f1026b_key}" -iv "${encrypted_0f1462f1026b_iv}" -in .travis/deploy.prv.enc -out .travis/deploy.prv -d &&
chmod 600 .travis/deploy.prv &&
ssh-add .travis/deploy.prv &&
git config --global user.name "Travis CI" &&
git config --global user.email "noreply@travis-ci.com"
ssh-add .travis/deploy.prv
}
AUTOCONF_BRANCH="autoconf/$TRAVIS_BRANCH"
@@ -25,9 +23,13 @@ if [ $TRAVIS_REPO_SLUG = "darconeous/libnyoci" ] \
&& [ $TRAVIS_PULL_REQUEST = "false" ] \
&& [ $BUILD_MAKEPATH = "build" ] \
&& [ $BUILD_MAKEARGS = "distcheck" ] \
&& prep_ssh_key #
&& true
then
git fetch --unshallow origin || die
git config --global user.name "Travis CI" || die
git config --global user.email "noreply@travis-ci.com" || die
# This will fail if this isn't a shallow checkout, so we ignore the return value.
git fetch --unshallow origin
git fetch origin scripts:scripts ${AUTOCONF_BRANCH}:${AUTOCONF_BRANCH} ${TRAVIS_BRANCH}:${TRAVIS_BRANCH} || die
@@ -37,17 +39,19 @@ then
git checkout scripts || die
NO_PUSH=1 ./update-autoconf-master ${TRAVIS_BRANCH} || die
./git-update-bootstrap-tags --no-push --no-pull --no-make-branches ${TRAVIS_BRANCH} || die
CHANGED_LINES=`git diff "${PREVREV}".."${AUTOCONF_BRANCH}" | grep '^[-+]' | grep -v '^[-+]SOURCE_VERSION=' | wc -l`
CHANGED_LINES=`git diff "${PREVREV}".."__AUTOCONF_HEAD" | grep '^[-+]' | grep -v '^[-+]SOURCE_VERSION=' | wc -l || echo 3`
if [ "$CHANGED_LINES" -gt "2" ]
then
echo "Branch '${AUTOCONF_BRANCH}' is OUT OF DATE."
git checkout "${TRAVIS_BRANCH}" || die
git push git@github.com:${TRAVIS_REPO_SLUG}.git ${AUTOCONF_BRANCH}:${AUTOCONF_BRANCH} || die
prep_ssh_key || die "prep_ssh_key failed"
git push "git@github.com:${TRAVIS_REPO_SLUG}.git" "__AUTOCONF_HEAD:${AUTOCONF_BRANCH}" || die "Unable to push"
else
echo "Branch '${AUTOCONF_BRANCH}' is still up-to-date."
fi
@@ -6,10 +6,11 @@ die() {
set -x
[ $TRAVIS_OS_NAME != linux ] || {
sudo apt-get -y update || die
sudo apt-get -y install bsdtar autoconf-archive automake autoconf || die
}
# This should already be handled by the .travis.yml file.
#[ $TRAVIS_OS_NAME != linux ] || {
# sudo apt-get -y update || die
# sudo apt-get -y install bsdtar autoconf-archive automake autoconf || die
#}
[ $TRAVIS_OS_NAME != osx ] || {
brew install autoconf-archive || die
View
@@ -7,11 +7,13 @@ die() {
set -x
SUPPORTED_CONTIKI_REF=${SUPPORTED_CONTIKI_REF-1d69099}
if [ $BUILD_PLATFORM = contiki ]
then
git clone git://github.com/contiki-os/contiki.git || die
cd contiki || die
git checkout 1d69099 || die
git checkout ${SUPPORTED_CONTIKI_REF} || die
cd .. || die
fi
View
@@ -21,7 +21,7 @@ DIR="`dirname $0`"
"${DIR}"/run-in-docker.sh -i 'DIR="`pwd`" &&
mkdir -p /build &&
cd /build && "${DIR}"/configure --enable-dtls &&
cd /build && "${DIR}"/configure --enable-tls &&
make -j `nproc` check AM_DEFAULT_VERBOSITY=1
' || exit 1
View
@@ -531,6 +531,7 @@ NYOCI_END_C_DECLS
#include "nyoci-plat-tls.h"
#endif
#include "nyoci-timer.h"
#include "nyoci-async.h"
#include "nyoci-transaction.h"
#include "nyoci-observable.h"
@@ -26,8 +26,8 @@
** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef NYOCI_nyoci_plat_tls_h
#define NYOCI_nyoci_plat_tls_h
#ifndef NYOCI_nyoci_plat_tls_func_h
#define NYOCI_nyoci_plat_tls_func_h
#if !defined(NYOCI_INCLUDED_FROM_LIBNYOCI_H) && !defined(BUILDING_LIBNYOCI)
#error "Do not include this header directly, include <libnyoci/libnyoci.h> instead"
@@ -29,8 +29,12 @@
#ifndef NYOCI_nyoci_plat_openssl_h
#define NYOCI_nyoci_plat_openssl_h
#include "libnyoci.h"
#if !defined(NYOCI_INCLUDED_FROM_LIBNYOCI_H) && !defined(BUILDING_LIBNYOCI)
#error "Do not include this header directly, include <libnyoci/libnyoci.h> instead"
#endif
#include "nyoci-plat-tls-func.h"
#include "nyoci-timer.h"
#include "btree.h"
#include <sys/types.h>

0 comments on commit ec4fc21

Please sign in to comment.