summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2018-05-23 13:27:52 -0700
committerGarrett D'Amore <garrett@damore.org>2018-05-23 13:27:52 -0700
commitcf02b1520e43f5354b8427c847e9d4cbf8692c74 (patch)
tree78578bfc6a636dc3a01376afa4502f8f9ffa5810
parent4f4ac6691daf6ee0509f346bed6d0cae4ec4f45c (diff)
downloadnanomsg-cf02b1520e43f5354b8427c847e9d4cbf8692c74.tar.gz
fixes #973 Activate CircleCI for legacy nanomsg
This adds initial plumbing for CircleCI. Follow up changes may be required.
-rwxr-xr-x.circleci/build-and-test.sh15
-rw-r--r--.circleci/config.yml62
2 files changed, 77 insertions, 0 deletions
diff --git a/.circleci/build-and-test.sh b/.circleci/build-and-test.sh
new file mode 100755
index 0000000..b99c5e3
--- /dev/null
+++ b/.circleci/build-and-test.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+#
+# 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} -DNN_ENABLE_COVERAGE=${COVERAGE:-OFF} ..
+ninja
+env CTEST_OUTPUT_ON_FAILURE=1 ninja test
diff --git a/.circleci/config.yml b/.circleci/config.yml
new file mode 100644
index 0000000..d3a4207
--- /dev/null
+++ b/.circleci/config.yml
@@ -0,0 +1,62 @@
+#
+# CircleCI 2.0 configuration. This was borrowed from NNG, but is adjusted
+# for libnanomsg. (We don't need mbedTLS or use clang-format, for example.)
+#
+version: 2.0
+jobs:
+ "clang - build, test"
+ docker:
+ - image: ubuntu:16.04
+ environment:
+ CC: clang-6.0
+ CXX: clang++-6.0
+ CTEST_OUTPUT_ON_FAILURE: 1
+ steps:
+ - checkout
+ - run: apt-get update -qq
+ - run: apt-get install -y software-properties-common
+ - run: apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-
+xenial-6.0 main"
+ - run: apt-get update -qq
+ - run: >
+ apt-get install -y --allow-unauthenticated
+ build-essential
+ curl
+ asciidoctor
+ cmake
+ ninja-build
+ clang-6.0
+ - run: ./.circleci/build-and-test.sh
+
+ "gcc - build, test, coverage":
+ docker:
+ - image: ubuntu:16.04
+ environment:
+ CC: gcc-8
+ CXX: g++-8
+ COVERAGE: "ON"
+ GCOV: gcov-8
+ 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
+ curl
+ asciidoctor
+ cmake
+ ninja-build
+ gcc-8
+ g++-8
+ - run: ./.circleci/build-and-test.sh
+ - run: ./etc/codecov.sh
+
+workflows:
+ version: 2
+ build_and_test:
+ jobs:
+ - "clang - build, test"
+ - "gcc - build, test, coverage"