-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Travis: run full test suite on native macOS #16597
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
c155de1
to
f6014d8
Compare
c9c9198
to
4f602ce
Compare
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, 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. |
Are there travis tests which can proof it? Like your fork? |
Concept ACK. Will take a look at the base PR first. |
1e64a41
to
468621a
Compare
Travis is ignoring this PR and my branch atm. |
Can you enable travis for your forked repository? |
@emilengler I tried that, but it wasn't building there either. I'll wait until the previous PR is merged and then try again. |
@Sjors Ok I will fork your repository, then remove it from the parent and try to enable travis then |
@Sjors Doesn't work, take a look https://travis-ci.org/emilengler/bitcoin-sjors-test/requests. |
468621a
to
c74fbe3
Compare
cf63f09
to
c2e4c57
Compare
export LC_ALL=C.UTF-8 | ||
|
||
export HOST=x86_64-apple-darwin14 | ||
export BREW_PACKAGES="automake berkeley-db4 libtool boost miniupnpc openssl pkg-config protobuf qt qrencode librsvg pyenv ccache" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No reason to install protobuf
if we're not enabling BIP70.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dropped (in other branch, will push later)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we're building/testing only once natively, we should enable everything...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added it back and enabled BIP70 in the build.
c2e4c57
to
e1e6d22
Compare
cb6b7a4
to
185c201
Compare
Travis macOS passed! I added
|
185c201
to
26068f3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 26068f3 (looked at the diff on GitHub)
e7e3301
to
092d388
Compare
092d388
to
3cd5e59
Compare
ci/test/04_install.sh
Outdated
cd /usr/local/Homebrew || exit 1 | ||
git reset --hard origin/master | ||
${CI_RETRY_EXE} brew update |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MarcoFalke brew update
blew up on a previous run (can't find it anymore) and recommended these two lines to "fix" it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be worth rebasing the PR for a while to see if any other surprises show up.
3cd5e59
to
21c1601
Compare
# Temporarily disable errexit, because Travis macOS fails without error message | ||
set +o errexit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is where your sanity gives in...
21c1601
to
f2d3839
Compare
Review hint: git show -w Co-authored-by: MarcoFalke <falke.marco@gmail.com> Co-authored-by: keneanung <keneanung@googlemail.com> Co-authored-by: Vadim Peretokin <vperetokin@gmail.com>
f2d3839
to
1f6c650
Compare
re-ACK 1f6c650 |
set +o errexit | ||
pushd /usr/local/Homebrew || exit 1 | ||
git reset --hard origin/master | ||
popd || exit 1 | ||
set -o errexit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if you remove this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing initially because the brew cache is in a good state. But at some random other moment homebrew will be in a bad state and you'll need this.
# Cache only .git files under "/usr/local/Homebrew" so "brew update" does not take 5min every build | ||
# - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then find /usr/local/Homebrew \! -regex ".+\.git.+" -delete; fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this still needed?
The whole process takes 2 min without it: https://travis-ci.org/bitcoin/bitcoin/jobs/597848502#L100
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if it builds up any cruft over time, but if time doesn't creep up, then we can drop this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well it is commented out already, so I removed it in #17176
1f6c650 travis: run tests on macOS native (Sjors Provoost) Pull request description: Adds an additional Travis machine to run the functional test suite on native macOS Homebrew is not particularly Travis compatible, but I found some useful hints here: https://discourse.brew.sh/t/best-practice-for-homebrew-on-travis-brew-update-is-5min-to-build-time/5215/11 ACKs for top commit: MarcoFalke: re-ACK 1f6c650 Tree-SHA512: 3f19a1695fac53d4d6c2033a9c20be69294e3a798c84fd9bf6ae2aa7a6d92aa1dad1f62f4ee1ada9413fe7d05ee974050fa030fd2c547f33e0d5c0a3e74f64db
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Post merge code review ACK 1f6c650
Since this adds homebrew, I wonder if it fixes the scripted diff lint error I ran into #13728 (comment)
# Temporarily disable errexit, because Travis macOS fails without error message | ||
set +o errexit | ||
cd build || (echo "could not enter build directory"; exit 1) | ||
set -o errexit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The cd command succeeds and returns an error code? I guess this is calling some travis-wrapped cd
alias rather than the actual cd command? Could debug with type cd
. If a workaround is necessary, it would seem nicer to wrap the workaround in a safe_cd
function than repeat this errexit stuff different places.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Filed as good first issue. See #17178
|
||
mkdir -p depends/SDKs depends/sdk-sources | ||
if [ "$TRAVIS_OS_NAME" != "osx" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe should add a comment explaining this check. I'm confused about why all of this is skipped on osx. Does the depends build not work there? It would seem cleaner to use NO_DEPENDS variable to skip depends steps than to tie the decision to the travis operating system name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the review @ryanofsky . This check looks indeed redundant. Removed in #17176
1f6c650 travis: run tests on macOS native (Sjors Provoost) Pull request description: Adds an additional Travis machine to run the functional test suite on native macOS Homebrew is not particularly Travis compatible, but I found some useful hints here: https://discourse.brew.sh/t/best-practice-for-homebrew-on-travis-brew-update-is-5min-to-build-time/5215/11 ACKs for top commit: MarcoFalke: re-ACK 1f6c650 Tree-SHA512: 3f19a1695fac53d4d6c2033a9c20be69294e3a798c84fd9bf6ae2aa7a6d92aa1dad1f62f4ee1ada9413fe7d05ee974050fa030fd2c547f33e0d5c0a3e74f64db
Adds an additional Travis machine to run the functional test suite on native macOS
Homebrew is not particularly Travis compatible, but I found some useful hints here: https://discourse.brew.sh/t/best-practice-for-homebrew-on-travis-brew-update-is-5min-to-build-time/5215/11