-
Notifications
You must be signed in to change notification settings - Fork 148
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
refactor(ops): CI rework #497
Conversation
64722a5
to
77b86fa
Compare
.github/workflows/ci.yml
Outdated
./target | ||
|
||
# - name: Cache cargo registry | ||
# uses: actions/cache@v3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unclear if you are still wanting this, but i can recommend the swatinem/rust-cache@v2
action for gha actions caching. It does everything correctly for you, it becomes as simple as e.g. https://github.com/getsentry/symbolicator/blob/10a7078a861d2ba1d8eaa9d309b361269de55de7/.github/workflows/ci.yml#L46
.github/workflows/ci.yml
Outdated
if: matrix.os == 'ubuntu-latest' | ||
with: | ||
command: clippy | ||
args: --workspace --all-features --tests --benches --examples --bins --all-targets -- -D warnings |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh, I'm trying to figure out what --all-targets
does. IIUC it is basically the same as --tests --benches --examples --bins
? So we can just replace all those with --all-targets
? Testing this locally seems to agree.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to be fair, we can do this as a followup since that simplifies things in a lot of places like readme's etc as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
made an issue for the readme will cover it in CI right away.
# Force not building debuginfo to save space on disk. | ||
RUSTFLAGS: "-C debuginfo=0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For releases we probably want to build debuginfo and use split debuginfo and make it available in the release as well. But maybe that's also something that is better done later.
.github/workflows/ci.yml
Outdated
env: | ||
RUST_BACKTRACE: full | ||
# Force not building debuginfo to save space on disk. | ||
RUSTFLAGS: "-C debuginfo=0" | ||
RUSTC_WRAPPER: sccache | ||
# Force all builds to be non-incremental - better for cache |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you forgot to add the CARGO_INCREMENTAL
var here.
.github/workflows/ci.yml
Outdated
|
||
- name: clippy | ||
uses: actions-rs/cargo@v1 | ||
if: matrix.os == 'ubuntu-latest' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not run clippy on all platforms? We've already seen windows-only clippy errors, because of optionally compiled code around unix sockets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤠
DO NOT MERGE EVEN AFTER APPROVAL/REVIEW
Move completely over to Github Actions. The reasoning is mainly to consolidate and to shift to self hosted runners. CircleCI self hosted runners don't allow for forks to run builds.
We've also enforces mandatory approval for all external PRs. Moving forward please review changes to CI code carefully.
Results:
Things that will be done in a follow up PR: