Skip to content
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

travis: Enable qt for all jobs #13515

Merged
merged 1 commit into from
Oct 26, 2018
Merged

travis: Enable qt for all jobs #13515

merged 1 commit into from
Oct 26, 2018

Conversation

ken2812221
Copy link
Contributor

@ken2812221 ken2812221 commented Jun 21, 2018

  • If depends build take more than 20 mins, skip Bitcoin Core build to store depends caches and mark it fail. Then restart the job for Bitcoin Core build.
  • Enable Qt build for Windows and 32-bit Linux
  • Enable wallet for depends x86-64 Linux
  • Disable gui tests for Windows since they are not supported

This would be helpful for upgrading Qt (#12971) and protobuf (#13513)

@fanquake fanquake added the Tests label Jun 21, 2018
.travis.yml Outdated
# Win64
- HOST=x86_64-w64-mingw32 DEP_OPTS="NO_QT=1" PACKAGES="python3 nsis g++-mingw-w64-x86-64 wine-binfmt wine64" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-reduce-exports"
- HOST=x86_64-w64-mingw32 PACKAGES="python3 nsis g++-mingw-w64-x86-64 wine-binfmt wine64" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-reduce-exports --disable-gui-tests"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might as well change "install" to "deploy", so we get the setup.exe as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure

@maflcko
Copy link
Member

maflcko commented Jun 21, 2018

Would be nicer if travis natively supported multi-job-multi-stage builds, but yeah, maybe this hack is required.

@DrahtBot
Copy link
Contributor

DrahtBot commented Jun 30, 2018

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.

@ken2812221 ken2812221 changed the title travis: Enable Qt build for Windows and 32-bit Linux travis: Enable Qt build for Windows , i686 and arm Linux Jul 18, 2018
@ken2812221
Copy link
Contributor Author

Update: Enable qt for arm

.travis.yml Outdated
- if [ "$RUN_TESTS" = "true" ]; then DOCKER_EXEC LD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/depends/$HOST/lib make $MAKEJOBS check VERBOSE=1; fi
- if [ "$TRAVIS_EVENT_TYPE" = "cron" ]; then extended="--extended --exclude feature_pruning,feature_dbcrash"; fi
- if [ "$RUN_TESTS" = "true" ]; then DOCKER_EXEC test/functional/test_runner.py --combinedlogslen=4000 --coverage --quiet --failfast ${extended}; fi
# Skip Bitcoin Core build if depends build take more than 20 mins.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm. Not sure about that. We'd have to manually reset travis on all pull requests that are affected by this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'd have to manually reset travis on all pull requests that are affected by this.

We can clear the cache of all PRs to solve this just like what we do after migrate tests to docker.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I mean is that a early exit should not make travis green. Maybe add an echo "Travis early exit to cache current state" && false somewhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does not make travis green. If test $SECONDS -lt 1200 has failed, travis would turn out red. But it's a good idea to add error message.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah thanks for the clarification. I missed that.

.travis.yml Outdated
- if [ "$RUN_TESTS" = "true" ]; then BEGIN_FOLD functional-tests; DOCKER_EXEC test/functional/test_runner.py --combinedlogslen=4000 --coverage --quiet --failfast ${extended}; END_FOLD; fi
# Skip Bitcoin Core build if depends build take more than 20 mins.
- |
( test $SECONDS -lt 1200 || ( echo Travis early exit to cache current state && false ) ) && (
Copy link
Contributor

@scravy scravy Aug 1, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could simply be its own line in the script section.

I really like the rest of the script to be joined into a single block using the | YAML goodness, but putting this check on an individual line (- ...) would spare the ) && ( LOTSOFLINES ) awkwardness.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I learned in #13863 – if you split the script like that then the exit codes of the commands in each line will not make the script fail, i.e. if the unit tests fail the build will not fail.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I'll work on this after #13836 merged.

@ken2812221 ken2812221 changed the title travis: Enable Qt build for Windows , i686 and arm Linux travis: avoid timeout without saving caches, also enable all qt Aug 3, 2018
@ken2812221
Copy link
Contributor Author

It's time to make Mac build work on master again.

.travis.yml Outdated
- if [ "$RUN_TESTS" = "true" ]; then BEGIN_FOLD functional-tests; DOCKER_EXEC test/functional/test_runner.py --combinedlogslen=4000 --coverage --quiet --failfast ${extended}; END_FOLD; fi
# Skip Bitcoin Core build if depends build take more than 20 mins.
- |
( test $SECONDS -lt 1200 || ( echo Travis early exit to cache current state && false ) ) && (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I learned in #13863 – if you split the script like that then the exit codes of the commands in each line will not make the script fail, i.e. if the unit tests fail the build will not fail.

.travis.yml Outdated
@@ -123,12 +123,11 @@ jobs:
RUN_TESTS=true
GOAL="install"
BITCOIN_CONFIG="--enable-zmq --with-incompatible-bdb --enable-glibc-back-compat --enable-reduce-exports --with-gui=qt5 CPPFLAGS=-DDEBUG_LOCKORDER"
# x86_64 Linux, No wallet
# x86_64 Linux
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this change intentional? I find it very handy to have a NO_WALLET build available. It has happened to me before that I changed something in a way which required the wallet in a place which does not require a wallet overall. This particular travis build caught that.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I just noticed your description does mention that. So it is intentional. My comment still stands though, I find it beneficial to have a no-wallet build available. In a perfect world a build would build all possible combinations of build flags, in this imperfect world it can at least check the no-wallet case.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, will undo this.

@ken2812221 ken2812221 reopened this Aug 30, 2018
@ken2812221 ken2812221 changed the title travis: avoid timeout without saving caches, also enable all qt travis: Avoid being timeout without saving caches, also enable qt builds for all jobs if available Sep 1, 2018
@ken2812221
Copy link
Contributor Author

This is ready for review. Thanks for #13863, I don't have to do a lot of line changes.

@maflcko
Copy link
Member

maflcko commented Sep 4, 2018

As this is effectively reverting a33b7c9, could the GOALs be changed to deploy?

@ken2812221
Copy link
Contributor Author

@MarcoFalke Changed goals to deploy, also revert 3d69853 because of cf01fd6

.travis.yml Show resolved Hide resolved
@ken2812221 ken2812221 changed the title travis: Avoid being timeout without saving caches, also enable qt builds for all jobs if available travis: Avoid timeout without saving caches, also enable qt builds for all jobs if available Sep 30, 2018
@ken2812221 ken2812221 changed the title travis: Avoid timeout without saving caches, also enable qt builds for all jobs if available travis: Enable qt for all jobs Oct 11, 2018
Copy link
Member

@Sjors Sjors left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concept ACK

@@ -34,7 +34,7 @@ install:
before_script:
- set -o errexit; source .travis/test_05_before_script.sh
script:
- set -o errexit; source .travis/test_06_script.sh
- if [ $SECONDS -gt 1200 ]; then set +o errexit; echo "Travis early exit to cache current state"; false; else set -o errexit; source .travis/test_06_script.sh; fi
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be in the before_script?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

before_script does the depends build, which should be cached, so no?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't know chache was discared during a premature exit. If so, then this makes sense.

@maflcko maflcko merged commit 3387bb0 into bitcoin:master Oct 26, 2018
maflcko pushed a commit that referenced this pull request Oct 26, 2018
3387bb0 travis: avoid timeout without saving caches, also enable all qt (Chun Kuan Lee)

Pull request description:

  - If depends build take more than 20 mins, skip Bitcoin Core build to store depends caches and mark it fail. Then restart the job for Bitcoin Core build.
  - Enable Qt build for Windows and 32-bit Linux
  - Enable wallet for depends x86-64 Linux
  - Disable gui tests for Windows since they are not supported

  This would be helpful for upgrading Qt (#12971) and protobuf (#13513)

Tree-SHA512: e943cbd848d90f9f70e29c94ed717f96ad2c2d27b433bafea762015756a2d2794fc28976c54aee087bf0f3726ac2c9140920272445a902038719b956e2160cf9
@ken2812221 ken2812221 deleted the travis_qt branch October 27, 2018 07:47
Munkybooty pushed a commit to Munkybooty/dash that referenced this pull request Jul 21, 2021
3387bb0 travis: avoid timeout without saving caches, also enable all qt (Chun Kuan Lee)

Pull request description:

  - If depends build take more than 20 mins, skip Bitcoin Core build to store depends caches and mark it fail. Then restart the job for Bitcoin Core build.
  - Enable Qt build for Windows and 32-bit Linux
  - Enable wallet for depends x86-64 Linux
  - Disable gui tests for Windows since they are not supported

  This would be helpful for upgrading Qt (bitcoin#12971) and protobuf (bitcoin#13513)

Tree-SHA512: e943cbd848d90f9f70e29c94ed717f96ad2c2d27b433bafea762015756a2d2794fc28976c54aee087bf0f3726ac2c9140920272445a902038719b956e2160cf9
Munkybooty pushed a commit to Munkybooty/dash that referenced this pull request Jul 21, 2021
3387bb0 travis: avoid timeout without saving caches, also enable all qt (Chun Kuan Lee)

Pull request description:

  - If depends build take more than 20 mins, skip Bitcoin Core build to store depends caches and mark it fail. Then restart the job for Bitcoin Core build.
  - Enable Qt build for Windows and 32-bit Linux
  - Enable wallet for depends x86-64 Linux
  - Disable gui tests for Windows since they are not supported

  This would be helpful for upgrading Qt (bitcoin#12971) and protobuf (bitcoin#13513)

Tree-SHA512: e943cbd848d90f9f70e29c94ed717f96ad2c2d27b433bafea762015756a2d2794fc28976c54aee087bf0f3726ac2c9140920272445a902038719b956e2160cf9
Munkybooty pushed a commit to Munkybooty/dash that referenced this pull request Jul 22, 2021
3387bb0 travis: avoid timeout without saving caches, also enable all qt (Chun Kuan Lee)

Pull request description:

  - If depends build take more than 20 mins, skip Bitcoin Core build to store depends caches and mark it fail. Then restart the job for Bitcoin Core build.
  - Enable Qt build for Windows and 32-bit Linux
  - Enable wallet for depends x86-64 Linux
  - Disable gui tests for Windows since they are not supported

  This would be helpful for upgrading Qt (bitcoin#12971) and protobuf (bitcoin#13513)

Tree-SHA512: e943cbd848d90f9f70e29c94ed717f96ad2c2d27b433bafea762015756a2d2794fc28976c54aee087bf0f3726ac2c9140920272445a902038719b956e2160cf9
Munkybooty pushed a commit to Munkybooty/dash that referenced this pull request Jul 22, 2021
3387bb0 travis: avoid timeout without saving caches, also enable all qt (Chun Kuan Lee)

Pull request description:

  - If depends build take more than 20 mins, skip Bitcoin Core build to store depends caches and mark it fail. Then restart the job for Bitcoin Core build.
  - Enable Qt build for Windows and 32-bit Linux
  - Enable wallet for depends x86-64 Linux
  - Disable gui tests for Windows since they are not supported

  This would be helpful for upgrading Qt (bitcoin#12971) and protobuf (bitcoin#13513)

Tree-SHA512: e943cbd848d90f9f70e29c94ed717f96ad2c2d27b433bafea762015756a2d2794fc28976c54aee087bf0f3726ac2c9140920272445a902038719b956e2160cf9
Munkybooty pushed a commit to Munkybooty/dash that referenced this pull request Jul 23, 2021
3387bb0 travis: avoid timeout without saving caches, also enable all qt (Chun Kuan Lee)

Pull request description:

  - If depends build take more than 20 mins, skip Bitcoin Core build to store depends caches and mark it fail. Then restart the job for Bitcoin Core build.
  - Enable Qt build for Windows and 32-bit Linux
  - Enable wallet for depends x86-64 Linux
  - Disable gui tests for Windows since they are not supported

  This would be helpful for upgrading Qt (bitcoin#12971) and protobuf (bitcoin#13513)

Tree-SHA512: e943cbd848d90f9f70e29c94ed717f96ad2c2d27b433bafea762015756a2d2794fc28976c54aee087bf0f3726ac2c9140920272445a902038719b956e2160cf9
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants