Merge pull request #7477 from ethereum/add-clang-ci

Add clang build and test CIs
This commit is contained in:
chriseth 2019-10-01 13:55:37 +02:00 committed by GitHub
commit a8ffbc78c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 42 additions and 6 deletions

View File

@ -115,6 +115,17 @@ defaults:
- store_test_results: *store_test_results
- store_artifacts: *artifacts_test_results
- test_ubuntu1904_clang: &test_ubuntu1904_clang
docker:
- image: ethereum/solidity-buildpack-deps:ubuntu1904-clang
steps:
- checkout
- attach_workspace:
at: build
- run: *run_soltest
- store_test_results: *store_test_results
- store_artifacts: *artifacts_test_results
- test_ubuntu1904_all: &test_ubuntu1904
docker:
- image: ethereum/solidity-buildpack-deps:ubuntu1904
@ -151,6 +162,11 @@ defaults:
requires:
- b_ubu
- workflow_ubuntu1904_clang: &workflow_ubuntu1904_clang
<<: *workflow_trigger_on_tags
requires:
- b_ubu_clang
- workflow_ubuntu1904_release: &workflow_ubuntu1904_release
<<: *workflow_trigger_on_tags
requires:
@ -280,6 +296,18 @@ jobs:
pip install --user z3-solver
- run: *run_proofs
b_ubu_clang: &build_ubuntu1904_clang
docker:
- image: ethereum/solidity-buildpack-deps:ubuntu1904-clang
environment:
CC: clang
CXX: clang++
steps:
- checkout
- run: *run_build
- store_artifacts: *artifacts_solc
- persist_to_workspace: *artifacts_executables
b_ubu: &build_ubuntu1904
docker:
- image: ethereum/solidity-buildpack-deps:ubuntu1904
@ -349,11 +377,11 @@ jobs:
- run: *run_build
b_ubu_ossfuzz:
<<: *build_ubuntu1904
<<: *build_ubuntu1904_clang
environment:
TERM: xterm
CC: /usr/bin/clang-8
CXX: /usr/bin/clang++-8
CC: clang
CXX: clang++
CMAKE_OPTIONS: -DCMAKE_TOOLCHAIN_FILE=cmake/toolchains/libfuzzer.cmake
steps:
- checkout
@ -362,7 +390,7 @@ jobs:
- persist_to_workspace: *artifacts_executables_ossfuzz
t_ubu_ossfuzz: &t_ubu_ossfuzz
<<: *test_ubuntu1904
<<: *test_ubuntu1904_clang
steps:
- checkout
- attach_workspace:
@ -495,6 +523,12 @@ jobs:
t_ubu_soltest: &t_ubu_soltest
<<: *test_ubuntu1904
t_ubu_clang_soltest: &t_ubu_clang_soltest
<<: *test_ubuntu1904_clang
environment:
EVM: constantinople
OPTIMIZE: 0
t_ubu_release_soltest: &t_ubu_release_soltest
<<: *t_ubu_soltest
@ -632,6 +666,8 @@ workflows:
- b_ubu18: *workflow_trigger_on_tags
- t_ubu_cli: *workflow_ubuntu1904
- t_ubu_soltest: *workflow_ubuntu1904
- b_ubu_clang: *workflow_trigger_on_tags
- t_ubu_clang_soltest: *workflow_ubuntu1904_clang
# Ubuntu fake release build and tests
- b_ubu_release: *workflow_trigger_on_tags

View File

@ -1,7 +1,7 @@
# Inherit default options
include("${CMAKE_CURRENT_LIST_DIR}/default.cmake")
# Disable Z3 and CVC4 since none of the existing fuzzers need them
set(USE_Z3 OFF CACHE BOOL "Disable Z3" FORCE)
# Enable Z3, disable CVC4
set(USE_Z3 ON CACHE BOOL "Enable Z3" FORCE)
set(USE_CVC4 OFF CACHE BOOL "Disable CVC4" FORCE)
# Build fuzzing binaries
set(OSSFUZZ ON CACHE BOOL "Enable fuzzer build" FORCE)