Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 15 additions & 9 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,25 @@ builder-image:
image: $CI_REGISTRY_IMAGE:builder-$CI_COMMIT_REF_SLUG
variables:
SDK_URL: https://bitcoincore.org/depends-sources/sdks
OSX_SDK: "10.14"
XCODE_VERSION: 11.3.1
XCODE_BUILD_ID: 11C505
MAKEJOBS: -j4
before_script:
- echo HOST=$HOST
- |
if [ "$HOST" = "x86_64-apple-darwin16" ]; then
echo "Downloading MacOS SDK"
if [ "$HOST" = "x86_64-apple-darwin18" ]; then
Comment thread
kwvg marked this conversation as resolved.
Outdated
mkdir -p depends/SDKs
mkdir -p depends/sdk-sources
if [ ! -f depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz ]; then
curl --location --fail $SDK_URL/MacOSX${OSX_SDK}.sdk.tar.gz -o depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz
OSX_SDK_BASENAME="Xcode-${XCODE_VERSION}-${XCODE_BUILD_ID}-extracted-SDK-with-libcxx-headers.tar.gz"
OSX_SDK_PATH="depends/sdk-sources/${OSX_SDK_BASENAME}"
if [ ! -f "$OSX_SDK_PATH" ]; then
echo "Downloading MacOS SDK"
curl --location --fail "${SDK_URL}/${OSX_SDK_BASENAME}" -o "$OSX_SDK_PATH"
fi
if [ -f "$OSX_SDK_PATH" ]; then
echo "Extracting MacOS SDK"
tar -C depends/SDKs -xf "$OSX_SDK_PATH"
fi
tar -C depends/SDKs -xf depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz
fi
script:
- make $MAKEJOBS -C depends HOST=$HOST $DEP_OPTS
Expand Down Expand Up @@ -180,12 +186,12 @@ x86_64-unknown-linux-gnu-release:
HOST: x86_64-unknown-linux-gnu
DEP_OPTS: "NO_UPNP=1"

x86_64-apple-darwin16:
x86_64-apple-darwin18:
extends:
- .build-depends-template
- .skip-in-fast-mode-template
variables:
HOST: x86_64-apple-darwin16
HOST: x86_64-apple-darwin18

###

Expand Down Expand Up @@ -251,7 +257,7 @@ mac-build:
- .build-template
- .skip-in-fast-mode-template
needs:
- x86_64-apple-darwin16
- x86_64-apple-darwin18
variables:
BUILD_TARGET: mac

Expand Down
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -294,9 +294,10 @@ after_success:
- stage: test
name: 'macOS 10.12 [GOAL: deploy]'
env: >-
HOST=x86_64-apple-darwin16
HOST=x86_64-apple-darwin18
PACKAGES="cmake imagemagick libcap-dev librsvg2-bin libz-dev libbz2-dev libtiff-tools python3-dev python3-setuptools"
OSX_SDK=10.14
export XCODE_VERSION=11.3.1
export XCODE_BUILD_ID=11C505
RUN_UNIT_TESTS=false
RUN_FUNCTIONAL_TESTS=false
GOAL="deploy"
Expand Down
3 changes: 2 additions & 1 deletion .travis/lint_04_install.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
# Copyright (c) 2018 The Bitcoin Core developers
# Copyright (c) 2018-2019 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.

Expand All @@ -9,3 +9,4 @@ export LC_ALL=C
travis_retry pip install codespell==1.13.0
travis_retry pip install flake8==3.5.0
travis_retry pip install vulture==0.29
travis_retry pip3 install yq
10 changes: 6 additions & 4 deletions .travis/test_05_before_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,16 @@
export LC_ALL=C.UTF-8

DOCKER_EXEC echo \> \$HOME/.bitcoin # Make sure default datadir does not exist and is never read by creating a dummy file
OSX_SDK_BASENAME="Xcode-${XCODE_VERSION}-${XCODE_BUILD_ID}-extracted-SDK-with-libcxx-headers.tar.gz"
OSX_SDK_PATH="depends/sdk-sources/${OSX_SDK_BASENAME}"

mkdir -p depends/SDKs depends/sdk-sources

if [ -n "$OSX_SDK" -a ! -f depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz ]; then
curl --location --fail $SDK_URL/MacOSX${OSX_SDK}.sdk.tar.gz -o depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz
if [ -n "$XCODE_VERSION" ] && [ ! -f "$OSX_SDK_PATH" ]; then
curl --location --fail "${SDK_URL}/${OSX_SDK_BASENAME}" -o "$OSX_SDK_PATH"
fi
if [ -n "$OSX_SDK" -a -f depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz ]; then
tar -C depends/SDKs -xf depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz
if [ -n "$XCODE_VERSION" ] && [ -f "$OSX_SDK_PATH" ]; then
DOCKER_EXEC tar -C "depends/SDKs" -xf "$OSX_SDK_PATH"
fi
if [[ $HOST = *-mingw32 ]]; then
DOCKER_EXEC update-alternatives --set $HOST-g++ \$\(which $HOST-g++-posix\)
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ include_directories(
if(UNIX AND NOT APPLE)
set(DEPENDS_PREFIX depends/x86_64-pc-linux-gnu)
elseif(APPLE)
set(DEPENDS_PREFIX depends/x86_64-apple-darwin16)
set(DEPENDS_PREFIX depends/x86_64-apple-darwin18)
elseif(WIN32)
set(DEPENDS_PREFIX depends/x86_64-w64-mingw32)
endif()
Expand Down
1 change: 1 addition & 0 deletions ci/Dockerfile.builder
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ RUN pip3 install jinja2
RUN pip3 install flake8==3.5.0
RUN pip3 install codespell==1.13.0
RUN pip3 install vulture==0.29
RUN pip3 install yq

# dash_hash
RUN git clone https://github.com/dashpay/dash_hash
Expand Down
12 changes: 7 additions & 5 deletions ci/build_depends.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@ ln -s $CACHE_DIR/sdk-sources depends/sdk-sources

mkdir -p depends/SDKs

if [ -n "$OSX_SDK" ]; then
if [ ! -f depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz ]; then
curl --location --fail $SDK_URL/MacOSX${OSX_SDK}.sdk.tar.gz -o depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz
if [ -n "$XCODE_VERSION" ]; then
OSX_SDK_BASENAME="Xcode-${XCODE_VERSION}-${XCODE_BUILD_ID}-extracted-SDK-with-libcxx-headers.tar.gz"
OSX_SDK_PATH="depends/sdk-sources/${OSX_SDK_BASENAME}"
if [ ! -f "$OSX_SDK_PATH" ]; then
curl --location --fail "${SDK_URL}/${OSX_SDK_BASENAME}" -o "$OSX_SDK_PATH"
fi
if [ -f depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz ]; then
tar -C depends/SDKs -xf depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz
if [ -f "$OSX_SDK_PATH" ]; then
tar -C depends/SDKs -xf "$OSX_SDK_PATH"
fi
fi

Expand Down
5 changes: 3 additions & 2 deletions ci/matrix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,10 @@ elif [ "$BUILD_TARGET" = "linux64_release" ]; then
export BITCOIN_CONFIG="--enable-zmq --enable-glibc-back-compat --enable-reduce-exports"
export PYZMQ=true
elif [ "$BUILD_TARGET" = "mac" ]; then
export HOST=x86_64-apple-darwin16
export HOST=x86_64-apple-darwin18
export BITCOIN_CONFIG="--enable-gui --enable-reduce-exports --disable-miner --enable-werror"
export OSX_SDK=10.14
export XCODE_VERSION=11.3.1
export XCODE_BUILD_ID=11C505
export GOAL="all deploy"
export RUN_UNITTESTS=false
export RUN_INTEGRATIONTESTS=false
Expand Down
4 changes: 2 additions & 2 deletions contrib/gitian-build.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ def build():

if args.macos:
print('\nCompiling ' + args.version + ' MacOS')
subprocess.check_call(['wget', '-N', '-P', 'inputs', 'https://bitcoincore.org/depends-sources/sdks/MacOSX10.14.sdk.tar.gz'])
subprocess.check_output(["echo '328aff47e28c17093d59a72712a9b2e62cd8a8b87bbe03f91abb32960b413f0f inputs/MacOSX10.14.sdk.tar.gz' | sha256sum -c"], shell=True)
subprocess.check_call(['wget', '-N', '-P', 'inputs', 'https://bitcoincore.org/depends-sources/sdks/Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz'])
subprocess.check_output(["echo '436df6dfc7073365d12f8ef6c1fdb060777c720602cc67c2dcf9a59d94290e38 inputs/Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz' | sha256sum -c"], shell=True)
subprocess.check_call(['bin/gbuild', '-j', args.jobs, '-m', args.memory, '--commit', 'dash='+args.commit, '--url', 'dash='+args.url, '../dash/contrib/gitian-descriptors/gitian-osx.yml'])
subprocess.check_call(['bin/gsign', '-p', args.sign_prog, '--signer', args.signer, '--release', args.version+'-osx-unsigned', '--destination', '../gitian.sigs/', '../dash/contrib/gitian-descriptors/gitian-osx.yml'])
subprocess.check_call('mv build/out/dashcore-*-osx-unsigned.tar.gz inputs/', shell=True)
Expand Down
15 changes: 8 additions & 7 deletions contrib/gitian-descriptors/gitian-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ script: |
export GZIP="-9n"
export TAR_OPTIONS="--mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME""
export TZ="UTC"
export BUILD_DIR=`pwd`
export BUILD_DIR="$PWD"
mkdir -p ${WRAP_DIR}
if test -n "$GBUILD_CACHE_ENABLED"; then
export SOURCES_PATH=${GBUILD_COMMON_CACHE}
Expand Down Expand Up @@ -128,7 +128,7 @@ script: |
cat << EOF > ${WRAP_DIR}/${prog}
#!/usr/bin/env bash
# GCCVERSION=${GCCVERSION}
REAL="`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1`"
REAL="$(which -a ${prog}-8 | grep -v ${WRAP_DIR}/${prog} | head -1)"
for var in "\$@"
do
if [ "\$var" = "-m32" ]; then
Expand All @@ -144,7 +144,7 @@ script: |
done

cd dash
BASEPREFIX=`pwd`/depends
BASEPREFIX="${PWD}/depends"
# Build dependencies for each host
for i in $HOSTS; do
EXTRA_INCLUDES="$EXTRA_INCLUDES_BASE/$i"
Expand All @@ -163,10 +163,11 @@ script: |

# Create the release tarball using (arbitrarily) the first host
./autogen.sh
CONFIG_SITE=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`/share/config.site ./configure --prefix=/
CONFIG_SITE=${BASEPREFIX}/$(echo "${HOSTS}" | awk '{print $1;}')/share/config.site ./configure --prefix=/
make dist
SOURCEDIST=`echo dashcore-*.tar.gz`
DISTNAME=`echo ${SOURCEDIST} | sed 's/.tar.*//'`
SOURCEDIST=$(echo dashcore-*.tar.gz)
DISTNAME=${SOURCEDIST/%.tar.gz}

# Correct tar file order
mkdir -p temp
pushd temp
Expand All @@ -183,7 +184,7 @@ script: |
export PATH=${BASEPREFIX}/${i}/native/bin:${ORIGPATH}
mkdir -p distsrc-${i}
cd distsrc-${i}
INSTALLPATH=`pwd`/installed/${DISTNAME}
INSTALLPATH="${PWD}/installed/${DISTNAME}"
mkdir -p ${INSTALLPATH}
tar --strip-components=1 -xf ../$SOURCEDIST

Expand Down
2 changes: 1 addition & 1 deletion contrib/gitian-descriptors/gitian-osx-signer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ script: |

WRAP_DIR=$HOME/wrapped
mkdir -p ${WRAP_DIR}
export PATH=`pwd`:$PATH
export PATH="$PWD":$PATH
FAKETIME_PROGS="dmg genisoimage"

# Create global faketime wrappers
Expand Down
22 changes: 11 additions & 11 deletions contrib/gitian-descriptors/gitian-osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ remotes:
- "url": "https://github.com/dashpay/dash.git"
"dir": "dash"
files:
- "MacOSX10.14.sdk.tar.gz"
- "Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz"
script: |
set -e -o pipefail

WRAP_DIR=$HOME/wrapped
HOSTS="x86_64-apple-darwin16"
HOSTS="x86_64-apple-darwin18"
CONFIGFLAGS="--enable-reduce-exports --disable-miner --disable-bench --disable-gui-tests GENISOIMAGE=$WRAP_DIR/genisoimage --enable-crash-hooks"
FAKETIME_HOST_PROGS=""
FAKETIME_PROGS="ar ranlib date dmg genisoimage"
Expand All @@ -46,7 +46,7 @@ script: |
export GZIP="-9n"
export TAR_OPTIONS="--mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME""
export TZ="UTC"
export BUILD_DIR=`pwd`
export BUILD_DIR="$PWD"
mkdir -p ${WRAP_DIR}
if test -n "$GBUILD_CACHE_ENABLED"; then
export SOURCES_PATH=${GBUILD_COMMON_CACHE}
Expand Down Expand Up @@ -104,10 +104,10 @@ script: |
export PATH=${WRAP_DIR}:${PATH}

cd dash
BASEPREFIX=`pwd`/depends
BASEPREFIX="${PWD}/depends"

mkdir -p ${BASEPREFIX}/SDKs
tar -C ${BASEPREFIX}/SDKs -xf ${BUILD_DIR}/MacOSX10.14.sdk.tar.gz
tar -C ${BASEPREFIX}/SDKs -xf ${BUILD_DIR}/Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz

# Build dependencies for each host
for i in $HOSTS; do
Expand All @@ -122,10 +122,10 @@ script: |

# Create the release tarball using (arbitrarily) the first host
./autogen.sh
CONFIG_SITE=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`/share/config.site ./configure --prefix=/
CONFIG_SITE=${BASEPREFIX}/$(echo "${HOSTS}" | awk '{print $1;}')/share/config.site ./configure --prefix=/
make dist
SOURCEDIST=`echo dashcore-*.tar.gz`
DISTNAME=`echo ${SOURCEDIST} | sed 's/.tar.*//'`
SOURCEDIST=$(echo dashcore-*.tar.gz)
DISTNAME=${SOURCEDIST/%.tar.gz}

# Correct tar file order
mkdir -p temp
Expand All @@ -143,7 +143,7 @@ script: |
export PATH=${BASEPREFIX}/${i}/native/bin:${ORIGPATH}
mkdir -p distsrc-${i}
cd distsrc-${i}
INSTALLPATH=`pwd`/installed/${DISTNAME}
INSTALLPATH="${PWD}/installed/${DISTNAME}"
mkdir -p ${INSTALLPATH}
tar --strip-components=1 -xf ../$SOURCEDIST

Expand Down Expand Up @@ -186,8 +186,8 @@ script: |
done
mkdir -p $OUTDIR/src
mv $SOURCEDIST $OUTDIR/src
mv ${OUTDIR}/${DISTNAME}-x86_64-apple-darwin16.tar.gz ${OUTDIR}/${DISTNAME}-osx64.tar.gz
mv ${OUTDIR}/${DISTNAME}-x86_64-apple-darwin16-debug.tar.gz ${OUTDIR}/${DISTNAME}-osx64-debug.tar.gz
mv ${OUTDIR}/${DISTNAME}-x86_64-apple-darwin18.tar.gz ${OUTDIR}/${DISTNAME}-osx64.tar.gz
mv ${OUTDIR}/${DISTNAME}-x86_64-apple-darwin18-debug.tar.gz ${OUTDIR}/${DISTNAME}-osx64-debug.tar.gz

# Compress ccache (otherwise the assert file will get too huge)
if [ "$CCACHE_DIR" != "" ]; then
Expand Down
6 changes: 3 additions & 3 deletions contrib/gitian-descriptors/gitian-win-signer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ files:
script: |
set -e -o pipefail

BUILD_DIR=`pwd`
BUILD_DIR="$PWD"
SIGDIR=${BUILD_DIR}/signature/win
UNSIGNED_DIR=${BUILD_DIR}/unsigned

Expand All @@ -35,7 +35,7 @@ script: |
./configure --without-gsf --without-curl --disable-dependency-tracking
make
find ${UNSIGNED_DIR} -name "*-unsigned.exe" | while read i; do
INFILE="`basename "${i}"`"
OUTFILE="`echo "${INFILE}" | sed s/-unsigned//`"
INFILE="$(basename "${i}")"
OUTFILE="${INFILE/%-unsigned}"
./osslsigncode attach-signature -in "${i}" -out "${OUTDIR}/${OUTFILE}" -sigin "${SIGDIR}/${INFILE}.pem"
done
12 changes: 6 additions & 6 deletions contrib/gitian-descriptors/gitian-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ script: |
export GZIP="-9n"
export TAR_OPTIONS="--mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME""
export TZ="UTC"
export BUILD_DIR=`pwd`
export BUILD_DIR="$PWD"
mkdir -p ${WRAP_DIR}
if test -n "$GBUILD_CACHE_ENABLED"; then
export SOURCES_PATH=${GBUILD_COMMON_CACHE}
Expand Down Expand Up @@ -137,7 +137,7 @@ script: |
export PATH=${WRAP_DIR}:${PATH}

cd dash
BASEPREFIX=`pwd`/depends
BASEPREFIX="${PWD}/depends"
# Build dependencies for each host
for i in $HOSTS; do
make ${MAKEOPTS} -C ${BASEPREFIX} HOST="${i}"
Expand All @@ -152,10 +152,10 @@ script: |

# Create the release tarball using (arbitrarily) the first host
./autogen.sh
CONFIG_SITE=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`/share/config.site ./configure --prefix=/
CONFIG_SITE=${BASEPREFIX}/$(echo "${HOSTS}" | awk '{print $1;}')/share/config.site ./configure --prefix=/
make dist
SOURCEDIST=`echo dashcore-*.tar.gz`
DISTNAME=`echo ${SOURCEDIST} | sed 's/.tar.*//'`
SOURCEDIST=$(echo dashcore-*.tar.gz)
DISTNAME=${SOURCEDIST/%.tar.gz}

# Correct tar file order
mkdir -p temp
Expand All @@ -175,7 +175,7 @@ script: |
export PATH=${BASEPREFIX}/${i}/native/bin:${ORIGPATH}
mkdir -p distsrc-${i}
cd distsrc-${i}
INSTALLPATH=`pwd`/installed/${DISTNAME}
INSTALLPATH="${PWD}/installed/${DISTNAME}"
mkdir -p ${INSTALLPATH}
tar --strip-components=1 -xf ../$SOURCEDIST

Expand Down
Loading