2014-01-20 13:38:50 +01:00
|
|
|
---
|
2019-12-13 18:52:52 +01:00
|
|
|
name: "dash-win-0.16"
|
2014-08-13 01:13:04 +02:00
|
|
|
enable_cache: true
|
2014-01-20 13:38:50 +01:00
|
|
|
suites:
|
2018-08-13 22:21:42 +02:00
|
|
|
- "bionic"
|
2014-01-20 13:38:50 +01:00
|
|
|
architectures:
|
|
|
|
- "amd64"
|
2016-06-09 11:14:12 +02:00
|
|
|
packages:
|
2016-02-27 07:09:18 +01:00
|
|
|
- "curl"
|
2014-08-13 01:13:04 +02:00
|
|
|
- "g++"
|
2018-08-13 22:21:42 +02:00
|
|
|
- "git"
|
2014-08-13 01:13:04 +02:00
|
|
|
- "pkg-config"
|
2015-10-29 07:29:48 +01:00
|
|
|
- "autoconf"
|
2014-01-20 13:38:50 +01:00
|
|
|
- "libtool"
|
|
|
|
- "automake"
|
2018-10-23 10:23:14 +02:00
|
|
|
- "cmake"
|
2014-08-13 01:13:04 +02:00
|
|
|
- "faketime"
|
2014-01-20 13:38:50 +01:00
|
|
|
- "bsdmainutils"
|
2014-08-13 01:13:04 +02:00
|
|
|
- "mingw-w64"
|
|
|
|
- "g++-mingw-w64"
|
|
|
|
- "nsis"
|
2014-11-26 00:36:55 +01:00
|
|
|
- "zip"
|
2015-11-19 13:11:50 +01:00
|
|
|
- "ca-certificates"
|
|
|
|
- "python"
|
2018-07-16 14:49:23 +02:00
|
|
|
- "python3"
|
2018-08-13 22:21:42 +02:00
|
|
|
- "rename"
|
2019-12-12 11:47:04 +01:00
|
|
|
- "ccache"
|
2014-01-20 13:38:50 +01:00
|
|
|
remotes:
|
2015-04-03 00:51:08 +02:00
|
|
|
- "url": "https://github.com/dashpay/dash.git"
|
2015-03-19 15:15:08 +01:00
|
|
|
"dir": "dash"
|
2014-08-13 01:13:04 +02:00
|
|
|
files: []
|
2014-01-20 13:38:50 +01:00
|
|
|
script: |
|
2014-08-13 01:13:04 +02:00
|
|
|
WRAP_DIR=$HOME/wrapped
|
2016-10-25 13:24:29 +02:00
|
|
|
HOSTS="i686-w64-mingw32 x86_64-w64-mingw32"
|
2019-07-02 06:16:11 +02:00
|
|
|
CONFIGFLAGS="--enable-reduce-exports --disable-miner --disable-bench --disable-gui-tests --enable-crash-hooks"
|
2018-08-13 22:21:42 +02:00
|
|
|
FAKETIME_HOST_PROGS="ar ranlib nm windres strip objcopy"
|
2014-11-26 00:36:55 +01:00
|
|
|
FAKETIME_PROGS="date makensis zip"
|
2016-06-08 04:09:28 +02:00
|
|
|
HOST_CFLAGS="-O2 -g"
|
|
|
|
HOST_CXXFLAGS="-O2 -g"
|
2014-08-13 01:13:04 +02:00
|
|
|
|
2014-01-31 21:37:43 +01:00
|
|
|
export QT_RCC_TEST=1
|
2014-08-13 01:13:04 +02:00
|
|
|
export GZIP="-9n"
|
|
|
|
export TAR_OPTIONS="--mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME""
|
|
|
|
export TZ="UTC"
|
|
|
|
export BUILD_DIR=`pwd`
|
|
|
|
mkdir -p ${WRAP_DIR}
|
|
|
|
if test -n "$GBUILD_CACHE_ENABLED"; then
|
|
|
|
export SOURCES_PATH=${GBUILD_COMMON_CACHE}
|
2018-07-20 15:33:02 +02:00
|
|
|
export BASE_CACHE=${GBUILD_PACKAGE_CACHE}/depends
|
2014-08-13 01:13:04 +02:00
|
|
|
mkdir -p ${BASE_CACHE} ${SOURCES_PATH}
|
2018-07-20 15:33:02 +02:00
|
|
|
|
|
|
|
# Setup ccache to use correct cache directories and fix the compiler check of ccache
|
|
|
|
CONFIGFLAGS="${CONFIGFLAGS} --enable-ccache"
|
|
|
|
export CCACHE_DIR=${GBUILD_PACKAGE_CACHE}/ccache
|
|
|
|
# As we later wrap the gcc binaries, this is fast
|
|
|
|
export CCACHE_COMPILERCHECK="content"
|
2018-11-19 07:31:13 +01:00
|
|
|
if [ -f ${GBUILD_PACKAGE_CACHE}/ccache.tar ]; then
|
2018-07-20 15:33:02 +02:00
|
|
|
pushd ${GBUILD_PACKAGE_CACHE}
|
2018-11-19 07:31:13 +01:00
|
|
|
tar xf ccache.tar
|
|
|
|
rm ccache.tar
|
2018-07-20 15:33:02 +02:00
|
|
|
popd
|
|
|
|
fi
|
2018-11-19 07:31:13 +01:00
|
|
|
# instead of compressing ccache.tar, we let ccache handle it by itself
|
|
|
|
# Otherwise we end up uncompressing/compressing a lot of cache files which we actually never use
|
|
|
|
export CCACHE_COMPRESS=1
|
2018-07-20 15:33:02 +02:00
|
|
|
else
|
|
|
|
CONFIGFLAGS="${CONFIGFLAGS} --disable-ccache"
|
2014-08-13 01:13:04 +02:00
|
|
|
fi
|
|
|
|
|
2018-07-20 15:33:02 +02:00
|
|
|
# We include the GCC version in all wrappers so that ccache can detect compiler upgrades when hashing the wrappers
|
|
|
|
GCCVERSION=`gcc --version | head -1`
|
|
|
|
|
2016-06-09 11:14:12 +02:00
|
|
|
function create_global_faketime_wrappers {
|
2014-08-13 01:13:04 +02:00
|
|
|
for prog in ${FAKETIME_PROGS}; do
|
|
|
|
echo '#!/bin/bash' > ${WRAP_DIR}/${prog}
|
2018-07-20 15:33:02 +02:00
|
|
|
echo "# GCCVERSION=${GCCVERSION}" >> ${WRAP_DIR}/${prog}
|
2014-08-13 01:13:04 +02:00
|
|
|
echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog}
|
2015-10-29 07:29:48 +01:00
|
|
|
echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
|
2016-06-09 11:14:12 +02:00
|
|
|
echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${prog}
|
2014-08-13 01:13:04 +02:00
|
|
|
echo "\$REAL \$@" >> $WRAP_DIR/${prog}
|
|
|
|
chmod +x ${WRAP_DIR}/${prog}
|
2018-07-20 15:33:02 +02:00
|
|
|
touch -d "${REFERENCE_DATETIME}" ${WRAP_DIR}/${prog}
|
2014-08-13 01:13:04 +02:00
|
|
|
done
|
2016-06-09 11:14:12 +02:00
|
|
|
}
|
2014-08-13 01:13:04 +02:00
|
|
|
|
2016-06-09 11:14:12 +02:00
|
|
|
function create_per-host_faketime_wrappers {
|
2014-08-13 01:13:04 +02:00
|
|
|
for i in $HOSTS; do
|
|
|
|
for prog in ${FAKETIME_HOST_PROGS}; do
|
|
|
|
echo '#!/bin/bash' > ${WRAP_DIR}/${i}-${prog}
|
2018-07-20 15:33:02 +02:00
|
|
|
echo "# GCCVERSION=${GCCVERSION}" >> ${WRAP_DIR}/${i}-${prog}
|
2014-08-13 01:13:04 +02:00
|
|
|
echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog}
|
2015-10-29 07:29:48 +01:00
|
|
|
echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
|
2016-06-09 11:14:12 +02:00
|
|
|
echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${i}-${prog}
|
2014-08-13 01:13:04 +02:00
|
|
|
echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog}
|
|
|
|
chmod +x ${WRAP_DIR}/${i}-${prog}
|
2018-07-20 15:33:02 +02:00
|
|
|
touch -d "${REFERENCE_DATETIME}" ${WRAP_DIR}/${i}-${prog}
|
2014-08-13 01:13:04 +02:00
|
|
|
done
|
|
|
|
done
|
2016-06-09 11:14:12 +02:00
|
|
|
}
|
2015-10-30 18:19:09 +01:00
|
|
|
|
2016-06-09 11:14:12 +02:00
|
|
|
function create_per-host_linker_wrapper {
|
2015-10-30 18:19:09 +01:00
|
|
|
# This is only needed for trusty, as the mingw linker leaks a few bytes of
|
|
|
|
# heap, causing non-determinism. See discussion in https://github.com/bitcoin/bitcoin/pull/6900
|
|
|
|
for i in $HOSTS; do
|
|
|
|
mkdir -p ${WRAP_DIR}/${i}
|
|
|
|
for prog in collect2; do
|
|
|
|
echo '#!/bin/bash' > ${WRAP_DIR}/${i}/${prog}
|
2018-07-20 15:33:02 +02:00
|
|
|
echo "# GCCVERSION=${GCCVERSION}" >> ${WRAP_DIR}/${i}/${prog}
|
2015-10-30 18:19:09 +01:00
|
|
|
REAL=$(${i}-gcc -print-prog-name=${prog})
|
|
|
|
echo "export MALLOC_PERTURB_=255" >> ${WRAP_DIR}/${i}/${prog}
|
|
|
|
echo "${REAL} \$@" >> $WRAP_DIR/${i}/${prog}
|
|
|
|
chmod +x ${WRAP_DIR}/${i}/${prog}
|
2018-07-20 15:33:02 +02:00
|
|
|
touch -d "${REFERENCE_DATETIME}" ${WRAP_DIR}/${i}/${prog}
|
2015-10-30 18:19:09 +01:00
|
|
|
done
|
|
|
|
for prog in gcc g++; do
|
|
|
|
echo '#!/bin/bash' > ${WRAP_DIR}/${i}-${prog}
|
2018-07-20 15:33:02 +02:00
|
|
|
echo "# GCCVERSION=${GCCVERSION}" >> ${WRAP_DIR}/${i}-${prog}
|
2018-08-13 22:21:42 +02:00
|
|
|
echo "REAL=\`which -a ${i}-${prog}-posix | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog}
|
2018-07-20 15:33:02 +02:00
|
|
|
echo '# Add the gcc version to the wrapper so that ccache takes this into account (we use CCACHE_COMPILERCHECK=content)' >> ${WRAP_DIR}/${i}-${prog}
|
|
|
|
echo "# `${prog} --version | head -1`" >> ${WRAP_DIR}/${i}-${prog}
|
2015-10-30 18:19:09 +01:00
|
|
|
echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
|
2016-06-09 11:14:12 +02:00
|
|
|
echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${i}-${prog}
|
2015-10-30 18:19:09 +01:00
|
|
|
echo "export COMPILER_PATH=${WRAP_DIR}/${i}" >> ${WRAP_DIR}/${i}-${prog}
|
|
|
|
echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog}
|
|
|
|
chmod +x ${WRAP_DIR}/${i}-${prog}
|
2018-07-20 15:33:02 +02:00
|
|
|
touch -d "${REFERENCE_DATETIME}" ${WRAP_DIR}/${i}-${prog}
|
2015-10-30 18:19:09 +01:00
|
|
|
done
|
|
|
|
done
|
2016-06-09 11:14:12 +02:00
|
|
|
}
|
2015-10-30 18:19:09 +01:00
|
|
|
|
2016-06-09 11:14:12 +02:00
|
|
|
# Faketime for depends so intermediate results are comparable
|
2016-06-14 09:13:07 +02:00
|
|
|
export PATH_orig=${PATH}
|
2016-06-09 11:14:12 +02:00
|
|
|
create_global_faketime_wrappers "2000-01-01 12:00:00"
|
|
|
|
create_per-host_faketime_wrappers "2000-01-01 12:00:00"
|
|
|
|
create_per-host_linker_wrapper "2000-01-01 12:00:00"
|
2016-06-14 09:13:07 +02:00
|
|
|
export PATH=${WRAP_DIR}:${PATH}
|
2016-06-09 11:14:12 +02:00
|
|
|
|
2015-04-05 23:56:58 +02:00
|
|
|
cd dash
|
2014-08-13 01:13:04 +02:00
|
|
|
BASEPREFIX=`pwd`/depends
|
|
|
|
# Build dependencies for each host
|
|
|
|
for i in $HOSTS; do
|
|
|
|
make ${MAKEOPTS} -C ${BASEPREFIX} HOST="${i}"
|
|
|
|
done
|
|
|
|
|
2016-06-09 11:14:12 +02:00
|
|
|
# Faketime for binaries
|
2016-06-14 09:13:07 +02:00
|
|
|
export PATH=${PATH_orig}
|
2016-06-09 11:14:12 +02:00
|
|
|
create_global_faketime_wrappers "${REFERENCE_DATETIME}"
|
|
|
|
create_per-host_faketime_wrappers "${REFERENCE_DATETIME}"
|
|
|
|
create_per-host_linker_wrapper "${REFERENCE_DATETIME}"
|
2016-06-14 09:13:07 +02:00
|
|
|
export PATH=${WRAP_DIR}:${PATH}
|
2016-06-09 11:14:12 +02:00
|
|
|
|
2014-08-13 01:13:04 +02:00
|
|
|
# Create the release tarball using (arbitrarily) the first host
|
|
|
|
./autogen.sh
|
2016-06-07 20:51:51 +02:00
|
|
|
CONFIG_SITE=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`/share/config.site ./configure --prefix=/
|
2014-08-13 01:13:04 +02:00
|
|
|
make dist
|
2016-10-31 08:48:59 +01:00
|
|
|
SOURCEDIST=`echo dashcore-*.tar.gz`
|
2014-11-26 00:36:55 +01:00
|
|
|
DISTNAME=`echo ${SOURCEDIST} | sed 's/.tar.*//'`
|
2014-08-13 01:13:04 +02:00
|
|
|
|
2014-11-20 03:46:40 +01:00
|
|
|
# Correct tar file order
|
|
|
|
mkdir -p temp
|
|
|
|
pushd temp
|
2014-11-26 00:36:55 +01:00
|
|
|
tar xf ../$SOURCEDIST
|
2016-10-31 08:48:59 +01:00
|
|
|
find dashcore-* | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ../$SOURCEDIST
|
2015-06-29 21:02:37 +02:00
|
|
|
mkdir -p $OUTDIR/src
|
|
|
|
cp ../$SOURCEDIST $OUTDIR/src
|
2014-11-20 03:46:40 +01:00
|
|
|
popd
|
|
|
|
|
2017-08-21 08:58:58 +02:00
|
|
|
# Workaround for tarball not building with the bare tag version (prep)
|
|
|
|
make -C src obj/build.h
|
|
|
|
|
2014-08-13 01:13:04 +02:00
|
|
|
ORIGPATH="$PATH"
|
|
|
|
# Extract the release tarball into a dir for each host and build
|
|
|
|
for i in ${HOSTS}; do
|
|
|
|
export PATH=${BASEPREFIX}/${i}/native/bin:${ORIGPATH}
|
|
|
|
mkdir -p distsrc-${i}
|
|
|
|
cd distsrc-${i}
|
2014-11-26 00:36:55 +01:00
|
|
|
INSTALLPATH=`pwd`/installed/${DISTNAME}
|
|
|
|
mkdir -p ${INSTALLPATH}
|
|
|
|
tar --strip-components=1 -xf ../$SOURCEDIST
|
2014-08-13 01:13:04 +02:00
|
|
|
|
2017-08-21 08:58:58 +02:00
|
|
|
# Workaround for tarball not building with the bare tag version
|
|
|
|
echo '#!/bin/true' >share/genbuild.sh
|
|
|
|
mkdir src/obj
|
|
|
|
cp ../src/obj/build.h src/obj/
|
|
|
|
|
2018-07-20 15:33:02 +02:00
|
|
|
CONFIG_SITE=${BASEPREFIX}/${i}/share/config.site ./configure --prefix=/ --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS} CFLAGS="${HOST_CFLAGS}" CXXFLAGS="${HOST_CXXFLAGS}"
|
2014-08-13 01:13:04 +02:00
|
|
|
make ${MAKEOPTS}
|
2016-01-26 20:50:50 +01:00
|
|
|
make ${MAKEOPTS} -C src check-security
|
2014-01-20 13:38:50 +01:00
|
|
|
make deploy
|
2016-06-08 04:09:28 +02:00
|
|
|
make install DESTDIR=${INSTALLPATH}
|
2017-03-13 07:37:02 +01:00
|
|
|
rename 's/-setup\.exe$/-setup-unsigned.exe/' *-setup.exe
|
2016-10-31 08:48:59 +01:00
|
|
|
cp -f dashcore-*setup*.exe $OUTDIR/
|
2014-11-26 00:36:55 +01:00
|
|
|
cd installed
|
|
|
|
mv ${DISTNAME}/bin/*.dll ${DISTNAME}/lib/
|
|
|
|
find . -name "lib*.la" -delete
|
|
|
|
find . -name "lib*.a" -delete
|
|
|
|
rm -rf ${DISTNAME}/lib/pkgconfig
|
2016-06-08 04:09:28 +02:00
|
|
|
find ${DISTNAME}/bin -type f -executable -exec ${i}-objcopy --only-keep-debug {} {}.dbg \; -exec ${i}-strip -s {} \; -exec ${i}-objcopy --add-gnu-debuglink={}.dbg {} \;
|
|
|
|
find ${DISTNAME}/lib -type f -exec ${i}-objcopy --only-keep-debug {} {}.dbg \; -exec ${i}-strip -s {} \; -exec ${i}-objcopy --add-gnu-debuglink={}.dbg {} \;
|
|
|
|
find ${DISTNAME} -not -name "*.dbg" -type f | sort | zip -X@ ${OUTDIR}/${DISTNAME}-${i}.zip
|
|
|
|
find ${DISTNAME} -name "*.dbg" -type f | sort | zip -X@ ${OUTDIR}/${DISTNAME}-${i}-debug.zip
|
|
|
|
cd ../../
|
|
|
|
rm -rf distsrc-${i}
|
2014-08-13 01:13:04 +02:00
|
|
|
done
|
2017-03-13 07:37:02 +01:00
|
|
|
cp -rf contrib/windeploy $BUILD_DIR
|
|
|
|
cd $BUILD_DIR/windeploy
|
|
|
|
mkdir unsigned
|
2019-02-26 23:04:56 +01:00
|
|
|
cp $OUTDIR/dashcore-*setup-unsigned.exe unsigned/
|
2017-03-13 07:37:02 +01:00
|
|
|
find . | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-win-unsigned.tar.gz
|
2016-06-08 04:09:28 +02:00
|
|
|
mv ${OUTDIR}/${DISTNAME}-x86_64-*-debug.zip ${OUTDIR}/${DISTNAME}-win64-debug.zip
|
|
|
|
mv ${OUTDIR}/${DISTNAME}-i686-*-debug.zip ${OUTDIR}/${DISTNAME}-win32-debug.zip
|
2014-11-26 00:36:55 +01:00
|
|
|
mv ${OUTDIR}/${DISTNAME}-x86_64-*.zip ${OUTDIR}/${DISTNAME}-win64.zip
|
|
|
|
mv ${OUTDIR}/${DISTNAME}-i686-*.zip ${OUTDIR}/${DISTNAME}-win32.zip
|
2018-07-20 15:33:02 +02:00
|
|
|
|
|
|
|
# Compress ccache (otherwise the assert file will get too huge)
|
|
|
|
if [ "$CCACHE_DIR" != "" ]; then
|
|
|
|
pushd ${GBUILD_PACKAGE_CACHE}
|
2018-11-19 07:31:13 +01:00
|
|
|
tar cf ccache.tar ccache
|
2018-07-20 15:33:02 +02:00
|
|
|
rm -rf ccache
|
|
|
|
popd
|
|
|
|
fi
|