diff --git a/.travis.yml b/.travis.yml index a7db5016..7646226a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,6 +9,7 @@ os: env: - BUILD_TYPE=default - BUILD_TYPE=android +- BUILD_TYPE=tweetnacl sudo: false diff --git a/builds/tweetnacl/ci_build.sh b/builds/tweetnacl/ci_build.sh new file mode 100755 index 00000000..e59c10f0 --- /dev/null +++ b/builds/tweetnacl/ci_build.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env bash + +set -x + +mkdir tmp +BUILD_PREFIX=$PWD/tmp + +CONFIG_OPTS=() +CONFIG_OPTS+=("CFLAGS=-I${BUILD_PREFIX}/include") +CONFIG_OPTS+=("CPPFLAGS=-I${BUILD_PREFIX}/include") +CONFIG_OPTS+=("CXXFLAGS=-I${BUILD_PREFIX}/include") +CONFIG_OPTS+=("LDFLAGS=-L${BUILD_PREFIX}/lib") +CONFIG_OPTS+=("PKG_CONFIG_PATH=${BUILD_PREFIX}/lib/pkgconfig") +CONFIG_OPTS+=("--prefix=${BUILD_PREFIX}") + +# Build and check this project +( + cd ../..; + ./autogen.sh && + ./configure "${CONFIG_OPTS[@]}" --with-tweetnacl=yes && + make && + ( if make check; then true; else cat test-suite.log; exit 1; fi ) && + make install +) || exit 1