atom icon indicating copy to clipboard operation
atom copied to clipboard

Upload Bootstrapped Repository

Open aminya opened this issue 5 years ago • 11 comments

Description of the change

This adds a step to the release CI that uploads the ready bootstrapped repository. This provides a ready development environment for people to start hacking Atom's Core without running and dealing with the bootstrap script (similar to a pre-built docker images).

Verification

The CI passes

aminya avatar Jul 04 '20 07:07 aminya

Typo "bootstraped" --> "bootstrapped"

DeeDeeG avatar Jul 04 '20 12:07 DeeDeeG

This gets uploaded to Azure artifacts. How do we upload it to the release page of GitHub?

aminya avatar Jul 05 '20 02:07 aminya

With the GitHub API I think.

Making a correct HTTP POST to the API some way or other.

https://docs.github.com/en/rest/reference/repos#upload-a-release-asset

Edit:

  • See this https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/github-release?view=azure-devops
  • and also this file that already exists in the repo: https://github.com/atom/atom/blob/master/script/vsts/upload-artifacts.js

DeeDeeG avatar Jul 05 '20 02:07 DeeDeeG

It seems we already have the scripts needed for releasing. We just need to test and try it to see if we need to add some variables or tokens.

aminya avatar Jul 05 '20 15:07 aminya

We can probably reuse the bootstrapped repository in other jobs. Now MacOS bootstraps atom 4 times in total! (each being ~10min). We can reduce this time by uploading and downloading it.

One reason for Windows tests failing is that all the tests run at once in one machine which stops responding properly. If we reuse the bootstrapped repo, we can speed up the CI.

There is probably a better way. We might just cache the repository for the next job. This is easy in GitHub actions and should be possible in Azure too. Edit: yes there exists! https://docs.microsoft.com/en-us/azure/devops/pipelines/release/caching?view=azure-devops https://devblogs.microsoft.com/devops/caching-and-faster-artifacts-in-azure-pipelines/

aminya avatar Jul 06 '20 02:07 aminya

As far as I know, the Lighthouse thing is supposed to be doing that already. This mostly works at upstream. Not sure what's preventing it from working here. I have tried a lot of things.

As you have pointed out, the docs say to do it another way, with a separate caching feature, rather than the artifacts system.

If we can get this working, I sincerely hope upstream will do it to. Part of the reason upstream is frustrating is that it is slow. Perhaps upstream would be happy to see faster builds just as we would. (I can't think of why not!) So I'm very interested in doing this here and doing it right, per the docs and all that.

DeeDeeG avatar Jul 06 '20 02:07 DeeDeeG

See https://github.com/atom-ide-community/atom/pull/11

aminya avatar Jul 06 '20 02:07 aminya

Closing this. Re-open if you need it. Thanks.

DeeDeeG avatar Jul 10 '20 16:07 DeeDeeG

I want to merge this eventually (only on release builds). We can release bootstrapped repositories with our binaries.

aminya avatar Jul 10 '20 23:07 aminya

For the record, with master having recently had #46 merged into it, and most of the PRs being rebased lately, I want to note that this PR is currently at commit c4a6eb4bf4346e5a696ec274840818e56e5240c9. It should be easy to go back and revisit that commit, even after a rebase, having made a record of this.

DeeDeeG avatar Jul 16 '20 14:07 DeeDeeG

As you can see most checks did not pass

iamunadike avatar Jul 07 '22 11:07 iamunadike