ClickHouse/docker/packager/binary/build.sh

50 lines
1.7 KiB
Bash
Raw Normal View History

2019-04-25 12:29:28 +00:00
#!/usr/bin/env bash
set -x -e
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
mkdir -p build/cmake/toolchain/freebsd-x86_64
tar xJf freebsd-11.3-toolchain.tar.xz -C build/cmake/toolchain/freebsd-x86_64 --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 ||:
2020-05-14 09:45:22 +00:00
ln -s /usr/lib/x86_64-linux-gnu/libOpenCL.so.1.0.0 /usr/lib/libOpenCL.so ||:
rm -f CMakeCache.txt
2020-06-25 19:16:48 +00:00
cmake --debug-trycompile --verbose=1 -DCMAKE_VERBOSE_MAKEFILE=1 -LA -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSANITIZE=$SANITIZER $CMAKE_FLAGS ..
2020-06-24 13:16:54 +00:00
ninja -v clickhouse-bundle
mv ./programs/clickhouse* /output
2020-04-03 15:14:31 +00:00
mv ./src/unit_tests_dbms /output
find . -name '*.so' -print -exec mv '{}' /output \;
find . -name '*.so.*' -print -exec mv '{}' /output \;
2019-09-20 20:15:42 +00:00
2019-12-25 16:08:44 +00:00
# Different files for performance test.
if [ "performance" == "$COMBINED_OUTPUT" ]
then
cp -r ../tests/performance /output
2020-02-25 13:12:12 +00:00
cp -r ../docker/test/performance-comparison/config /output ||:
2019-12-25 16:08:44 +00:00
rm /output/unit_tests_dbms ||:
rm /output/clickhouse-odbc-bridge ||:
2020-03-11 14:29:34 +00:00
cp -r ../docker/test/performance-comparison /output/scripts ||:
2019-12-25 16:08:44 +00:00
fi
# May be set for split build or for performance test.
if [ "" != "$COMBINED_OUTPUT" ]
2019-09-20 20:15:42 +00:00
then
2019-09-23 12:20:08 +00:00
mkdir -p /output/config
cp ../programs/server/config.xml /output/config
cp ../programs/server/users.xml /output/config
cp -r ../programs/server/config.d /output/config
tar -czvf "$COMBINED_OUTPUT.tgz" /output
2019-09-20 20:15:42 +00:00
rm -r /output/*
mv "$COMBINED_OUTPUT.tgz" /output
2019-09-20 20:15:42 +00:00
fi
2020-06-04 19:48:48 +00:00
ccache --show-stats ||: