Skip to content

Conversation

@ken2812221
Copy link
Contributor

@ken2812221 ken2812221 commented Aug 2, 2018

Print out sha256 hash and upload the binaries to transfer.sh

This is the easiest way to test and verify what PR do.

  1. Download it from travis-ci console
  2. Verify the sha256 hash
  3. Start testing the binaries

@DrahtBot
Copy link
Contributor

DrahtBot commented Aug 2, 2018

Note to 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.

@scravy
Copy link
Contributor

scravy commented Aug 3, 2018

This will upload the binaries for every travis job that runs. Maybe limit it to pull requests on the bitcoin repository?

@practicalswift
Copy link
Contributor

practicalswift commented Aug 3, 2018

@ken2812221 Can the binaries be downloaded from Travis CI console currently? Please update the PR description with scenarios that could be achieved post merge that cannot be achieved pre merge :-)

@ken2812221
Copy link
Contributor Author

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?

@practicalswift
Copy link
Contributor

@ken2812221 Oh, sorry I think I misunderstood you. The binaries are not available from download directly from Travis CI, but by uploading them to 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 :-)

.travis.yml Outdated
Copy link
Contributor

@practicalswift practicalswift Aug 3, 2018

Choose a reason for hiding this comment

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

Please make it so that we don't fail in case of unavailability of transfer.sh. Handle both the timeout and downtime 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.

Done

@scravy
Copy link
Contributor

scravy commented Aug 3, 2018

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?

@scravy
Copy link
Contributor

scravy commented Aug 3, 2018

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:

0.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
curl: option --connect-timeout=10: is unknown
curl: try 'curl --help' or 'curl --manual' for more information
curl: option --connect-timeout=10: is unknown
curl: try 'curl --help' or 'curl --manual' for more information
curl: option --connect-timeout=10: is unknown
curl: try 'curl --help' or 'curl --manual' for more information
curl: option --connect-timeout=10: is unknown
curl: try 'curl --help' or 'curl --manual' for more information
curl: option --connect-timeout=10: is unknown
curl: try 'curl --help' or 'curl --manual' for more information

But I think after_script sections don't fail the build (?) hence all checks passed.

@ken2812221
Copy link
Contributor Author

@scravy I should not use =. That's my mistake.

@ken2812221
Copy link
Contributor Author

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.

@maflcko
Copy link
Member

maflcko commented Aug 3, 2018

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/

@ken2812221
Copy link
Contributor Author

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.

@promag
Copy link
Contributor

promag commented Aug 3, 2018

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.

@ken2812221
Copy link
Contributor Author

ken2812221 commented Aug 5, 2018

@promag It's easy to do testing and tweak the code for Linux, but it's complicate for Windows and cross compile things. No body want to do cross compiling, I think this PR is good for that.

@laanwj
Copy link
Member

laanwj commented Aug 6, 2018

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.

@ken2812221 ken2812221 closed this Aug 6, 2018
@ken2812221 ken2812221 deleted the transfer-travis-file branch August 6, 2018 14:19
@ken2812221
Copy link
Contributor Author

ken2812221 commented Aug 6, 2018

@laanwj Thanks for your comment. Although this PR was rejected, I can still provide my own gitian build result in my PR, right?

@laanwj
Copy link
Member

laanwj commented Aug 6, 2018

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.

@maflcko
Copy link
Member

maflcko commented Aug 6, 2018

It is still good to have to code around. If someone really wants to debug the travis binaries, they can lookup this pull and cherry-pick this patch into their travis yml.

@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.

8 participants