2019-04-25 12:29:28 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -x -e
|
|
|
|
|
2019-10-29 17:33:31 +00:00
|
|
|
mkdir -p build/cmake/toolchain/darwin-x86_64
|
|
|
|
tar xJf MacOSX10.14.sdk.tar.xz -C build/cmake/toolchain/darwin-x86_64 --strip-components=1
|
|
|
|
|
|
|
|
mkdir -p build/cmake/toolchain/linux-aarch64
|
|
|
|
tar xJf gcc-arm-8.3-2019.03-x86_64-aarch64-linux-gnu.tar.xz -C build/cmake/toolchain/linux-aarch64 --strip-components=1
|
|
|
|
|
2019-04-25 12:29:28 +00:00
|
|
|
mkdir -p build/build_docker
|
|
|
|
cd build/build_docker
|
2019-05-15 17:19:39 +00:00
|
|
|
ccache --show-stats ||:
|
|
|
|
ccache --zero-stats ||:
|
2019-04-25 23:21:59 +00:00
|
|
|
rm -f CMakeCache.txt
|
2019-04-25 12:29:28 +00:00
|
|
|
cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSANITIZE=$SANITIZER $CMAKE_FLAGS
|
|
|
|
ninja
|
2019-05-15 17:19:39 +00:00
|
|
|
ccache --show-stats ||:
|
2019-04-25 12:29:28 +00:00
|
|
|
mv ./dbms/programs/clickhouse* /output
|
|
|
|
mv ./dbms/unit_tests_dbms /output
|
2019-09-20 16:29:06 +00:00
|
|
|
find . -name '*.so' -print -exec mv '{}' /output \;
|
|
|
|
find . -name '*.so.*' -print -exec mv '{}' /output \;
|
2019-09-20 20:15:42 +00:00
|
|
|
|
|
|
|
count=`ls -1 /output/*.so 2>/dev/null | wc -l`
|
|
|
|
if [ $count != 0 ]
|
|
|
|
then
|
2019-09-23 12:20:08 +00:00
|
|
|
mkdir -p /output/config
|
|
|
|
cp ../dbms/programs/server/config.xml /output/config
|
|
|
|
cp ../dbms/programs/server/users.xml /output/config
|
|
|
|
cp -r ../dbms/programs/server/config.d /output/config
|
2019-09-20 20:15:42 +00:00
|
|
|
tar -czvf shared_build.tgz /output
|
|
|
|
rm -r /output/*
|
|
|
|
mv shared_build.tgz /output
|
|
|
|
fi
|