ci: port CircleCI workflow to GitHub Actions #224
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR ports .cicleci/config.yml to .github/workflows/ci.yml. I have decided to do that because I didn't have access to CircleCI yet so I couldn't inspect the builds and because we're leaning towards using GitHub Actions going forward across org(protocol/.github#251).
Speedup
The new workflow already tries to be address the CI speed issue: /~https://github.com/filecoin-project/fvm/issues/76
Caching
It uses rust cache here /~https://github.com/filecoin-project/fvm/blob/c18399245cfff55d6d1ad19cc65bca43456c91ea/.github/workflows/ci.yml#L28 and here /~https://github.com/filecoin-project/fvm/blob/c18399245cfff55d6d1ad19cc65bca43456c91ea/.github/workflows/ci.yml#L47 which caches:
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git
./target
This is pretty much on par with what we used to do in CircleCI though so this is not going to affect the build times.
Removing
-force
flagIt also removes
-force
flag from /~https://github.com/filecoin-project/fvm/blob/c18399245cfff55d6d1ad19cc65bca43456c91ea/.github/workflows/ci.yml#L50-L51 which shaves off around 2m 30s from builds that successfully downloaded cache. I believe this is safe to introduce sincecargo install
performs update if needed: rust-lang/cargo#7560Release
I propose that we merge this and let the new action soak for a while to see how it compares with CircleCI. If it works as expected and is faster, we can make the new checks required and deprecate the CircleCI workflow.
Triggers
I think the CircleCI workflow runs on every commit so I set the GitHub Action workflow the same way.
Testing