-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Travis: Build tests on Ubuntu 18.04 with docker #13215
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
|
I can't see any downside, so Concept ACK. |
|
Can you elaborate the motivation behind this change? |
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.
Concept ACK.
Maybe it should also cache docker layers? Similar to http://circleci.com/docs/1.0/docker/#caching-docker-layers.
Edit: seems to take around 30 to 40 seconds in pulling images and installing extra packages.
.travis.yml
Outdated
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.
Remove double space.
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.
Done.
|
@promag I presume the motivation is that gitian will (soon) use bionic, so having a similar configuration run on travis isn't that bad. Also, it untangles us a bit from the travis environments and changes, as we use the vanilla bionic docker. So reproducing issues could potentially be easier or harder because it uses docker ... I have no strong opinion based on that, but since the new qt "requires" bionic for windows cross builds, I am slightly in favor of this change. |
We will bump our gitian build system to Ubuntu 18.04 since 0.17, so I think we might need to have the same build environment as the gitian build. Also, once we've merged the back-compat code, we could run the executable both on 14.04 and 18.04 to test if the back-compat code would work. |
|
This will likely fix the build on #12873 by (inadvertently) using a more recent version of SSL that doesn't cause the deadlock warning system to flare up. The job duration times don't seem adversely affected by this change. Concept ACK |
|
Please remove the [WIP] from the commit title when this is ready for review. |
.travis.yml
Outdated
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.
Small thing, but could we add
- DOCKER_EXEC="docker exec ${DOCKER_ID}"to cut down on some of the boilerplate below?
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.
Sure
|
utACK 9e7924c |
I've tested this, |
|
@ken2812221 indeed in travis it's fast. utACK 9e7924c. |
|
utACK 9e7924c0cb0995f8df6cca5d04b576e5b56038a9 |
.travis.yml
Outdated
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.
nit: I'd prefer if we only write the environment variables that are specified in the yaml (global env and job env). Currently this also exports a lot of travis specific junk, which shouldn't be necessary. No strong opinion, though, as I am not aware how to achieve this.
.travis.yml
Outdated
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.
nits:
- Please replace the
-vwith the more verbose--mount type=bind,src=....,dst=...., which is suggested in the docker docs - You overwrite the
CCACHE_DIRsome lines above, but don't use that value here. Any reason for that? - Please replace the privliledged flag with just
--cap-add SYS_ADMINand add a comment why this is required or make it specific to the windows build.
.travis.yml
Outdated
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 fails, since it is executed on the host, not via DOCKER_EXEC.
|
Tested ACK 9e7924c0cb0995f8df6cca5d04b576e5b56038a9 (after fixing the failure) Also left a couple of nits in the process, you can safely ignore them. |
.travis.yml
Outdated
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 assume BOOST_TEST_RANDOM and DISPLAY needs to be passed down as well?
|
re-ACK 09b26751e0 |
|
Playing around with this now. |
.travis.yml
Outdated
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.
Why is this needed?
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.
In order to set wine-binfmt
.travis.yml
Outdated
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? IIRC it was an artifact of needing a non-default wine.
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.
Yes, this is needed. wine32 is only available on i386 platform. Here is the link: https://packages.ubuntu.com/bionic/wine32
.travis.yml
Outdated
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 dropped the "travis_wait 50", but I guess we're ok without it now?
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.
travis_wait is incompitable with docker. This is a known issue.
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 think we may not need this travis_wait anymore, due to several improvements to the unit tests' runtimes.
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.
@sipa is correct. See #12970 (comment) for background. The current run time (on the windows jobs) in this pull:
i686-w64-mingw32: 245.895077045 s
x86_64-w64-mingw32: 95.965838938 s
|
Thanks for addressing my questions. utACK. @laanwj I'd like to have a chance to look at the qt/gitian changes as well. Mind giving me until the end of this week to get to them? Ideally we'd get all of those in at once so everything remains in sync. |
.travis.yml
Outdated
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 incorrectly assumed that apt is an alias for apt-get and asked you to change it. This was wrong, so feel free to change it back to apt-get. Sorry.
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.
Never mind
|
Update: also expose CONFIG_SHELL into docker |
|
re-utACK 67cfb45 |
.travis.yml
Outdated
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.
nit: Could reuse CONFIG_SHELL as below and skip exporting USE_SHELL or is there a reason to have two separate env vars with the same value?
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.
Done
|
re-ACK 67cfb4537a |
jnewbery
left a comment
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.
Concept ACK.
Build 4 here: https://travis-ci.org/bitcoin/bitcoin/jobs/380317076 took 36 minutes, which seems to be much longer than normal. I don't know whether that's caused by the changes in this PR or whether it's just natural variance.
|
@jnewbery Because I just modify the enviroment variable on that one and travis read caches based on enviroment variable. So it needs to recompile everything. |
.travis.yml
Outdated
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.
Can we remove this now?
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 think we mirror the pwd for the travis vm and the docker container. Otherwise a cat config.log on the travis vm wouldn't work, I presume.
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.
Oh yeah, it seems this one can be removed. Though, no harm in leaving it in, I guess.
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, cat config.log below would not work 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.
ah, makes sense. Thanks
|
How about add |
|
re-utACK a182c9d |
.travis.yml
Outdated
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.
bash: CONFIG_SHELL: command not found
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.
Fixed.
|
re-utACK 59e9688 |
jamesob
left a comment
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.
re-utACK 59e9688
jamesob
left a comment
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.
re-utACK 59e9688
59e9688 Travis: Build tests on Ubuntu 18.04 with docker (Chun Kuan Lee) Pull request description: Compile and run tests on Ubuntu 18.04 docker. Tree-SHA512: 4ae5f0cf666abeff2f3e3f541d33e5c76970c5129e60d0299317d73621fafa6f0f1c6cfe7a7d1089200f29ecb1a0a61a22bc116474eb5226282939e0beb37cb8
Compile and run tests on Ubuntu 18.04 docker.