ci: Extract common "build_and_test" set of commands
@@ -5,33 +5,8 @@ executors:
docker:
- image: ethereum/cpp-build-env:10
-jobs:
-
- lint:
- executor: linux
- steps:
- - checkout
- - run:
- name: "Check code format"
- command: |
- clang-format --version
- find examples include lib test -name '*.hpp' -o -name '*.cpp' -o -name '*.h' -o -name '*.c' | xargs clang-format -i
- git diff --color --exit-code
- - run:
- name: "Run codespell"
- command: |
- codespell --quiet-level=4 --ignore-words=./.codespell-whitelist
- - run:
- name: "Check bumpversion"
- command: |
- export PATH="/home/builder/.local/bin:$PATH"
- pip3 install bumpversion
- bumpversion --dry-run --verbose major
- bumpversion --dry-run --verbose minor
- bumpversion --dry-run --verbose patch
-
- build: &build
- executor: linux
+commands:
+ build_and_test:
steps:
- checkout
- run:
@@ -71,31 +46,64 @@ jobs:
paths:
- test/evmc-vmtester
+jobs:
+
+ lint:
+ executor: linux
+ steps:
+ - checkout
+ - run:
+ name: "Check code format"
+ command: |
+ clang-format --version
+ find examples include lib test -name '*.hpp' -o -name '*.cpp' -o -name '*.h' -o -name '*.c' | xargs clang-format -i
+ git diff --color --exit-code
+ - run:
+ name: "Run codespell"
+ command: |
+ codespell --quiet-level=4 --ignore-words=./.codespell-whitelist
+ - run:
+ name: "Check bumpversion"
+ command: |
+ export PATH="/home/builder/.local/bin:$PATH"
+ pip3 install bumpversion
+ bumpversion --dry-run --verbose major
+ bumpversion --dry-run --verbose minor
+ bumpversion --dry-run --verbose patch
+
build-cxx17:
- <<: *build
+ executor: linux
environment:
CC: gcc-8
CXX: g++-8
CMAKE_OPTIONS: -DTOOLCHAIN=cxx17-pic
+ steps:
+ - build_and_test
build-cxx14-asan:
- <<: *build
+ executor: linux
environment:
CC: clang-8
CXX: clang++-8
CMAKE_OPTIONS: -DTOOLCHAIN=cxx14-pic -DSANITIZE=address
+ steps:
+ - build_and_test
build-gcc6:
- <<: *build
+ executor: linux
environment:
CC: gcc-6
CXX: g++-6
+ steps:
+ - build_and_test
build-clang38:
- <<: *build
+ executor: linux
environment:
CC: clang-3.8
CXX: clang++-3.8
+ steps:
+ - build_and_test
test-docs:
executor: linux
