mirror of https://github.com/status-im/evmc.git
82 lines
2.1 KiB
YAML
82 lines
2.1 KiB
YAML
version: 2
|
|
jobs:
|
|
|
|
build:
|
|
docker:
|
|
- image: ethereum/cpp-build-env
|
|
steps:
|
|
- checkout
|
|
- run:
|
|
name: "Configure"
|
|
working_directory: ~/build
|
|
command: cmake ../project -DCMAKE_INSTALL_PREFIX=~/install -DBUILD_SHARED_LIBS=ON -DEVMC_BUILD_EXAMPLES=ON -DEVMC_BUILD_TESTS=ON
|
|
- run:
|
|
name: "Build"
|
|
command: cmake --build ~/build
|
|
- run:
|
|
name: "Test"
|
|
command: cmake --build ~/build --target test
|
|
- run:
|
|
name: "Install"
|
|
command: cmake --build ~/build --target install
|
|
- run:
|
|
name: "Package"
|
|
command: |
|
|
cmake --build ~/build --target package
|
|
mkdir ~/package
|
|
mv ~/build/evmc-*.tar.gz ~/package
|
|
- store_artifacts:
|
|
path: ~/package
|
|
destination: package
|
|
- run:
|
|
name: "Run evmc-vmtester libevmc-examplevm.so"
|
|
command: ~/install/bin/evmc-vmtester ~/install/lib/libevmc-examplevm.so
|
|
|
|
test-docs:
|
|
docker:
|
|
- image: ethereum/cpp-build-env
|
|
steps:
|
|
- checkout
|
|
- run:
|
|
name: "Test documentation"
|
|
command: |
|
|
doxygen Doxyfile > doxygen.log 2> doxygen.warnings
|
|
if [ -s doxygen.warnings ]; then
|
|
printf '\n\nDoxygen warnings:\n\n'
|
|
cat doxygen.warnings
|
|
exit 1
|
|
fi
|
|
cat doxygen.log
|
|
|
|
upload-docs:
|
|
docker:
|
|
- image: ethereum/cpp-build-env
|
|
steps:
|
|
- checkout
|
|
- run:
|
|
name: "Generate documentation"
|
|
command: doxygen Doxyfile
|
|
- run:
|
|
name: "Upload documentation"
|
|
command: |
|
|
git config user.email "docs-bot@ethereum.org"
|
|
git config user.name "Documentation Bot"
|
|
git add --all
|
|
git commit -m "Update docs"
|
|
git push -f "https://$GITHUB_TOKEN@github.com/ethereum/evmc.git" HEAD:gh-pages
|
|
|
|
workflows:
|
|
version: 2
|
|
evmc:
|
|
jobs:
|
|
- build
|
|
- test-docs
|
|
- upload-docs:
|
|
requires:
|
|
- test-docs
|
|
filters:
|
|
branches:
|
|
only:
|
|
- master
|
|
- docs
|