Changeset View
Changeset View
Standalone View
Standalone View
contrib/gitian-descriptors/gitian-win.yml
Show All 35 Lines | - "distribution": "buster-backports" | ||||
- "cmake" | - "cmake" | ||||
remotes: | remotes: | ||||
- "url": "https://github.com/Bitcoin-ABC/bitcoin-abc.git" | - "url": "https://github.com/Bitcoin-ABC/bitcoin-abc.git" | ||||
"dir": "bitcoin" | "dir": "bitcoin" | ||||
files: [] | files: [] | ||||
script: | | script: | | ||||
WRAP_DIR=$HOME/wrapped | WRAP_DIR=$HOME/wrapped | ||||
HOSTS="x86_64-w64-mingw32" | HOSTS="x86_64-w64-mingw32" | ||||
CHAINS="ABC BCHN" | |||||
# CMake toolchain file name differ from host name | # CMake toolchain file name differ from host name | ||||
declare -A CMAKE_TOOLCHAIN_FILE | declare -A CMAKE_TOOLCHAIN_FILE | ||||
CMAKE_TOOLCHAIN_FILE[x86_64-w64-mingw32]=Win64.cmake | CMAKE_TOOLCHAIN_FILE[x86_64-w64-mingw32]=Win64.cmake | ||||
FAKETIME_HOST_PROGS="ar ranlib nm windres strip objcopy" | FAKETIME_HOST_PROGS="ar ranlib nm windres strip objcopy" | ||||
FAKETIME_PROGS="date makensis zip" | FAKETIME_PROGS="date makensis zip" | ||||
HOST_CFLAGS="-O2 -g" | HOST_CFLAGS="-O2 -g" | ||||
▲ Show 20 Lines • Show All 110 Lines • ▼ Show 20 Lines | script: | | ||||
cp ../$SOURCEDIST $OUTDIR/src | cp ../$SOURCEDIST $OUTDIR/src | ||||
popd | popd | ||||
# Allow extra cmake option to be specified for each host | # Allow extra cmake option to be specified for each host | ||||
declare -A CMAKE_EXTRA_OPTIONS | declare -A CMAKE_EXTRA_OPTIONS | ||||
CMAKE_EXTRA_OPTIONS[x86_64-w64-mingw32]="-DCPACK_PACKAGE_FILE_NAME=${DISTNAME}-win64-setup-unsigned" | CMAKE_EXTRA_OPTIONS[x86_64-w64-mingw32]="-DCPACK_PACKAGE_FILE_NAME=${DISTNAME}-win64-setup-unsigned" | ||||
ORIGPATH="$PATH" | ORIGPATH="$PATH" | ||||
for CHAIN in ${CHAINS}; do | |||||
mkdir -p ${OUTDIR}/${CHAIN} | |||||
# Extract the release tarball into a dir for each host and build | # Extract the release tarball into a dir for each host and build | ||||
for i in ${HOSTS}; do | for i in ${HOSTS}; do | ||||
export PATH=${BASEPREFIX}/${i}/native/bin:${WRAP_DIR}:${ORIGPATH} | export PATH=${BASEPREFIX}/${i}/native/bin:${WRAP_DIR}:${ORIGPATH} | ||||
mkdir -p ${CHAIN}/distsrc-${i} | mkdir -p distsrc-${i} | ||||
cd ${CHAIN}/distsrc-${i} | cd distsrc-${i} | ||||
INSTALLPATH=`pwd`/installed/${DISTNAME} | INSTALLPATH=`pwd`/installed/${DISTNAME} | ||||
mkdir -p ${INSTALLPATH} | mkdir -p ${INSTALLPATH} | ||||
tar --strip-components=1 -xf ../../$SOURCEDIST | tar --strip-components=1 -xf ../$SOURCEDIST | ||||
cmake -GNinja ${SOURCEDIR} \ | cmake -GNinja .. \ | ||||
-DCMAKE_TOOLCHAIN_FILE=${SOURCEDIR}/cmake/platforms/${CMAKE_TOOLCHAIN_FILE[${i}]} \ | -DCMAKE_TOOLCHAIN_FILE=${SOURCEDIR}/cmake/platforms/${CMAKE_TOOLCHAIN_FILE[${i}]} \ | ||||
-DCLIENT_VERSION_IS_RELEASE=ON \ | -DCLIENT_VERSION_IS_RELEASE=ON \ | ||||
-DENABLE_CLANG_TIDY=OFF \ | -DENABLE_CLANG_TIDY=OFF \ | ||||
-DENABLE_REDUCE_EXPORTS=ON \ | -DENABLE_REDUCE_EXPORTS=ON \ | ||||
-DBUILD_BITCOIN_SEEDER=OFF \ | -DBUILD_BITCOIN_SEEDER=OFF \ | ||||
-DCPACK_STRIP_FILES=ON \ | -DCPACK_STRIP_FILES=ON \ | ||||
-DCMAKE_INSTALL_PREFIX=${INSTALLPATH} \ | -DCMAKE_INSTALL_PREFIX=${INSTALLPATH} \ | ||||
-DCCACHE=OFF \ | -DCCACHE=OFF \ | ||||
-DNETWORK_COMPATIBILITY=${CHAIN} \ | |||||
${CMAKE_EXTRA_OPTIONS[${i}]} | ${CMAKE_EXTRA_OPTIONS[${i}]} | ||||
ninja | ninja | ||||
ninja security-check | ninja security-check | ||||
ninja install-debug | ninja install-debug | ||||
ninja package | ninja package | ||||
cp -f bitcoin-abc-*-setup-unsigned.exe ${OUTDIR}/${CHAIN}/ | cp -f bitcoin-abc-*-setup-unsigned.exe ${OUTDIR}/ | ||||
cd installed | cd installed | ||||
mkdir -p ${DISTNAME}/lib | mkdir -p ${DISTNAME}/lib | ||||
mv ${DISTNAME}/bin/*.dll* ${DISTNAME}/lib/ | mv ${DISTNAME}/bin/*.dll* ${DISTNAME}/lib/ | ||||
find ${DISTNAME} -not -name "*.dbg" -type f | sort | zip -X@ ${OUTDIR}/${CHAIN}/${DISTNAME}-${i}.zip | find ${DISTNAME} -not -name "*.dbg" -type f | sort | zip -X@ ${OUTDIR}/${DISTNAME}-${i}.zip | ||||
find ${DISTNAME} -name "*.dbg" -type f | sort | zip -X@ ${OUTDIR}/${CHAIN}/${DISTNAME}-${i}-debug.zip | find ${DISTNAME} -name "*.dbg" -type f | sort | zip -X@ ${OUTDIR}/${DISTNAME}-${i}-debug.zip | ||||
cd ../../.. | cd ../../ | ||||
rm -rf ${CHAIN}/distsrc-${i} | rm -rf distsrc-${i} | ||||
done | done | ||||
pushd $OUTDIR | cd $OUTDIR | ||||
mv ${OUTDIR}/${CHAIN}/${DISTNAME}-x86_64-*-debug.zip ${OUTDIR}/${CHAIN}/${DISTNAME}-win64-debug.zip | mv ${OUTDIR}/${DISTNAME}-x86_64-*-debug.zip ${OUTDIR}/${DISTNAME}-win64-debug.zip | ||||
mv ${OUTDIR}/${CHAIN}/${DISTNAME}-x86_64-*.zip ${OUTDIR}/${CHAIN}/${DISTNAME}-win64.zip | mv ${OUTDIR}/${DISTNAME}-x86_64-*.zip ${OUTDIR}/${DISTNAME}-win64.zip | ||||
popd | |||||
done |