dash/.gitlab-ci.yml

284 lines
7.2 KiB
YAML
Raw Normal View History

image: "ubuntu:bionic"
variables:
DOCKER_DRIVER: overlay2
FAST_MODE: "false" # when "true", only run linter on arm and unit/functional tests on linux64, skip everything else
workflow:
rules:
- when: always
stages:
- builder-image
- build-depends
- build
- test
builder-image:
stage: builder-image
image: docker:19.03.5
services:
- docker:19.03.5-dind
variables:
DOCKER_HOST: "tcp://docker:2375"
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ""
before_script:
- echo $CI_JOB_TOKEN | docker login -u gitlab-ci-token --password-stdin $CI_REGISTRY
script:
- cd ci
- docker pull $CI_REGISTRY_IMAGE:builder-$CI_COMMIT_REF_SLUG || true
- docker pull $CI_REGISTRY_IMAGE:builder-develop || true
- docker build --cache-from $CI_REGISTRY_IMAGE:builder-$CI_COMMIT_REF_SLUG --cache-from $CI_REGISTRY_IMAGE:builder-develop -t $CI_REGISTRY_IMAGE:builder-$CI_COMMIT_REF_SLUG -f Dockerfile.builder .
- docker push $CI_REGISTRY_IMAGE:builder-$CI_COMMIT_REF_SLUG
.build-depends-template:
stage: build-depends
image: $CI_REGISTRY_IMAGE:builder-$CI_COMMIT_REF_SLUG
variables:
SDK_URL: https://bitcoincore.org/depends-sources/sdks
OSX_SDK: "10.11"
MAKEJOBS: -j4
before_script:
- echo HOST=$HOST
- |
Merge #13617: release: require macOS 10.10+ 3828a79711 scripted-diff: prefer MAC_OSX over __APPLE__ (fanquake) fa6e841e89 gui: remove macOS ProgressBar workaround (fanquake) 68c272527f gui: remove SubstituteFonts (fanquake) 6c6dbd8af5 doc: mention that macOS 10.10 is now required (fanquake) 84b0cfa8b6 release: bump minimum required macOS to 10.10 (fanquake) 26b15df99d depends: set OSX_MIN_VERSION to 10.10 (fanquake) Pull request description: Closes #13362 d99abfddb0c8f2111340a6127e77cc686e0043d8 This workaround should no longer be required, as it should have only been in use when compiled with the 10.7 SDK, which we haven't been building with for a while now. 5bc5ae30982a0f0f6a9804b05d99434af770c724 The bugreport linked with this code is for an unrelated? issue, however from what I can tell the correct QTBUG is this one https://bugreports.qt.io/browse/QTBUG-20880. Reading though the discussion there, it seems that the way progress bars are animated changed in macOS 10.10. Qt was patched [here (5.5+)](https://codereview.qt-project.org/#/c/112379/): > Disable progress bar animations on 10.10 Yosemite and higher - the native style does not animate them any more. Keep the indeterminate progress bar animation. Given all of that, I don't think this is worth keeping around, as it would seem to only be useful in the case that a macOS user is compiling with a Qt < 5.5. That should be pretty unlikely, as we don't support downloaded Qt binaries, and brew currently provides [5.11.1](https://github.com/Homebrew/homebrew-core/blob/571b46213c70ca1573da6d0425b0bd6df34961ee/Formula/qt.rb). Tree-SHA512: 4278cb30cc9bcb313e166129ecf032c808995f8b51a3123637c47860a0010ac88f86f82ec44792153b6b1e5cca595f25013b2eaeae80194647b9ce4f7eaf32c1
2018-07-25 12:52:39 +02:00
if [ "$HOST" = "x86_64-apple-darwin14" ]; then
echo "Downloading MacOS SDK"
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
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
cache:
# Let all branches share the same cache, which is ok because the depends subsystem is able to handle this properly (it works with hashes of all scripts)
key: ${CI_JOB_NAME}
paths:
- $CI_PROJECT_DIR/depends/built
- $CI_PROJECT_DIR/depends/sdk-sources
artifacts:
name: depends
when: on_success
paths:
- $CI_PROJECT_DIR/depends/$HOST
- $CI_PROJECT_DIR/depends/SDKs
.base-template:
image: $CI_REGISTRY_IMAGE:builder-$CI_COMMIT_REF_SLUG
before_script:
- export CACHE_DIR=$CI_PROJECT_DIR/cache
- echo BUILD_TARGET=$BUILD_TARGET
- source ./ci/matrix.sh
# Setup some environment variables
- |
if [ "$CI_EXTERNAL_PULL_REQUEST_IID" != "" ]; then
export PULL_REQUEST="true"
else
# CI_EXTERNAL_PULL_REQUEST_IID is false every time until https://gitlab.com/gitlab-org/gitlab/issues/5667 is done
# Until then, we're using https://github.com/brndnmtthws/labhub atm to mirror Github pull requests as branches into Gitlab,
# which allows us to use Gitlab CI for Github. The following check detects such mirrored branches.
if [[ $CI_COMMIT_REF_NAME =~ ^pr-[^/]*/[^/]*/[^/]*/[^/]*$ ]]; then
export PULL_REQUEST="true"
# CI_COMMIT_BEFORE_SHA is also invalid until #5667 is implemented, so we need to figure it out by ourself
git fetch origin develop
export CI_COMMIT_BEFORE_SHA="$(git merge-base origin/develop HEAD)"
else
export PULL_REQUEST="false"
fi
fi
- export COMMIT_RANGE="$CI_COMMIT_BEFORE_SHA..$CI_COMMIT_SHA"
- export JOB_NUMBER="$CI_JOB_ID"
- export HOST_SRC_DIR=$CI_PROJECT_DIR
- echo PULL_REQUEST=$PULL_REQUEST COMMIT_RANGE=$COMMIT_RANGE HOST_SRC_DIR=$HOST_SRC_DIR CACHE_DIR=$CACHE_DIR
- echo "Commit log:" && git log --format=fuller -1
.build-template:
stage: build
extends: .base-template
script:
- ./ci/build_src.sh
- ./ci/test_unittests.sh # Run unit tests in build stage to avoid creating too many parallel jobs
cache:
# Let all branches share the same cache, which is ok because ccache is able to handle it
key: ${CI_JOB_NAME}
paths:
- $CI_PROJECT_DIR/cache/ccache
artifacts:
name: binaries
when: always
paths:
- $CI_PROJECT_DIR/build-ci
expire_in: 3 days
.test-template:
stage: test
extends: .base-template
variables:
Backport 11796 + 11774 (#3612) * Merge #11796: [tests] Functional test naming convention 5fecd84 [tests] Remove redundant import in blocktools.py test (Anthony Towns) 9b20bb4 [tests] Check tests conform to naming convention (Anthony Towns) 7250b4e [tests] README.md nit fixes (Anthony Towns) 82b2712 [tests] move witness util functions to blocktools.py (John Newbery) 1e10854 [tests] [docs] update README for new test naming scheme (John Newbery) Pull request description: Splitting #11774 into two parts -- this part updates the README with the proposed naming convention, and adds some checks to test_runner.py that the number of tests violating the naming convention doesn't increase too much. Idea is this part of the change should not introduce merge conflicts or require much rebasing, so reviews of the complicated bits won't become invalidated too often; while the second part will just be file renames, which will require regular rebasing and will introduce merge conflicts with pending PRs, but can be merged later, and should also be much easier to review, since it will only include relatively trivial changes. Tree-SHA512: b96557d41714addbbfe2aed62fb5a48639eaeb1eb3aba30ac1b3a86bb3cb8d796c6247f9c414c4695c4bf54c0ec9968ac88e2f88fb62483bc1a2f89368f7fc80 * update violation count Signed-off-by: pasta <pasta@dashboost.org> * Merge #11774: [tests] Rename functional tests 6f881cc880 [tests] Remove EXPECTED_VIOLATION_COUNT (Anthony Towns) 3150b3fea7 [tests] Rename misc functional tests. (Anthony Towns) 81b79f2c39 [tests] Rename rpc_* functional tests. (Anthony Towns) 61b8f7f273 [tests] Rename p2p_* functional tests. (Anthony Towns) 90600bc7db [tests] Rename wallet_* functional tests. (Anthony Towns) ca6523d0c8 [tests] Rename feature_* functional tests. (Anthony Towns) Pull request description: This PR changes the functional tests to have a consistent naming scheme: tests for individual RPC methods are named rpc_... tests for interfaces (REST, ZMQ, RPC features) are named interface_... tests that explicitly test the p2p interface are named p2p_... tests for wallet features are named wallet_... tests for mining features are named mining_... tests for mempool behaviour are named mempool_... tests for full features that aren't wallet/mining/mempool are named feature_... Rationale: it's sometimes difficult for new contributors to know what's already covered by existing tests and where new tests should be added. Naming in a consistent fashion makes it easier to see what's already covered at a glance. Tree-SHA512: 4246790552d42bbd95f6d5bdf67702b81b3b2c583ce7eaf1fe6d8e254721279b47315973c6e9ae82dad6e4c747f12188160764bf2624c0f8f3b4d39330ec8b16 * rename tests and edit associated strings to align test-suite with test name standards Signed-off-by: pasta <pasta@dashboost.org> * fix grammar in test/functional/test_runner.py Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com> * ci: Fix excluded test names * rename feature_privatesend.py to rpc_privatesend.py Signed-off-by: pasta <pasta@dashboost.org> Co-authored-by: Wladimir J. van der Laan <laanwj@gmail.com> Co-authored-by: MarcoFalke <falke.marco@gmail.com> Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com> Co-authored-by: xdustinface <xdustinfacex@gmail.com>
2020-07-17 01:44:20 +02:00
INTEGRATION_TESTS_ARGS: "--extended --exclude feature_pruning,feature_dbcrash"
script:
- echo "INTEGRATION_TESTS_ARGS=${INTEGRATION_TESTS_ARGS}"
- ./ci/test_integrationtests.sh $INTEGRATION_TESTS_ARGS
after_script:
- mkdir -p $CI_PROJECT_DIR/testlogs
artifacts:
name: testlogs
when: always
paths:
- $CI_PROJECT_DIR/testlogs
expire_in: 3 days
.skip-in-fast-mode-template:
rules:
- if: '$FAST_MODE == "true"'
when: never
- when: always
###
arm-linux-gnueabihf:
extends: .build-depends-template
variables:
HOST: arm-linux-gnueabihf
i686-w64-mingw32:
extends:
- .build-depends-template
- .skip-in-fast-mode-template
variables:
HOST: i686-w64-mingw32
x86_64-w64-mingw32:
extends:
- .build-depends-template
- .skip-in-fast-mode-template
variables:
HOST: x86_64-w64-mingw32
i686-pc-linux-gnu:
extends:
- .build-depends-template
- .skip-in-fast-mode-template
variables:
HOST: i686-pc-linux-gnu
x86_64-unknown-linux-gnu-debug:
extends: .build-depends-template
variables:
HOST: x86_64-unknown-linux-gnu
DEP_OPTS: "DEBUG=1"
x86_64-unknown-linux-gnu-nowalet:
extends:
- .build-depends-template
- .skip-in-fast-mode-template
variables:
HOST: x86_64-unknown-linux-gnu
DEP_OPTS: "NO_WALLET=1"
x86_64-unknown-linux-gnu-release:
extends:
- .build-depends-template
- .skip-in-fast-mode-template
variables:
HOST: x86_64-unknown-linux-gnu
DEP_OPTS: "NO_UPNP=1"
Merge #13617: release: require macOS 10.10+ 3828a79711 scripted-diff: prefer MAC_OSX over __APPLE__ (fanquake) fa6e841e89 gui: remove macOS ProgressBar workaround (fanquake) 68c272527f gui: remove SubstituteFonts (fanquake) 6c6dbd8af5 doc: mention that macOS 10.10 is now required (fanquake) 84b0cfa8b6 release: bump minimum required macOS to 10.10 (fanquake) 26b15df99d depends: set OSX_MIN_VERSION to 10.10 (fanquake) Pull request description: Closes #13362 d99abfddb0c8f2111340a6127e77cc686e0043d8 This workaround should no longer be required, as it should have only been in use when compiled with the 10.7 SDK, which we haven't been building with for a while now. 5bc5ae30982a0f0f6a9804b05d99434af770c724 The bugreport linked with this code is for an unrelated? issue, however from what I can tell the correct QTBUG is this one https://bugreports.qt.io/browse/QTBUG-20880. Reading though the discussion there, it seems that the way progress bars are animated changed in macOS 10.10. Qt was patched [here (5.5+)](https://codereview.qt-project.org/#/c/112379/): > Disable progress bar animations on 10.10 Yosemite and higher - the native style does not animate them any more. Keep the indeterminate progress bar animation. Given all of that, I don't think this is worth keeping around, as it would seem to only be useful in the case that a macOS user is compiling with a Qt < 5.5. That should be pretty unlikely, as we don't support downloaded Qt binaries, and brew currently provides [5.11.1](https://github.com/Homebrew/homebrew-core/blob/571b46213c70ca1573da6d0425b0bd6df34961ee/Formula/qt.rb). Tree-SHA512: 4278cb30cc9bcb313e166129ecf032c808995f8b51a3123637c47860a0010ac88f86f82ec44792153b6b1e5cca595f25013b2eaeae80194647b9ce4f7eaf32c1
2018-07-25 12:52:39 +02:00
x86_64-apple-darwin14:
extends:
- .build-depends-template
- .skip-in-fast-mode-template
variables:
Merge #13617: release: require macOS 10.10+ 3828a79711 scripted-diff: prefer MAC_OSX over __APPLE__ (fanquake) fa6e841e89 gui: remove macOS ProgressBar workaround (fanquake) 68c272527f gui: remove SubstituteFonts (fanquake) 6c6dbd8af5 doc: mention that macOS 10.10 is now required (fanquake) 84b0cfa8b6 release: bump minimum required macOS to 10.10 (fanquake) 26b15df99d depends: set OSX_MIN_VERSION to 10.10 (fanquake) Pull request description: Closes #13362 d99abfddb0c8f2111340a6127e77cc686e0043d8 This workaround should no longer be required, as it should have only been in use when compiled with the 10.7 SDK, which we haven't been building with for a while now. 5bc5ae30982a0f0f6a9804b05d99434af770c724 The bugreport linked with this code is for an unrelated? issue, however from what I can tell the correct QTBUG is this one https://bugreports.qt.io/browse/QTBUG-20880. Reading though the discussion there, it seems that the way progress bars are animated changed in macOS 10.10. Qt was patched [here (5.5+)](https://codereview.qt-project.org/#/c/112379/): > Disable progress bar animations on 10.10 Yosemite and higher - the native style does not animate them any more. Keep the indeterminate progress bar animation. Given all of that, I don't think this is worth keeping around, as it would seem to only be useful in the case that a macOS user is compiling with a Qt < 5.5. That should be pretty unlikely, as we don't support downloaded Qt binaries, and brew currently provides [5.11.1](https://github.com/Homebrew/homebrew-core/blob/571b46213c70ca1573da6d0425b0bd6df34961ee/Formula/qt.rb). Tree-SHA512: 4278cb30cc9bcb313e166129ecf032c808995f8b51a3123637c47860a0010ac88f86f82ec44792153b6b1e5cca595f25013b2eaeae80194647b9ce4f7eaf32c1
2018-07-25 12:52:39 +02:00
HOST: x86_64-apple-darwin14
###
arm-linux-build:
extends: .build-template
needs:
- arm-linux-gnueabihf
variables:
BUILD_TARGET: arm-linux
win32-build:
extends:
- .build-template
- .skip-in-fast-mode-template
needs:
- i686-w64-mingw32
variables:
BUILD_TARGET: win32
win64-build:
extends:
- .build-template
- .skip-in-fast-mode-template
needs:
- x86_64-w64-mingw32
variables:
BUILD_TARGET: win64
linux32-build:
extends:
- .build-template
- .skip-in-fast-mode-template
needs:
- i686-pc-linux-gnu
variables:
BUILD_TARGET: linux32
linux64-build:
extends: .build-template
needs:
- x86_64-unknown-linux-gnu-debug
variables:
BUILD_TARGET: linux64
linux64_nowallet-build:
extends:
- .build-template
- .skip-in-fast-mode-template
needs:
- x86_64-unknown-linux-gnu-nowalet
variables:
BUILD_TARGET: linux64_nowallet
linux64_release-build:
extends:
- .build-template
- .skip-in-fast-mode-template
needs:
- x86_64-unknown-linux-gnu-release
variables:
BUILD_TARGET: linux64_release
mac-build:
extends:
- .build-template
- .skip-in-fast-mode-template
needs:
Merge #13617: release: require macOS 10.10+ 3828a79711 scripted-diff: prefer MAC_OSX over __APPLE__ (fanquake) fa6e841e89 gui: remove macOS ProgressBar workaround (fanquake) 68c272527f gui: remove SubstituteFonts (fanquake) 6c6dbd8af5 doc: mention that macOS 10.10 is now required (fanquake) 84b0cfa8b6 release: bump minimum required macOS to 10.10 (fanquake) 26b15df99d depends: set OSX_MIN_VERSION to 10.10 (fanquake) Pull request description: Closes #13362 d99abfddb0c8f2111340a6127e77cc686e0043d8 This workaround should no longer be required, as it should have only been in use when compiled with the 10.7 SDK, which we haven't been building with for a while now. 5bc5ae30982a0f0f6a9804b05d99434af770c724 The bugreport linked with this code is for an unrelated? issue, however from what I can tell the correct QTBUG is this one https://bugreports.qt.io/browse/QTBUG-20880. Reading though the discussion there, it seems that the way progress bars are animated changed in macOS 10.10. Qt was patched [here (5.5+)](https://codereview.qt-project.org/#/c/112379/): > Disable progress bar animations on 10.10 Yosemite and higher - the native style does not animate them any more. Keep the indeterminate progress bar animation. Given all of that, I don't think this is worth keeping around, as it would seem to only be useful in the case that a macOS user is compiling with a Qt < 5.5. That should be pretty unlikely, as we don't support downloaded Qt binaries, and brew currently provides [5.11.1](https://github.com/Homebrew/homebrew-core/blob/571b46213c70ca1573da6d0425b0bd6df34961ee/Formula/qt.rb). Tree-SHA512: 4278cb30cc9bcb313e166129ecf032c808995f8b51a3123637c47860a0010ac88f86f82ec44792153b6b1e5cca595f25013b2eaeae80194647b9ce4f7eaf32c1
2018-07-25 12:52:39 +02:00
- x86_64-apple-darwin14
variables:
BUILD_TARGET: mac
###
linux32-test:
extends:
- .test-template
- .skip-in-fast-mode-template
needs:
- linux32-build
variables:
BUILD_TARGET: linux32
linux64-test:
extends: .test-template
needs:
- linux64-build
variables:
BUILD_TARGET: linux64