summaryrefslogtreecommitdiff
path: root/.circleci/config.yml
blob: c25b7ddbfe9a1d4ecfa1af476865b44ba4354666 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#
# 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"