Skip to content
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

GitHub Actions Improvements #437

Merged
merged 3 commits into from
Jun 6, 2022
Merged

GitHub Actions Improvements #437

merged 3 commits into from
Jun 6, 2022

Conversation

rtwalker
Copy link
Contributor

Adding a few commits of things I've thought might improve our GitHub Actions setup while I spent some time this week reading through the documentation. I think the changes are mostly superficial (except I caught one place we still have master instead of main), but thought I'd offer to contribute them nevertheless.

@rtwalker
Copy link
Contributor Author

@epgts, this probably conflicts with some of the stuff you're doing, so I'm happy to wait until that's merged and try to resolve myself.

@jerryxwu
Copy link
Contributor

@rtwalker Glad to see you taking the initiative to make it more maintainable. I noticed this when I was working on the other Github action.

We also actually made the switch from 'master' to 'main' branch in a release branch IIRC. The change did not somehow made to the main branch.

@@ -3,7 +3,7 @@ on:
pull_request:
push:
branches:
- master
- main
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this mean anything at all? We have no branched named 'master' and yet we had no problems. Should we delete this setting?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm indifferent to whether we should have this set. This was just to get things working the way they were (at some point) intended to.

The "problem" this causes is just that the CI workflow doesn't run as often as intended. Where the workflow could have run every time a commit was pushed to main, it didn't because it was instead looking on master.

I think we have some branch protections on main that mean that every commit coming into main was brought in via PR, where we just ran the CI workflow, so I'm open to the argument that we no longer intend for things to work this way.

Copy link
Contributor

Choose a reason for hiding this comment

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

@rtwalker Yup, you got it; this was set back when the branch was called master and before we hand branch protections. I think what bors does isn't a push, so it shouldn't matter what's here.

Copy link
Contributor

@epgts epgts left a comment

Choose a reason for hiding this comment

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

Commit dbb1fdc gets my whole-hearted approval: I love it and thank you!

Commit 7d30768 gets half-hearted approval: I'm wondering what this setting buys us at all given that it was naming a non-existent branch with seemingly no harm done.

Thanks!

.github/workflows/clippy.yml Show resolved Hide resolved
@rtwalker rtwalker marked this pull request as ready for review June 2, 2022 15:33
@rtwalker rtwalker requested review from JLockerman and epgts June 2, 2022 15:33
@rtwalker
Copy link
Contributor Author

rtwalker commented Jun 2, 2022

bors r+

bors bot added a commit that referenced this pull request Jun 2, 2022
437: GitHub Actions Improvements r=rtwalker a=rtwalker

Adding a few commits of things I've thought might improve our GitHub Actions setup while I spent some time this week reading through the documentation. I think the changes are mostly superficial (except I caught one place we still have `master` instead of `main`), but thought I'd offer to contribute them nevertheless. 


Co-authored-by: Ryan Walker <rwalker@timescale.com>
@bors
Copy link
Contributor

bors bot commented Jun 2, 2022

Timed out.

@rtwalker
Copy link
Contributor Author

rtwalker commented Jun 2, 2022

bors retry

bors bot added a commit that referenced this pull request Jun 2, 2022
437: GitHub Actions Improvements r=rtwalker a=rtwalker

Adding a few commits of things I've thought might improve our GitHub Actions setup while I spent some time this week reading through the documentation. I think the changes are mostly superficial (except I caught one place we still have `master` instead of `main`), but thought I'd offer to contribute them nevertheless. 


Co-authored-by: Ryan Walker <rwalker@timescale.com>
@bors
Copy link
Contributor

bors bot commented Jun 2, 2022

Timed out.

@rtwalker
Copy link
Contributor Author

rtwalker commented Jun 3, 2022

bors retry

bors bot added a commit that referenced this pull request Jun 3, 2022
437: GitHub Actions Improvements r=rtwalker a=rtwalker

Adding a few commits of things I've thought might improve our GitHub Actions setup while I spent some time this week reading through the documentation. I think the changes are mostly superficial (except I caught one place we still have `master` instead of `main`), but thought I'd offer to contribute them nevertheless. 


Co-authored-by: Ryan Walker <rwalker@timescale.com>
@bors
Copy link
Contributor

bors bot commented Jun 3, 2022

Timed out.

Comment on lines +26 to +28
# TODO Why? Cargo default is to pass `-C incremental` to rustc; why don't we want that?
# https://doc.rust-lang.org/rustc/codegen-options/index.html#incremental
# Well turning it off takes the extension target size down from 3G to 2G...
Copy link
Contributor

Choose a reason for hiding this comment

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

The theory is that enough tends to change between builds that incrementalism won't help (and frankly incremental has been buggy recently). There's even arguments to actively remove the current binary from the build cache to cut down even more (that's what rust-analyzer, who tend to be the experts on this, used to do, thought it seems like they've since changed to rust-cache)

Comment on lines +35 to +39
# TODO What reads this? It's not listed on
# https://doc.rust-lang.org/cargo/reference/environment-variables.html
CI: 1
RUST_BACKTRACE: short
# TODO We don't seem to run rustup, nor does it seem like we should.
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe these are currently unused

Copy link
Contributor

@JLockerman JLockerman left a comment

Choose a reason for hiding this comment

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

I realized I never recorded my approval here: LGTM 👍

Using the matrix "strategy" with GitHub actions means that we don't
have 3 jobs that are nearly identical and de-duplicates a lot
Our ci.yml file is getting long, thought this might help make our
workflows easier to read.

Also added some paths-ignore, since there are some cases where there
is no need to run clippy.
@rtwalker
Copy link
Contributor Author

rtwalker commented Jun 6, 2022

bors retry

@bors
Copy link
Contributor

bors bot commented Jun 6, 2022

@bors bors bot merged commit 2c6beb5 into main Jun 6, 2022
@bors bors bot deleted the rw/github-actions branch June 6, 2022 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants