Travis optimize (#1775)

* Travis optimize
This commit is contained in:
proller 2018-01-16 16:44:45 +03:00 committed by GitHub
parent d97b2edc7c
commit e8f2bb2d3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 21 additions and 11 deletions

View File

@ -35,7 +35,7 @@ matrix:
packages: [ g++-7, clang-5.0, libicu-dev, libreadline-dev, libmysqlclient-dev, unixodbc-dev, libltdl-dev, libssl-dev, libboost-dev, zlib1g-dev, libdouble-conversion-dev, libzookeeper-mt-dev, libsparsehash-dev, librdkafka-dev, libcapnp-dev, libsparsehash-dev, libgoogle-perftools-dev, bash, expect, python, python-lxml, python-termcolor, curl, perl, sudo ]
env:
- MATRIX_EVAL="CC=clang-5.0 && CXX=clang++-5.0
- MATRIX_EVAL="CC=clang-5.0 && CXX=clang++-5.0"
before_script:
# fix gcc after clang

View File

@ -149,9 +149,6 @@ def main(args):
report_testcase = et.Element("testcase", attrib = {"name": name})
try:
if args.testname:
clickhouse_proc = Popen(shlex.split(args.client), stdin=PIPE, stdout=PIPE, stderr=PIPE)
clickhouse_proc.communicate("SELECT 'Running test {suite}/{case} from pid={pid}';".format(pid = os.getpid(), case = case, suite = suite))
print "{0:70}".format(name + ": "),
sys.stdout.flush()
@ -180,6 +177,11 @@ def main(args):
report_testcase.append(et.Element("skipped", attrib = {"message": message}))
print(MSG_SKIPPED + " - " + message)
else:
if args.testname:
clickhouse_proc = Popen(shlex.split(args.client), stdin=PIPE, stdout=PIPE, stderr=PIPE)
clickhouse_proc.communicate("SELECT 'Running test {suite}/{case} from pid={pid}';".format(pid = os.getpid(), case = case, suite = suite))
reference_file = os.path.join(suite_dir, name) + '.reference'
stdout_file = os.path.join(suite_tmp_dir, name) + '.stdout'
stderr_file = os.path.join(suite_tmp_dir, name) + '.stderr'
@ -328,7 +330,7 @@ if __name__ == '__main__':
parser.add_argument('--testname', action = 'store_true', default = None, dest = 'testname', help = 'Make query with test name before test run')
parser.add_argument('--skip', nargs='+', help = "Skip these tests")
parser.add_argument('--no-long', action = 'store_false', default = None, dest = 'no_long', help = 'Do not run long tests')
parser.add_argument('--no-long', action = 'store_false', dest = 'no_long', help = 'Do not run long tests')
group = parser.add_mutually_exclusive_group(required = False)
group.add_argument('--zookeeper', action = 'store_true', default = None, dest = 'zookeeper', help = 'Run zookeeper related tests')
group.add_argument('--no-zookeeper', action = 'store_false', default = None, dest = 'zookeeper', help = 'Do not run zookeeper related tests')

View File

@ -5,4 +5,4 @@ CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# We should have correct env vars from shell_config.sh to run this test
python $CURDIR/00411_accurate_number_comparison.python
python $CURDIR/00411_long_accurate_number_comparison.python

View File

@ -9,13 +9,19 @@ set -x
TEST_TRUE=${TEST_TRUE:=false}
# clean not used ~600mb
[ -n "$TRAVIS" ] && rm -rf .git contrib/poco/openssl
ccache -s
ccache -M 6G
ccache -M 4G
df -h
mkdir -p build
cd build
cmake .. -DCMAKE_CXX_COMPILER=`which $CXX` -DCMAKE_C_COMPILER=`which $CC` \
`# Does not optimize to speedup build` \
-DCMAKE_C_FLAGS_ADD=-O0 -DCMAKE_CXX_FLAGS_ADD=-O0 \
`# Does not optimize to speedup build, skip debug info to use less disk` \
-DCMAKE_C_FLAGS_ADD="-O0 -g0" -DCMAKE_CXX_FLAGS_ADD="-O0 -g0" \
`# ignore ccache disabler on trusty` \
-DCMAKE_C_COMPILER_LAUNCHER=/usr/bin/ccache -DCMAKE_CXX_COMPILER_LAUNCHER=/usr/bin/ccache \
`# Use all possible contrib libs from system` \
-DUNBUNDLED=1 \

View File

@ -3,6 +3,8 @@
set -e
set -x
df -h
env TEST_RUN=1 \
`# Skip tests:` \
`# 00281 requires internal compiler` \
@ -13,9 +15,9 @@ env TEST_RUN=1 \
PBUILDER_OPT="--timeout 35m" \
`# clang faster than gcc` \
DEB_CC=clang-5.0 DEB_CXX=clang++-5.0 \
CCACHE_SIZE=6G CCACHEDIR=$HOME/.ccache \
CCACHE_SIZE=4G CCACHEDIR=$HOME/.ccache \
`# Disable all features` \
CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=Debug -DUNBUNDLED=1 -DENABLE_UNWIND=0 -DENABLE_MYSQL=0 -DENABLE_CAPNP=0 -DENABLE_RDKAFKA=0 -DUSE_EMBEDDED_COMPILER=0" \
CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=Debug -DUNBUNDLED=1 -DENABLE_UNWIND=0 -DENABLE_MYSQL=0 -DENABLE_CAPNP=0 -DENABLE_RDKAFKA=0 -DUSE_EMBEDDED_COMPILER=0 -DCMAKE_C_FLAGS_ADD='-O0 -g0' -DCMAKE_CXX_FLAGS_ADD='-O0 -g0'" \
`# Use all possible contrib libs from system` \
`# psmisc - killall` \
`# gdb - symbol test in pbuilder` \