Print out sha256 hash and upload the binaries to transfer.sh
This is the easiest way to test and verify what PR do.
- Download it from travis-ci console
- Verify the sha256 hash
- Start testing the binaries
Print out sha256 hash and upload the binaries to transfer.sh
This is the easiest way to test and verify what PR do.
.travis/
subject to shellcheck by scravy)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.
This will upload the binaries for every travis job that runs. Maybe limit it to pull requests on the bitcoin repository?
People may want to test the master branch.
Can the binaries be downloaded from Travis CI console currently?
Yes, it prints out the URL at the end of each build.
Please update the PR description with scenarios that could be achieved post merge that cannot be achieved pre merge :-)
What do you mean?
transfer.sh
they are made available? If so it makes sense. I think the text “Download it from travis-ci console” fooled me into thinking the binaries were downloadable directly from Travis CI :-)
129@@ -130,6 +130,7 @@ script:
130 - if [ "$TRAVIS_EVENT_TYPE" = "cron" ]; then extended="--extended --exclude feature_pruning,feature_dbcrash"; fi
131 - 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
132 after_script:
133+ - test ! -z $OUTDIR && for file in $(find $OUTDIR/bin -executable -type f); do curl --upload-file $file https://transfer.sh/$(sha256sum $file | cut -d' ' -f1)-$(basename $file); echo; done
transfer.sh
. Handle both the timeout and downtime case.
People may want to test the master branch. @ken2812221 fair enough, but it will also run for every fork (other peopls repositories), every branch, every push that anyone does, right?
I think the curl version in the travis image is quite an old one (the one shipped with ubuntu 14.04 trusty probably).
I see in the logs:
00.38s$ test ! -z $OUTDIR && for file in $(find $OUTDIR/bin -executable -type f); do curl --retry 3 --retry-delay 0 -m 60 --connect-timeout=10 --upload-file $file https://transfer.sh/$(sha256sum $file | cut -d' ' -f1)-$(basename $file); echo; done
1curl: option --connect-timeout=10: is unknown
2curl: try 'curl --help' or 'curl --manual' for more information
3curl: option --connect-timeout=10: is unknown
4curl: try 'curl --help' or 'curl --manual' for more information
5curl: option --connect-timeout=10: is unknown
6curl: try 'curl --help' or 'curl --manual' for more information
7curl: option --connect-timeout=10: is unknown
8curl: try 'curl --help' or 'curl --manual' for more information
9curl: option --connect-timeout=10: is unknown
10curl: try 'curl --help' or 'curl --manual' for more information
But I think after_script
sections don’t fail the build (?) hence all checks passed.
=
. That’s my mistake.
but it will also run for every fork (other peopls repositories), every branch, every push that anyone does, right?
I can’t see any downside of doing this.
Hmm, we could really limit this to pull requests on our repo. Otherwise, the hoster might exclude travis ips for spamming, no?
Note that for the master branch, we already have nightly builds: https://bitcoin.jonasschnelli.ch/#nighly And for release branches, we have our usual gitian builds: https://bitcoincore.org/en/download/
we could really limit this to pull requests on our repo. Otherwise, the hoster might exclude travis ips for spamming.
You really convinced me. I don’t want to get any ban by any host.
This is the easiest way to test and verify what PR do.
I feel that the correct way to do that is to checkout and build the PR branch. It’s common to tweak the code while testing, especially the corresponding tests.
At the moment, from the reviewer/tester point of view, I don’t see advantages of this and for that reason NACK.
This has been discussed before, and I don’t think it’s a good idea. Uploading binaries for pull requests automatically gives e.g. malware authors a way to make and host semi-genuine-looking executables easily (and gives incentive to use our repository for this!).
Furthermore, the Travis executables aren’t really intended to be distributed. They might, at least theoretically, be specially adapted for testing in a specific environment. It’s not a gitian build.
I think @jonasschnelli / @marcofalke ’s solution is better - have a real gitian build be triggered by a tag or otherwise, by maintainers.
but I can still provide my own gitian-build result in my PR, right?
Sure, you can do what you want in your own PRs. My argument is only against doing it automatically for PRs in a “centralized” way.