2018-04-03 15:34:38 +00:00
|
|
|
defaults:
|
|
|
|
# The default for tags is to not run, so we have to explicitly match a filter.
|
|
|
|
- build_on_tags: &build_on_tags
|
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
2018-05-02 13:42:34 +00:00
|
|
|
- setup_prerelease_commit_hash: &setup_prerelease_commit_hash
|
2018-04-26 11:38:20 +00:00
|
|
|
name: Store commit hash and prerelease
|
|
|
|
command: |
|
|
|
|
if [ "$CIRCLE_BRANCH" = release -o -n "$CIRCLE_TAG" ]; then echo -n > prerelease.txt; else date -u +"nightly.%Y.%-m.%-d" > prerelease.txt; fi
|
|
|
|
echo -n "$CIRCLE_SHA1" > commit_hash.txt
|
|
|
|
- run_build: &run_build
|
|
|
|
name: Build
|
|
|
|
command: |
|
|
|
|
mkdir -p build
|
|
|
|
cd build
|
2018-11-28 13:24:02 +00:00
|
|
|
[ -n "$COVERAGE" -a "$CIRCLE_BRANCH" != release -a -z "$CIRCLE_TAG" ] && CMAKE_OPTIONS="$CMAKE_OPTIONS -DCOVERAGE=ON"
|
2018-12-18 15:19:50 +00:00
|
|
|
cmake .. -DCMAKE_BUILD_TYPE=Release $CMAKE_OPTIONS
|
2018-04-26 11:38:20 +00:00
|
|
|
make -j4
|
|
|
|
- run_tests: &run_tests
|
|
|
|
name: Tests
|
|
|
|
command: scripts/tests.sh --junit_report test_results
|
2018-05-02 13:42:34 +00:00
|
|
|
- solc_artifact: &solc_artifact
|
2018-04-26 11:38:20 +00:00
|
|
|
path: build/solc/solc
|
|
|
|
destination: solc
|
2018-05-02 13:42:34 +00:00
|
|
|
- all_artifacts: &all_artifacts
|
2018-04-26 11:38:20 +00:00
|
|
|
root: build
|
|
|
|
paths:
|
|
|
|
- solc/solc
|
|
|
|
- test/soltest
|
|
|
|
- test/tools/solfuzzer
|
2018-04-03 15:34:38 +00:00
|
|
|
|
2017-08-16 19:20:46 +00:00
|
|
|
version: 2
|
|
|
|
jobs:
|
2018-02-08 15:12:04 +00:00
|
|
|
build_emscripten:
|
2017-08-16 19:20:46 +00:00
|
|
|
docker:
|
2019-01-18 16:49:21 +00:00
|
|
|
- image: trzeci/emscripten:sdk-tag-1.38.22-64bit
|
2018-05-10 12:43:08 +00:00
|
|
|
environment:
|
|
|
|
TERM: xterm
|
2017-08-16 19:20:46 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
2017-09-14 21:13:37 +00:00
|
|
|
- restore_cache:
|
|
|
|
name: Restore Boost build
|
|
|
|
key: &boost-cache-key emscripten-boost-{{ checksum "scripts/travis-emscripten/install_deps.sh" }}{{ checksum "scripts/travis-emscripten/build_emscripten.sh" }}
|
|
|
|
- run:
|
|
|
|
name: Bootstrap Boost
|
|
|
|
command: |
|
|
|
|
scripts/travis-emscripten/install_deps.sh
|
|
|
|
- run:
|
|
|
|
name: Build
|
|
|
|
command: |
|
|
|
|
scripts/travis-emscripten/build_emscripten.sh
|
|
|
|
- save_cache:
|
|
|
|
name: Save Boost build
|
|
|
|
key: *boost-cache-key
|
|
|
|
paths:
|
2019-01-07 09:55:52 +00:00
|
|
|
- boost_1_68_0
|
2018-02-08 22:43:05 +00:00
|
|
|
- store_artifacts:
|
|
|
|
path: build/libsolc/soljson.js
|
|
|
|
destination: soljson.js
|
|
|
|
- run: mkdir -p workspace
|
|
|
|
- run: cp build/libsolc/soljson.js workspace/soljson.js
|
2018-02-09 17:08:29 +00:00
|
|
|
- run: scripts/get_version.sh > workspace/version.txt
|
2018-02-08 22:43:05 +00:00
|
|
|
- persist_to_workspace:
|
|
|
|
root: workspace
|
|
|
|
paths:
|
|
|
|
- soljson.js
|
2018-02-09 17:08:29 +00:00
|
|
|
- version.txt
|
2018-02-09 16:21:36 +00:00
|
|
|
test_emscripten_solcjs:
|
2018-02-08 22:43:05 +00:00
|
|
|
docker:
|
2018-12-14 22:15:09 +00:00
|
|
|
- image: circleci/node:10
|
2018-05-10 12:43:08 +00:00
|
|
|
environment:
|
|
|
|
TERM: xterm
|
2018-02-08 22:43:05 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- attach_workspace:
|
|
|
|
at: /tmp/workspace
|
|
|
|
- run:
|
|
|
|
name: Install external tests deps
|
|
|
|
command: |
|
2018-02-09 16:21:36 +00:00
|
|
|
node --version
|
|
|
|
npm --version
|
2018-02-08 22:43:05 +00:00
|
|
|
- run:
|
2018-02-09 16:21:36 +00:00
|
|
|
name: Test solcjs
|
2018-02-08 22:43:05 +00:00
|
|
|
command: |
|
2018-02-09 17:08:29 +00:00
|
|
|
test/solcjsTests.sh /tmp/workspace/soljson.js $(cat /tmp/workspace/version.txt)
|
2018-02-09 16:21:36 +00:00
|
|
|
test_emscripten_external:
|
|
|
|
docker:
|
2018-12-14 22:15:09 +00:00
|
|
|
- image: circleci/node:10
|
2018-05-10 12:43:08 +00:00
|
|
|
environment:
|
|
|
|
TERM: xterm
|
2018-02-09 16:21:36 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- attach_workspace:
|
|
|
|
at: /tmp/workspace
|
|
|
|
- run:
|
|
|
|
name: Install external tests deps
|
|
|
|
command: |
|
2018-02-08 22:43:05 +00:00
|
|
|
node --version
|
|
|
|
npm --version
|
2017-09-14 21:13:37 +00:00
|
|
|
- run:
|
2018-02-09 16:21:36 +00:00
|
|
|
name: External tests
|
2017-09-14 21:13:37 +00:00
|
|
|
command: |
|
2018-02-22 14:35:44 +00:00
|
|
|
test/externalTests.sh /tmp/workspace/soljson.js || test/externalTests.sh /tmp/workspace/soljson.js
|
2018-04-26 11:38:20 +00:00
|
|
|
build_x86_linux:
|
2018-02-08 15:12:04 +00:00
|
|
|
docker:
|
2019-01-14 11:21:06 +00:00
|
|
|
- image: buildpack-deps:bionic
|
2018-05-10 12:43:08 +00:00
|
|
|
environment:
|
|
|
|
TERM: xterm
|
2018-11-28 13:24:02 +00:00
|
|
|
COVERAGE: "ON"
|
2018-02-08 15:12:04 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- run:
|
|
|
|
name: Install build dependencies
|
|
|
|
command: |
|
|
|
|
apt-get -qq update
|
2018-03-15 22:06:19 +00:00
|
|
|
apt-get -qy install cmake libboost-regex-dev libboost-filesystem-dev libboost-test-dev libboost-system-dev libboost-program-options-dev libz3-dev
|
2018-05-05 15:37:45 +00:00
|
|
|
./scripts/install_obsolete_jsoncpp_1_7_4.sh
|
2018-05-02 13:42:34 +00:00
|
|
|
- run: *setup_prerelease_commit_hash
|
|
|
|
- run: *run_build
|
|
|
|
- store_artifacts: *solc_artifact
|
2018-07-23 10:19:30 +00:00
|
|
|
- persist_to_workspace:
|
|
|
|
root: build
|
|
|
|
paths:
|
|
|
|
- "*"
|
2018-04-26 11:38:20 +00:00
|
|
|
|
2018-11-08 13:28:25 +00:00
|
|
|
build_x86_archlinux:
|
|
|
|
docker:
|
|
|
|
- image: archlinux/base
|
|
|
|
environment:
|
|
|
|
TERM: xterm
|
|
|
|
steps:
|
|
|
|
- run:
|
|
|
|
name: Install build dependencies
|
|
|
|
command: |
|
|
|
|
pacman --noconfirm -Syu --noprogressbar --needed base-devel boost cmake z3 cvc4 git openssh tar
|
|
|
|
- checkout
|
|
|
|
- run: *setup_prerelease_commit_hash
|
|
|
|
- run: *run_build
|
|
|
|
- store_artifacts: *solc_artifact
|
|
|
|
- persist_to_workspace:
|
|
|
|
root: build
|
|
|
|
paths:
|
|
|
|
- solc/solc
|
|
|
|
- test/soltest
|
|
|
|
- test/tools/solfuzzer
|
|
|
|
|
2018-10-16 12:21:18 +00:00
|
|
|
build_x86_clang7:
|
|
|
|
docker:
|
|
|
|
- image: buildpack-deps:cosmic
|
|
|
|
environment:
|
|
|
|
TERM: xterm
|
|
|
|
CC: /usr/bin/clang-7
|
|
|
|
CXX: /usr/bin/clang++-7
|
2018-11-13 14:35:46 +00:00
|
|
|
CMAKE_OPTIONS: -DLLL=ON
|
2018-10-16 12:21:18 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- run:
|
|
|
|
name: Install build dependencies
|
|
|
|
command: |
|
|
|
|
apt-get -qq update
|
|
|
|
apt-get -qy install clang-7 cmake libboost-regex-dev libboost-filesystem-dev libboost-test-dev libboost-system-dev libboost-program-options-dev libz3-dev
|
|
|
|
./scripts/install_obsolete_jsoncpp_1_7_4.sh
|
|
|
|
- run: *setup_prerelease_commit_hash
|
|
|
|
- run: *run_build
|
|
|
|
- store_artifacts: *solc_artifact
|
|
|
|
- persist_to_workspace:
|
|
|
|
root: build
|
|
|
|
paths:
|
|
|
|
- "*"
|
|
|
|
|
2018-04-26 11:38:20 +00:00
|
|
|
build_x86_mac:
|
|
|
|
macos:
|
2018-10-02 14:40:27 +00:00
|
|
|
xcode: "10.0.0"
|
2018-05-10 12:43:08 +00:00
|
|
|
environment:
|
|
|
|
TERM: xterm
|
2018-11-13 14:35:46 +00:00
|
|
|
CMAKE_OPTIONS: -DLLL=ON
|
2018-04-26 11:38:20 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- run:
|
|
|
|
name: Install build dependencies
|
2018-03-05 21:56:35 +00:00
|
|
|
command: |
|
2018-04-26 11:38:20 +00:00
|
|
|
brew update
|
|
|
|
brew upgrade
|
|
|
|
brew unlink python
|
|
|
|
brew install z3
|
|
|
|
brew install boost
|
|
|
|
brew install cmake
|
2018-05-05 15:37:45 +00:00
|
|
|
brew install wget
|
|
|
|
./scripts/install_obsolete_jsoncpp_1_7_4.sh
|
2018-05-02 13:42:34 +00:00
|
|
|
- run: *setup_prerelease_commit_hash
|
|
|
|
- run: *run_build
|
|
|
|
- store_artifacts: *solc_artifact
|
|
|
|
- persist_to_workspace: *all_artifacts
|
2018-02-26 18:33:03 +00:00
|
|
|
|
2018-07-10 07:15:39 +00:00
|
|
|
test_check_spelling:
|
|
|
|
docker:
|
|
|
|
- image: circleci/python:3.6
|
|
|
|
environment:
|
|
|
|
TERM: xterm
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- attach_workspace:
|
|
|
|
at: build
|
|
|
|
- run:
|
|
|
|
name: Install dependencies
|
|
|
|
command: |
|
|
|
|
pip install --user codespell
|
|
|
|
- run:
|
|
|
|
name: Check spelling
|
|
|
|
command: ~/.local/bin/codespell -S "*.enc,.git" -I ./scripts/codespell_whitelist.txt
|
|
|
|
|
2018-09-20 10:01:51 +00:00
|
|
|
test_check_style:
|
2018-09-04 15:17:07 +00:00
|
|
|
docker:
|
2019-01-14 11:21:06 +00:00
|
|
|
- image: buildpack-deps:bionic
|
2018-09-04 15:17:07 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- run:
|
|
|
|
name: Check for trailing whitespace
|
2018-09-20 10:01:51 +00:00
|
|
|
command: ./scripts/check_style.sh
|
2018-09-04 15:17:07 +00:00
|
|
|
|
2018-08-03 11:55:44 +00:00
|
|
|
test_buglist:
|
2018-08-21 14:09:53 +00:00
|
|
|
docker:
|
|
|
|
- image: circleci/node
|
|
|
|
environment:
|
|
|
|
TERM: xterm
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- run:
|
|
|
|
name: JS deps
|
|
|
|
command: |
|
|
|
|
npm install download
|
|
|
|
npm install JSONPath
|
|
|
|
npm install mktemp
|
|
|
|
- run:
|
|
|
|
name: Test buglist
|
|
|
|
command: ./test/buglistTests.js
|
2018-08-03 11:55:44 +00:00
|
|
|
|
2018-04-26 11:38:20 +00:00
|
|
|
test_x86_linux:
|
2018-02-26 18:33:03 +00:00
|
|
|
docker:
|
2019-01-14 11:21:06 +00:00
|
|
|
- image: buildpack-deps:bionic
|
2018-05-10 12:43:08 +00:00
|
|
|
environment:
|
|
|
|
TERM: xterm
|
2018-02-26 18:33:03 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- attach_workspace:
|
|
|
|
at: build
|
|
|
|
- run:
|
|
|
|
name: Install dependencies
|
|
|
|
command: |
|
|
|
|
apt-get -qq update
|
2018-07-23 11:29:55 +00:00
|
|
|
apt-get -qy install libz3-dev libleveldb1v5 python-pip
|
|
|
|
pip install codecov
|
2018-02-08 23:36:05 +00:00
|
|
|
- run: mkdir -p test_results
|
2018-07-23 11:29:55 +00:00
|
|
|
- run:
|
|
|
|
name: Test type checker
|
|
|
|
command: build/test/soltest -t 'syntaxTest*' -- --no-ipc --testpath test
|
|
|
|
- run:
|
|
|
|
name: Coverage of type checker
|
2018-07-24 20:27:08 +00:00
|
|
|
command: codecov --flags syntax --gcov-root build
|
2018-05-02 13:42:34 +00:00
|
|
|
- run: *run_tests
|
2018-07-23 11:29:55 +00:00
|
|
|
- run:
|
|
|
|
name: Coverage of all
|
|
|
|
command: codecov --flags all --gcov-root build
|
2018-04-26 11:38:20 +00:00
|
|
|
- store_test_results:
|
|
|
|
path: test_results/
|
2018-10-11 15:01:06 +00:00
|
|
|
- store_artifacts:
|
|
|
|
path: test_results/
|
|
|
|
destination: test_results/
|
2018-04-26 11:38:20 +00:00
|
|
|
|
2018-11-08 13:28:25 +00:00
|
|
|
test_x86_archlinux:
|
|
|
|
docker:
|
|
|
|
- image: archlinux/base
|
|
|
|
environment:
|
|
|
|
TERM: xterm
|
|
|
|
steps:
|
|
|
|
- run:
|
|
|
|
name: Install dependencies
|
|
|
|
command: |
|
2018-11-08 18:38:13 +00:00
|
|
|
pacman --noconfirm -Syu --noprogressbar --needed boost z3 cvc4 git openssh tar
|
2018-11-08 13:28:25 +00:00
|
|
|
- checkout
|
|
|
|
- attach_workspace:
|
|
|
|
at: build
|
|
|
|
- run: mkdir -p test_results
|
2018-11-08 18:38:13 +00:00
|
|
|
- run: build/test/soltest --logger=JUNIT,test_suite,test_results/result.xml -- --no-ipc --testpath test
|
2018-11-08 13:28:25 +00:00
|
|
|
- store_test_results:
|
|
|
|
path: test_results/
|
|
|
|
- store_artifacts:
|
|
|
|
path: test_results/
|
|
|
|
destination: test_results/
|
|
|
|
|
2018-04-26 11:38:20 +00:00
|
|
|
test_x86_mac:
|
|
|
|
macos:
|
2018-10-02 14:40:27 +00:00
|
|
|
xcode: "10.0.0"
|
2018-05-10 12:43:08 +00:00
|
|
|
environment:
|
|
|
|
TERM: xterm
|
2018-04-26 11:38:20 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- attach_workspace:
|
|
|
|
at: build
|
|
|
|
- run:
|
|
|
|
name: Install dependencies
|
|
|
|
command: |
|
|
|
|
brew update
|
|
|
|
brew upgrade
|
|
|
|
brew unlink python
|
|
|
|
brew install z3
|
|
|
|
- run: mkdir -p test_results
|
2018-05-02 13:42:34 +00:00
|
|
|
- run: *run_tests
|
2018-02-08 23:36:05 +00:00
|
|
|
- store_test_results:
|
|
|
|
path: test_results/
|
2018-10-11 15:01:06 +00:00
|
|
|
- store_artifacts:
|
|
|
|
path: test_results/
|
|
|
|
destination: test_results/
|
2018-02-08 15:12:04 +00:00
|
|
|
|
2018-02-19 16:20:30 +00:00
|
|
|
docs:
|
|
|
|
docker:
|
2019-01-14 11:21:06 +00:00
|
|
|
- image: buildpack-deps:bionic
|
|
|
|
environment:
|
|
|
|
DEBIAN_FRONTEND: noninteractive
|
2018-02-19 16:20:30 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- run:
|
|
|
|
name: Install build dependencies
|
|
|
|
command: |
|
|
|
|
apt-get -qq update
|
2018-05-23 14:16:59 +00:00
|
|
|
apt-get -qy install python-sphinx python-pip
|
2018-05-02 13:42:34 +00:00
|
|
|
- run: *setup_prerelease_commit_hash
|
2018-02-19 16:20:30 +00:00
|
|
|
- run:
|
|
|
|
name: Build documentation
|
|
|
|
command: ./scripts/docs.sh
|
|
|
|
- store_artifacts:
|
|
|
|
path: docs/_build/html/
|
|
|
|
destination: docs-html
|
|
|
|
|
2018-02-08 15:12:04 +00:00
|
|
|
workflows:
|
|
|
|
version: 2
|
|
|
|
build_all:
|
|
|
|
jobs:
|
2018-07-10 07:15:39 +00:00
|
|
|
- test_check_spelling: *build_on_tags
|
2018-09-20 10:01:51 +00:00
|
|
|
- test_check_style: *build_on_tags
|
2018-08-03 11:55:44 +00:00
|
|
|
- test_buglist: *build_on_tags
|
2018-04-03 15:34:38 +00:00
|
|
|
- build_emscripten: *build_on_tags
|
2018-02-09 16:21:36 +00:00
|
|
|
- test_emscripten_solcjs:
|
2018-04-03 15:34:38 +00:00
|
|
|
<<: *build_on_tags
|
2018-02-09 16:21:36 +00:00
|
|
|
requires:
|
|
|
|
- build_emscripten
|
|
|
|
- test_emscripten_external:
|
2018-04-03 15:34:38 +00:00
|
|
|
<<: *build_on_tags
|
2018-02-08 22:43:05 +00:00
|
|
|
requires:
|
|
|
|
- build_emscripten
|
2018-04-26 11:38:20 +00:00
|
|
|
- build_x86_linux: *build_on_tags
|
2018-10-16 12:21:18 +00:00
|
|
|
- build_x86_clang7: *build_on_tags
|
2018-04-26 11:38:20 +00:00
|
|
|
- build_x86_mac: *build_on_tags
|
|
|
|
- test_x86_linux:
|
|
|
|
<<: *build_on_tags
|
|
|
|
requires:
|
|
|
|
- build_x86_linux
|
|
|
|
- test_x86_mac:
|
2018-04-03 15:34:38 +00:00
|
|
|
<<: *build_on_tags
|
2018-02-26 18:33:03 +00:00
|
|
|
requires:
|
2018-04-26 11:38:20 +00:00
|
|
|
- build_x86_mac
|
2018-04-03 15:34:38 +00:00
|
|
|
- docs: *build_on_tags
|
2018-11-08 13:28:25 +00:00
|
|
|
- build_x86_archlinux: *build_on_tags
|
|
|
|
- test_x86_archlinux:
|
|
|
|
<<: *build_on_tags
|
|
|
|
requires:
|
|
|
|
- build_x86_archlinux
|