aboutsummaryrefslogtreecommitdiff
path: root/.circleci
diff options
context:
space:
mode:
Diffstat (limited to '.circleci')
-rwxr-xr-x.circleci/build-and-test.sh4
-rwxr-xr-x.circleci/build-demos.sh13
-rw-r--r--.circleci/config.yml60
-rwxr-xr-x.circleci/run-cmake.sh11
4 files changed, 80 insertions, 8 deletions
diff --git a/.circleci/build-and-test.sh b/.circleci/build-and-test.sh
index 068f0f91..c4fb8eaa 100755
--- a/.circleci/build-and-test.sh
+++ b/.circleci/build-and-test.sh
@@ -4,12 +4,12 @@
# common build & test steps for CircleCI jobs
#
-uname -a
cmake --version
ninja --version
mkdir build
cd build
-cmake -G Ninja -DCMAKE_BUILD_TYPE=${BUILD_TYPE:-Debug} -DNNG_ENABLE_COVERAGE=${COVERAGE:-OFF} ..
+cmake -G Ninja -DCMAKE_BUILD_TYPE=${BUILD_TYPE:-Debug} -DNNG_ENABLE_COVERAGE=${COVERAGE:-OFF} -DBUILD_SHARED_LIBS=${SHARED_LIBS:=ON} ..
ninja
+ninja install
env CTEST_OUTPUT_ON_FAILURE=1 ninja test
diff --git a/.circleci/build-demos.sh b/.circleci/build-demos.sh
new file mode 100755
index 00000000..488c142d
--- /dev/null
+++ b/.circleci/build-demos.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+#
+# build the demos to make sure they all build cleanly
+#
+
+for dir in demo/*; do
+ demo=$(basename $dir)
+ mkdir build-demo-${demo}
+ ( cd build-demo-${demo} &&
+ cmake -G Ninja ../demo/${demo} &&
+ ninja ) || exit 1
+done
diff --git a/.circleci/config.yml b/.circleci/config.yml
index efe64900..2a3711f7 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -22,7 +22,6 @@ jobs:
- run: >
apt-get install -y --allow-unauthenticated
build-essential
- curl
asciidoctor
cmake
libmbedtls-dev
@@ -32,6 +31,52 @@ jobs:
- run: ./etc/format-check.sh
- run: ./.circleci/build-and-test.sh
+ "gcc - static":
+ docker:
+ - image: ubuntu:16.04
+ environment:
+ CC: gcc
+ CXX: g++
+ SHARED_LIBS: OFF
+ CTEST_OUTPUT_ON_FAILURE: 1
+ steps:
+ - checkout
+ - run: apt-get update -qq
+ - run: apt-get install -y software-properties-common
+ - run: add-apt-repository ppa:ubuntu-toolchain-r/test
+ - run: apt-get update -qq
+ - run: >
+ apt-get install -y --allow-unauthenticated
+ build-essential
+ cmake
+ libmbedtls-dev
+ ninja-build
+ - run: ./.circleci/build-and-test.sh
+
+ "gcc - demos":
+ docker:
+ - image: ubuntu:16.04
+ environment:
+ CC: gcc
+ CXX: g++
+ CTEST_OUTPUT_ON_FAILURE: 1
+ steps:
+ - checkout
+ - run: apt-get update -qq
+ - run: apt-get install -y software-properties-common
+ - run: add-apt-repository ppa:ubuntu-toolchain-r/test
+ - run: apt-get update -qq
+ - run: >
+ apt-get install -y --allow-unauthenticated
+ build-essential
+ cmake
+ libmbedtls-dev
+ ninja-build
+ - run: ./.circleci/run-cmake.sh
+ - run: ninja -C build
+ - run: ninja -C build install
+ - run: ./.circleci/build-demos.sh
+
"gcc - build, test, coverage":
docker:
- image: ubuntu:16.04
@@ -40,6 +85,7 @@ jobs:
CXX: g++-8
COVERAGE: "ON"
GCOV: gcov-8
+ CTEST_OUTPUT_ON_FAILURE: 1
steps:
- checkout
- run: apt-get update -qq
@@ -64,11 +110,13 @@ workflows:
build_and_test:
jobs:
- "clang - build, test"
+ - "gcc - static"
- "gcc - build, test, coverage"
+ - "gcc - demos"
-notify:
- webhooks:
- # A list of hook hashes, containing the url field
- # gitter hook
- - url: ${GITTER_WEBHOOK}
+#notify:
+# webhooks:
+# # A list of hook hashes, containing the url field
+# # gitter hook
+# - url: ${GITTER_WEBHOOK}
diff --git a/.circleci/run-cmake.sh b/.circleci/run-cmake.sh
new file mode 100755
index 00000000..ca0caaa4
--- /dev/null
+++ b/.circleci/run-cmake.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+#
+# common build & test steps for CircleCI jobs
+#
+cmake --version
+ninja --version
+
+mkdir build
+cd build
+cmake -G Ninja -DCMAKE_BUILD_TYPE=${BUILD_TYPE:-Debug} -DNNG_ENABLE_COVERAGE=${COVERAGE:-OFF} -DBUILD_SHARED_LIBS=${SHARED_LIBS:=ON} ..