2019-04-25 12:29:28 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -x -e
|
|
|
|
|
2021-04-02 11:06:36 +00:00
|
|
|
# Uncomment to debug ccache.
|
2021-04-07 20:38:48 +00:00
|
|
|
# export CCACHE_LOGFILE=/build/ccache.log
|
|
|
|
# export CCACHE_DEBUG=1
|
2021-04-02 11:06:36 +00:00
|
|
|
|
2021-04-02 12:09:52 +00:00
|
|
|
ccache --show-config ||:
|
2019-05-15 17:19:39 +00:00
|
|
|
ccache --show-stats ||:
|
|
|
|
ccache --zero-stats ||:
|
2021-04-02 11:06:36 +00:00
|
|
|
|
2020-10-02 09:40:50 +00:00
|
|
|
read -ra ALIEN_PKGS <<< "${ALIEN_PKGS:-}"
|
2021-04-24 23:11:31 +00:00
|
|
|
build/release "${ALIEN_PKGS[@]}" | ts '%Y-%m-%d %H:%M:%S'
|
2019-04-25 12:29:28 +00:00
|
|
|
mv /*.deb /output
|
2020-09-30 17:06:14 +00:00
|
|
|
mv -- *.changes /output
|
|
|
|
mv -- *.buildinfo /output
|
2019-06-27 11:16:56 +00:00
|
|
|
mv /*.rpm /output ||: # if exists
|
|
|
|
mv /*.tgz /output ||: # if exists
|
2020-05-21 15:02:52 +00:00
|
|
|
|
|
|
|
if [ -n "$BINARY_OUTPUT" ] && { [ "$BINARY_OUTPUT" = "programs" ] || [ "$BINARY_OUTPUT" = "tests" ] ;}
|
|
|
|
then
|
2020-09-30 17:06:14 +00:00
|
|
|
echo "Place $BINARY_OUTPUT to output"
|
2020-05-21 15:02:52 +00:00
|
|
|
mkdir /output/binary ||: # if exists
|
|
|
|
mv /build/obj-*/programs/clickhouse* /output/binary
|
2021-08-23 13:21:39 +00:00
|
|
|
|
2020-05-21 15:02:52 +00:00
|
|
|
if [ "$BINARY_OUTPUT" = "tests" ]
|
|
|
|
then
|
|
|
|
mv /build/obj-*/src/unit_tests_dbms /output/binary
|
|
|
|
fi
|
|
|
|
fi
|
2021-04-02 12:09:52 +00:00
|
|
|
|
2021-08-24 00:09:19 +00:00
|
|
|
# Also build fuzzers if any sanitizer specified
|
|
|
|
if [ -n "$SANITIZER" ]
|
|
|
|
then
|
2021-08-24 23:11:48 +00:00
|
|
|
# Script is supposed that we are in build directory.
|
|
|
|
mkdir -p build/build_docker
|
|
|
|
cd build/build_docker
|
|
|
|
# Launching build script
|
|
|
|
../docker/packager/other/fuzzer.sh
|
|
|
|
cd
|
2021-08-24 00:09:19 +00:00
|
|
|
fi
|
|
|
|
|
2021-04-02 12:09:52 +00:00
|
|
|
ccache --show-config ||:
|
|
|
|
ccache --show-stats ||:
|
|
|
|
|
2021-04-02 11:06:36 +00:00
|
|
|
if [ "${CCACHE_DEBUG:-}" == "1" ]
|
|
|
|
then
|
|
|
|
find /build -name '*.ccache-*' -print0 \
|
|
|
|
| tar -c -I pixz -f /output/ccache-debug.txz --null -T -
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -n "$CCACHE_LOGFILE" ]
|
|
|
|
then
|
|
|
|
# Compress the log as well, or else the CI will try to compress all log
|
|
|
|
# files in place, and will fail because this directory is not writable.
|
|
|
|
tar -cv -I pixz -f /output/ccache.log.txz "$CCACHE_LOGFILE"
|
|
|
|
fi
|