evmc/circle.yml

201 lines
5.2 KiB
YAML
Raw Normal View History

2018-03-28 13:20:39 +00:00
version: 2
jobs:
lint:
docker:
- image: ethereum/cpp-build-env:10
steps:
- checkout
- run:
name: "Check code format"
command: |
2019-03-11 11:54:12 +00:00
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
2018-09-06 10:20:00 +00:00
- run:
name: "Run codespell"
command: |
codespell --quiet-level=4 --ignore-words=./.codespell-whitelist
2018-09-06 10:20:00 +00:00
build: &build
2018-03-28 13:20:39 +00:00
docker:
- image: ethereum/cpp-build-env:10
2018-03-28 13:20:39 +00:00
steps:
- checkout
- run:
name: "Environment"
command: |
CC=${CC:-cc}
CXX=${CXX:-cpp}
echo CC: $CC
echo CXX: $CXX
$CC --version
$CXX --version
cmake --version
2018-03-28 13:20:39 +00:00
- run:
name: "Configure"
working_directory: ~/build
2019-03-14 16:55:07 +00:00
command: cmake ../project -DCMAKE_INSTALL_PREFIX=~/install -DBUILD_SHARED_LIBS=ON -DEVMC_TESTING=ON $CMAKE_OPTIONS
2018-03-28 13:20:39 +00:00
- run:
name: "Build"
command: cmake --build ~/build
2018-06-08 11:03:14 +00:00
- run:
name: "Unit tests"
working_directory: ~/build/test
command: ./evmc-test
2018-04-11 10:55:01 +00:00
- run:
name: "Test"
command: cmake --build ~/build --target test
2018-04-11 13:19:41 +00:00
- run:
name: "Install"
command: cmake --build ~/build --target install
2018-04-18 14:32:24 +00:00
- run:
name: "Package"
command: |
cmake --build ~/build --target package
mkdir ~/package
mv ~/build/evmc-*.tar.gz ~/package
- store_artifacts:
path: ~/package
destination: package
2018-06-19 09:41:51 +00:00
- run:
name: "Test CMake package config"
command: |
mkdir ~/build-example-evmc && cd ~/build-example-evmc
cmake ~/project/examples/use_evmc_in_cmake -DCMAKE_PREFIX_PATH=~/install
cmake --build .
mkdir ~/build-example-instructions && cd ~/build-example-instructions
cmake ~/project/examples/use_instructions_in_cmake -DCMAKE_PREFIX_PATH=~/install
cmake --build .
2018-04-11 13:19:41 +00:00
- run:
2018-08-30 16:27:44 +00:00
name: "Run evmc-vmtester libevmc-example-vm.so"
command: ~/install/bin/evmc-vmtester ~/install/lib/libevmc-example-vm.so
2018-03-28 13:20:39 +00:00
build-cxx17:
<<: *build
environment:
CC: gcc-8
CXX: g++-8
CMAKE_OPTIONS: -DTOOLCHAIN=cxx17-pic
build-cxx14:
2018-08-28 09:06:53 +00:00
<<: *build
environment:
CC: clang-8
CXX: clang++-8
CMAKE_OPTIONS: -DTOOLCHAIN=cxx14-pic
build-gcc6:
<<: *build
environment:
CC: gcc-6
CXX: g++-6
build-clang3.8:
<<: *build
environment:
CC: clang-3.8
CXX: clang++-3.8
2018-08-28 09:06:53 +00:00
2018-03-28 15:01:47 +00:00
test-docs:
2018-03-28 14:16:28 +00:00
docker:
- image: ethereum/cpp-build-env:10
2018-03-28 14:16:28 +00:00
steps:
- checkout
- run:
2018-03-28 15:01:47 +00:00
name: "Test documentation"
2018-03-28 14:16:28 +00:00
command: |
2018-08-13 19:01:54 +00:00
cat Doxyfile | sed 's/HTML_OUTPUT = ./HTML_OUTPUT = ..\/docs/' | doxygen - > doxygen.log 2> doxygen.warnings
2018-03-28 14:16:28 +00:00
if [ -s doxygen.warnings ]; then
printf '\n\nDoxygen warnings:\n\n'
cat doxygen.warnings
exit 1
fi
cat doxygen.log
2018-08-13 19:01:54 +00:00
- store_artifacts:
path: ~/docs
destination: docs
2018-03-28 14:16:28 +00:00
2018-03-28 15:01:47 +00:00
upload-docs:
docker:
- image: ethereum/cpp-build-env:10
2018-03-28 15:01:47 +00:00
steps:
- checkout
- run:
name: "Generate documentation"
2018-03-28 20:17:41 +00:00
command: doxygen Doxyfile
2018-03-28 15:01:47 +00:00
- run:
name: "Upload documentation"
command: |
git config user.email "docs-bot@ethereum.org"
git config user.name "Documentation Bot"
2018-03-28 20:17:41 +00:00
git add --all
2018-03-28 15:01:47 +00:00
git commit -m "Update docs"
git push -f "https://$GITHUB_TOKEN@github.com/ethereum/evmc.git" HEAD:gh-pages
bindings-go-latest:
2018-08-20 10:15:09 +00:00
docker:
- image: circleci/golang
2018-08-20 10:15:09 +00:00
steps: &bindings-go-steps
- checkout
- run:
name: "Go Build"
command: |
go get -v github.com/ethereum/go-ethereum/common
go build -v ./bindings/go/evmc
go vet -v ./bindings/go/evmc
2019-03-12 12:53:07 +00:00
go generate -v ./bindings/go/evmc
go test -v ./bindings/go/evmc
2018-08-20 10:15:09 +00:00
bindings-go-min:
2018-08-20 10:15:09 +00:00
docker:
- image: circleci/golang:1.9
steps: *bindings-go-steps
2019-03-13 13:37:59 +00:00
bindings-rust:
docker:
- image: rust:1
steps:
- checkout
- run:
name: Update environment
command: |
apt update
apt -y install libclang-dev clang
rustup component add rustfmt
rustup update
- run:
name: Check formatting
command: |
rustfmt --version
cargo fmt --all -- --check
- run:
name: Build
command: cargo build
- run:
name: Test
command: cargo test
2018-08-20 10:15:09 +00:00
2018-03-28 13:20:39 +00:00
workflows:
version: 2
evmc:
jobs:
- lint
- build-cxx17
- build-cxx14
- build-gcc6
- build-clang3.8
- bindings-go-latest
- bindings-go-min
2019-03-13 13:37:59 +00:00
- bindings-rust
2018-03-28 15:01:47 +00:00
- test-docs
- upload-docs:
requires:
- test-docs
filters:
branches:
only:
- master
- docs