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 changes, publish from CI #501

Merged
merged 14 commits into from Aug 17, 2018

Conversation

5 participants
@bobheadxi
Contributor

bobheadxi commented Aug 10, 2018

this is an alternative take on #485

See https://travis-ci.com/bobheadxi/deno

I'm not completely familiar with the deno build scripts yet so this is still pretty wip, am attempting to publish to my fork currently - any feedback would be appreciated and i'd be happy to make any changes requested

Release: https://github.com/bobheadxi/deno/releases

@CLAassistant

This comment has been minimized.

Show comment
Hide comment
@CLAassistant

CLAassistant Aug 10, 2018

CLA assistant check
All committers have signed the CLA.

CLAassistant commented Aug 10, 2018

CLA assistant check
All committers have signed the CLA.

bobheadxi added some commits Aug 10, 2018

Show outdated Hide outdated .travis.yml Outdated
@piscisaureus

This comment has been minimized.

Show comment
Hide comment
@piscisaureus

piscisaureus Aug 11, 2018

Collaborator

I like the idea of this, but I don't like that it makes the Travis CI build very slow.
In the existing setup saving and restoring the cache takes about 4 minutes; adding all these stages quadruples that.
Maybe it's possible to cache a bit less? (@ry)

Collaborator

piscisaureus commented Aug 11, 2018

I like the idea of this, but I don't like that it makes the Travis CI build very slow.
In the existing setup saving and restoring the cache takes about 4 minutes; adding all these stages quadruples that.
Maybe it's possible to cache a bit less? (@ry)

@bobheadxi

This comment has been minimized.

Show comment
Hide comment
@bobheadxi

bobheadxi Aug 11, 2018

Contributor

It's unfortunate, I did not realize that the cache would take so long to load. As far as caching less goes, I noticed this commit (376f4df) that removed a number of things, but then the build throws this error: https://travis-ci.com/bobheadxi/deno/jobs/139253936#L461

The caching here is a bit different in that it's intended to persist stuff across stages, rather than across builds.

Contributor

bobheadxi commented Aug 11, 2018

It's unfortunate, I did not realize that the cache would take so long to load. As far as caching less goes, I noticed this commit (376f4df) that removed a number of things, but then the build throws this error: https://travis-ci.com/bobheadxi/deno/jobs/139253936#L461

The caching here is a bit different in that it's intended to persist stuff across stages, rather than across builds.

@bobheadxi

This comment has been minimized.

Show comment
Hide comment
@bobheadxi

bobheadxi Aug 11, 2018

Contributor

Alternatively, I could just remove the stage usage and revert to something closer to what exists right now - let me know if that is preferable

Contributor

bobheadxi commented Aug 11, 2018

Alternatively, I could just remove the stage usage and revert to something closer to what exists right now - let me know if that is preferable

@hayd

This comment has been minimized.

Show comment
Hide comment
@hayd

hayd Aug 11, 2018

Contributor

I wonder if it's simpler to use a single stage usually, but have an additional deploy stage (that only runs on releases ) like this deploy example: https://docs.travis-ci.com/user/build-stages/define-steps/

Contributor

hayd commented Aug 11, 2018

I wonder if it's simpler to use a single stage usually, but have an additional deploy stage (that only runs on releases ) like this deploy example: https://docs.travis-ci.com/user/build-stages/define-steps/

@bobheadxi

This comment has been minimized.

Show comment
Hide comment
@bobheadxi

bobheadxi Aug 11, 2018

Contributor

I've reverted most of the stage stuff in 5dad1cf

Contributor

bobheadxi commented Aug 11, 2018

I've reverted most of the stage stuff in 5dad1cf

@bobheadxi bobheadxi changed the title from [WIP] Split travis build into stages, publish from CI to [WIP] Travis changes, publish from CI Aug 11, 2018

@hayd

This comment has been minimized.

Show comment
Hide comment
@hayd

hayd Aug 11, 2018

Contributor

I think @ry needs to set up an encrypted github api key (unless I a missing somewhere this uploaded to): https://docs.travis-ci.com/user/deployment/releases/#authenticating-with-an-oauth-token

Also on: tags: true is probably sufficient for releases? https://docs.travis-ci.com/user/deployment/releases/

Contributor

hayd commented Aug 11, 2018

I think @ry needs to set up an encrypted github api key (unless I a missing somewhere this uploaded to): https://docs.travis-ci.com/user/deployment/releases/#authenticating-with-an-oauth-token

Also on: tags: true is probably sufficient for releases? https://docs.travis-ci.com/user/deployment/releases/

@bobheadxi bobheadxi changed the title from [WIP] Travis changes, publish from CI to Travis changes, publish from CI Aug 12, 2018

@piscisaureus

This comment has been minimized.

Show comment
Hide comment
@piscisaureus

piscisaureus Aug 13, 2018

Collaborator

@hayd You can use this token:

deploy:
  provider: releases
  api_key:
    secure: nm/XSUqQkucsgrTqHhZvVzzGrNsiagQyvy4ozqIcuI9BIENJ7upV2HKy0q+lE0j3iwTLXEVFEQ40hnG166nVTgVjIpxoGcVZvMTqAQFus9gVzbA71fAfAQL+nVlIRsdrSJOvsz1BHLKUgZ7UwyciApduaBDgm+mwXtMty5SHDotTc6mX4bz4UceMG4W7WXFcrWwWz+oFz9r8rYW1aKXcCQOms8eshbCtA3LzJtzUIN9NCE+bWf7QGRtz65aKy26MA/mTEAivQQ/J3ueXn4BzulpATHaSwOy5bvc2HGq5YjVJk1RQI7wqr4ONAtFWyMNAxB4JJ+g1XcN6oscoelpQgVWM2GxEblOZ+HSZAhpYiUuCQiKVe4eF238VQpn0BKw1dPEj1UWf5DHUMdcDFxeBfv1vIge5qhb+fpJTGKXfy91+DlwzM+JMBwqkXnuPFoPbh1lDLDKWB8UPGt07o+Y6tdZytr82kCoMaaHFqAVXYb0iBvG0Bw3WfzpwUsURGU08rw1pFnofnC74IyHGbcJ/+u39GzWTlCNGKce7OgEn16MzGe8QzpVmnO5+WX/uBhDHUyvDZkZHGZWHi19gQaUqDlZ4F3lSe4LMgpjEN23Ovv4AWT8bD2lbVr0XhsMlrcMw5n+RhjNDgadDw3dV9F2MHlZBpp1kYNaVqDkv5nIltYA=
  file: i/dont/know
  on:
    repo: denoland/deno
Collaborator

piscisaureus commented Aug 13, 2018

@hayd You can use this token:

deploy:
  provider: releases
  api_key:
    secure: nm/XSUqQkucsgrTqHhZvVzzGrNsiagQyvy4ozqIcuI9BIENJ7upV2HKy0q+lE0j3iwTLXEVFEQ40hnG166nVTgVjIpxoGcVZvMTqAQFus9gVzbA71fAfAQL+nVlIRsdrSJOvsz1BHLKUgZ7UwyciApduaBDgm+mwXtMty5SHDotTc6mX4bz4UceMG4W7WXFcrWwWz+oFz9r8rYW1aKXcCQOms8eshbCtA3LzJtzUIN9NCE+bWf7QGRtz65aKy26MA/mTEAivQQ/J3ueXn4BzulpATHaSwOy5bvc2HGq5YjVJk1RQI7wqr4ONAtFWyMNAxB4JJ+g1XcN6oscoelpQgVWM2GxEblOZ+HSZAhpYiUuCQiKVe4eF238VQpn0BKw1dPEj1UWf5DHUMdcDFxeBfv1vIge5qhb+fpJTGKXfy91+DlwzM+JMBwqkXnuPFoPbh1lDLDKWB8UPGt07o+Y6tdZytr82kCoMaaHFqAVXYb0iBvG0Bw3WfzpwUsURGU08rw1pFnofnC74IyHGbcJ/+u39GzWTlCNGKce7OgEn16MzGe8QzpVmnO5+WX/uBhDHUyvDZkZHGZWHi19gQaUqDlZ4F3lSe4LMgpjEN23Ovv4AWT8bD2lbVr0XhsMlrcMw5n+RhjNDgadDw3dV9F2MHlZBpp1kYNaVqDkv5nIltYA=
  file: i/dont/know
  on:
    repo: denoland/deno
Show outdated Hide outdated .travis.yml Outdated
@hayd

This comment has been minimized.

Show comment
Hide comment
@hayd

hayd Aug 14, 2018

Contributor

I think so as not to build the Release stage every time you need to also specify if: tag IS present.

Contributor

hayd commented Aug 14, 2018

I think so as not to build the Release stage every time you need to also specify if: tag IS present.

@bobheadxi

This comment has been minimized.

Show comment
Hide comment
@bobheadxi

bobheadxi Aug 14, 2018

Contributor

I use on: tags: true without issue on another project here: https://github.com/ubclaunchpad/inertia/blob/master/.travis.yml#L94

Contributor

bobheadxi commented Aug 14, 2018

I use on: tags: true without issue on another project here: https://github.com/ubclaunchpad/inertia/blob/master/.travis.yml#L94

@hayd

This comment has been minimized.

Show comment
Hide comment
@hayd

hayd Aug 14, 2018

Contributor

The Release stage is always built at the moment https://travis-ci.com/denoland/deno/jobs/139680597
I think that additional line may save that 2m50s build time completely? But I am not sure!

Contributor

hayd commented Aug 14, 2018

The Release stage is always built at the moment https://travis-ci.com/denoland/deno/jobs/139680597
I think that additional line may save that 2m50s build time completely? But I am not sure!

@bobheadxi

This comment has been minimized.

Show comment
Hide comment
@bobheadxi

bobheadxi Aug 14, 2018

Contributor

oh wait you're right, oops

Contributor

bobheadxi commented Aug 14, 2018

oh wait you're right, oops

@ry

This comment has been minimized.

Show comment
Hide comment
@ry

ry Aug 15, 2018

Collaborator

@bobheadxi @hayd What's the status on this project?

Collaborator

ry commented Aug 15, 2018

@bobheadxi @hayd What's the status on this project?

@hayd

This comment has been minimized.

Show comment
Hide comment
@hayd

hayd Aug 16, 2018

Contributor

@ry For Linux upon tagging it cuts a release to GitHub.
https://github.com/bobheadxi/deno/releases

Caching is working, and so builds are as fast as before. The additional "release" stage is run if and only if there's a tag.

Perhaps the next travis project is osx, testing and being able to cut a release should also work on that platform too. But I think this PR is good to review/merge.

Contributor

hayd commented Aug 16, 2018

@ry For Linux upon tagging it cuts a release to GitHub.
https://github.com/bobheadxi/deno/releases

Caching is working, and so builds are as fast as before. The additional "release" stage is run if and only if there's a tag.

Perhaps the next travis project is osx, testing and being able to cut a release should also work on that platform too. But I think this PR is good to review/merge.

@ry

LGTM.

@piscisaureus Please review.

Show outdated Hide outdated .travis.yml Outdated
@ry

This comment has been minimized.

Show comment
Hide comment
@ry

ry Aug 16, 2018

Collaborator

iirc failures in the before_deploy section do not terminate the build. I think this should be in the script section

(Also can we use underscores instead of dashes in the filename deno_linux.gz)

Collaborator

ry commented on .travis.yml in fbcd2e6 Aug 16, 2018

iirc failures in the before_deploy section do not terminate the build. I think this should be in the script section

(Also can we use underscores instead of dashes in the filename deno_linux.gz)

Show outdated Hide outdated .travis.yml Outdated
@ry

ry approved these changes Aug 17, 2018

I will land this now without @piscisaureus's review as I think it will take some time to tweak and better to start sooner.

Thanks @bobheadxi and @haoxli !!! This is going to be great :)

@ry ry merged commit 87a0617 into denoland:master Aug 17, 2018

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
license/cla Contributor License Agreement is signed.
Details
@bobheadxi

This comment has been minimized.

Show comment
Hide comment
@bobheadxi

bobheadxi Aug 17, 2018

Contributor

Thanks for the feedback and reviews!

Sent with GitHawk

Contributor

bobheadxi commented Aug 17, 2018

Thanks for the feedback and reviews!

Sent with GitHawk

@ry

This comment has been minimized.

Show comment
Hide comment
@ry

ry Aug 17, 2018

Collaborator

@bobheadxi @hayd Forgive my ignorance - but when does this trigger? If I push a new tag to an existing commit will it tigger a build? Or do I need to have the tag in place when I send a PR? Basically what's the recommended workflow?

Collaborator

ry commented Aug 17, 2018

@bobheadxi @hayd Forgive my ignorance - but when does this trigger? If I push a new tag to an existing commit will it tigger a build? Or do I need to have the tag in place when I send a PR? Basically what's the recommended workflow?

@bobheadxi

This comment has been minimized.

Show comment
Hide comment
@bobheadxi

bobheadxi Aug 17, 2018

Contributor

@ry Pushing a new tag should be sufficient trigger a new Travis build that will run the release stage on top of everything else!

Contributor

bobheadxi commented Aug 17, 2018

@ry Pushing a new tag should be sufficient trigger a new Travis build that will run the release stage on top of everything else!

@ry

This comment has been minimized.

Show comment
Hide comment
@ry

ry Aug 17, 2018

Collaborator

@bobheadxi hmm - pushing a tag doesn't seem to trigger. I wonder if this is causing it not to:

deno/.travis.yml

Lines 3 to 5 in 3f7d61a

branches:
only:
- master

Collaborator

ry commented Aug 17, 2018

@bobheadxi hmm - pushing a tag doesn't seem to trigger. I wonder if this is causing it not to:

deno/.travis.yml

Lines 3 to 5 in 3f7d61a

branches:
only:
- master

@bobheadxi

This comment has been minimized.

Show comment
Hide comment
@bobheadxi

bobheadxi Aug 17, 2018

Contributor

Yeah it probably is - I set that restriction to prevent accidental releases from being built, should I put in a PR to remove it?

Contributor

bobheadxi commented Aug 17, 2018

Yeah it probably is - I set that restriction to prevent accidental releases from being built, should I put in a PR to remove it?

@ry

This comment has been minimized.

Show comment
Hide comment
@ry

ry Aug 17, 2018

Collaborator

@bobheadxi Yes. I think we should also remove the "only on tag" restriction. Basically I'd like to always have an upload of the master binary if possible...

Collaborator

ry commented Aug 17, 2018

@bobheadxi Yes. I think we should also remove the "only on tag" restriction. Basically I'd like to always have an upload of the master binary if possible...

@bobheadxi

This comment has been minimized.

Show comment
Hide comment
@bobheadxi

bobheadxi Aug 17, 2018

Contributor

Basically I'd like to always have an upload of the master binary if possible...

@ry So just to clarify, Travis should always build everything on every branch, or should I leave the master restriction and remove the tag restriction? Removing both restrictions means that every commit from every branch will be built and uploaded 😅

Contributor

bobheadxi commented Aug 17, 2018

Basically I'd like to always have an upload of the master binary if possible...

@ry So just to clarify, Travis should always build everything on every branch, or should I leave the master restriction and remove the tag restriction? Removing both restrictions means that every commit from every branch will be built and uploaded 😅

@ry

This comment has been minimized.

Show comment
Hide comment
@ry

ry Aug 17, 2018

Collaborator

@bobheadxi only the master branch should get uploaded

Collaborator

ry commented Aug 17, 2018

@bobheadxi only the master branch should get uploaded

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment