.travis
folder to ci
and removes dependence on travis, so that the test script can be run anywhere.
.travis
folder to ci
and removes dependence on travis, so that the test script can be run anywhere.
0@@ -0,0 +1,8 @@
1+## ci scripts
2+
3+This directory contains scripts for each build step in each build stage.
4+
5+Currently three stages `lint`, `extended_lint` and `test` are defined. Each stage has it's own lifecycle, similar to the
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
Reviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
10+
11+To allow for a wide range of tested environments, but also ensure reproducibility to some extent, the test stage
12+requires `docker` to be installed. To install all requirements on Ubuntu, run
13+
14+```
15+sudo apt install docker.io ccache bash git
docker-ce
.
docker.io
is an “old” version and the docs recommend uninstalling it.
--mount
), so it should be fine as is.
Interesting. From the Docker documentation:
Older versions of Docker were called docker, docker.io , or docker-engine. If these are installed, uninstall them:
0sudo apt-get remove docker docker-engine docker.io containerd runc
I guess I don’t mind either way, just wasn’t sure after looking at those docs.
0@@ -0,0 +1,24 @@
1+## ci scripts
2+
3+This directory contains scripts for each build step in each build stage.
4+
5+Currently three stages `lint`, `extended_lint` and `test` are defined. Each stage has its own lifecycle, similar to the
6+[Travis CI lifecycle](https://docs.travis-ci.com/user/job-lifecycle#the-job-lifecycle). Every script in here is named
0@@ -0,0 +1,49 @@
1+#!/usr/bin/env bash
2+#
3+# Copyright (c) 2018 The Bitcoin Core developers
4+# Distributed under the MIT software license, see the accompanying
5+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
6+
7+export LC_ALL=C.UTF-8
8+
9+ccache echo "Create ccache dir, if it didn't exist"
0ccache echo "Creating ccache dir if it didn't already exist"
Concept ACK.
Have tested running the CI locally on macOS using Docker and ./ci/test_run_all.sh
. Everything seems to work as expected.
It’s a little annoying that we have to bring more bash scripts into this repo, but I guess they can just sit, and we wont have to modify/touch them at all.
edit: Could also add out/
and qa-assets/
to .gitignore
.
Have tested running the CI locally on macOS using Docker and ./ci/test_run_all.sh. Everything seems to work as expected.
Thanks for testing on mac!
So this is confirmed to be working on:
Also, this makes it easier to run the ci locally.
Concept ACK!
15+
16+__log_out() {
17+ echo "$1" 1>&2
18+}
19+
20+# Paramters: max_tries min_sleep max_sleep constant_sleep fail_script EXECUTION_COMMAND
81+Usage: $retry [options] -- execute command
82+ -h, -?, --help
83+ -v, --verbose Verbose output
84+ -t, --tries=# Set max retries: Default 10
85+ -s, --sleep=secs Constant sleep amount (seconds)
86+ -m, --min=secs Exponenetial Backoff: minimum sleep amount (seconds): Default 0.3
26@@ -27,3 +27,26 @@ task:
27 - gmake check ${MAKEJOBS} VERBOSE=1
28 functional_test_script:
29 - ./test/functional/test_runner.py --jobs 9 --ci --extended --exclude feature_dbcrash --combinedlogslen=1000 --quiet --failfast
30+task:
task
in mapping?
Yes, this is the correct syntax:
https://cirrus-ci.org/guide/writing-tasks/#task-execution-dependencies
41+ CCACHE_DIR: "/tmp/ccache_dir"
42+ ccache_cache:
43+ folder: "/tmp/ccache_dir"
44+ depends_cache:
45+ folder: "/tmp/cirrus-ci-build/depends/built"
46+ folder: "/tmp/cirrus-ci-build/depends/sdk-sources"
folder
in mapping?
I’m now seeing an error running this:
0configure.ac:40: installing 'build-aux/missing'
1src/Makefile.am: installing 'build-aux/depcomp'
2travis_fold:end:autogen
3
4travis_fold:start:configure
5configure: loading site script /Users/michael/github/bitcoin/depends/x86_64-unknown-linux-gnu/share/config.site
6configure: loading cache config.cache
7checking build system type... x86_64-pc-linux-gnu
8checking host system type... x86_64-unknown-linux-gnu
9checking for a BSD-compatible install... /usr/bin/install -c
10checking whether build environment is sane... yes
11checking for x86_64-unknown-linux-gnu-strip... no
12checking for strip... strip
13checking for a thread-safe mkdir -p... /bin/mkdir -p
14checking for gawk... no
15checking for mawk... mawk
16checking whether make sets $(MAKE)... yes
17checking whether make supports nested variables... yes
18configure: error: source directory already configured; run "make distclean" there first
19This file contains any messages produced by compilers while
20running configure, to aid debugging if configure makes a mistake.
21
22It was created by Bitcoin Core configure 0.18.99, which was
23generated by GNU Autoconf 2.69. Invocation command line was
24
25 $ ../configure --cache-file=config.cache --disable-dependency-tracking --prefix=/Users/michael/github/bitcoin/depends/x86_64-unknown-linux-gnu --bindir=/Users/michael/github/bitcoin/out/x86_64-unknown-linux-gnu/bin --libdir=/Users/michael/github/bitcoin/out/x86_64-unknown-linux-gnu/lib
source directory already configured; run "make distclean" there first
. Have you tried that?
Specifically cd /Users/michael/github/bitcoin && make distclean
.
The ci is generally assuming the the folder is a fresh git clone. If needed, that can be changed later on, but better not part of this pull.
It says source directory already configured; run “make distclean” there first. Have you tried that?
Shouldn’t that all be handled by the script? If not, then some docs about why you can’t run the tests twice in a row would be handy.
From: https://github.com/kadwanev/retry/tree/a1b1826bdb0a78189d5c70c858dc676f5133b1d7
git range-diff bitcoin/master fa9404d76d faeacf3269
I don’t think docker on windows can run Ubuntu containers
It can since https://docs.docker.com/docker-for-windows/wsl-tech-preview/
0aaron@pcdodo:~$ uname -a
1Linux pcdodo 4.19.57-microsoft-standard [#1](/bitcoin-bitcoin/1/) SMP Wed Jul 3 20:47:25 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
2aaron@pcdodo:~$ docker run ubuntu echo "I love Windows"; lsb_release -a
3I love Windows
4No LSB modules are available.
5Distributor ID: Ubuntu
6Description: Ubuntu 18.04.2 LTS
7Release: 18.04
8Codename: bionic
Actually it was already possible to use ubuntu docker containers on Windows but now it possible directly on top of the Windows Subsystem for Linux kernel.
Thanks ACK fa9404d - Maybe @sipsorcery or @NicolasDorier might also want to test here, then we’d have all OS’s covered? @fanquake I looked over the PR and successfully ran my appveyor build with the PR merged. Doesn’t seem to be anything Windows related in this PR? Ony travis and shell scripts. Or did you testing the script changes with the WSL/Mingw builds on Windows?
Thanks @sipsorcery. I also thought it was possible to run on Windows.
Or did you testing the script changes with the WSL/Mingw builds on Windows?
Yea I just meant checking out this PR, and testing/running the scripts, to make sure they were working in your Windows development setups.