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

refactor(ops): CI rework #497

Merged
merged 24 commits into from
Nov 18, 2022
Merged

refactor(ops): CI rework #497

merged 24 commits into from
Nov 18, 2022

Conversation

Arqu
Copy link
Collaborator

@Arqu Arqu commented Nov 15, 2022

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:

  • own infra
  • much speed
  • less checks to wait for
  • less maintenance / CI code

Things that will be done in a follow up PR:

  • add more runners, specifically switch over windows builds to self hosted and swap mac from intel based to m1 based platforms

@Arqu Arqu added ci continous integration ops operational infrastructure (hardware, deployments) concerns, excluding continuous integration labels Nov 15, 2022
@Arqu Arqu self-assigned this Nov 15, 2022
@Arqu Arqu force-pushed the arqu/ci_reboot branch 10 times, most recently from 64722a5 to 77b86fa Compare November 17, 2022 23:25
@Arqu Arqu changed the title WIP: CI rework refactor(ops): CI rework Nov 17, 2022
@Arqu Arqu marked this pull request as ready for review November 17, 2022 23:31
@Arqu Arqu requested review from b5 and flub November 17, 2022 23:31
./target

# - name: Cache cargo registry
# uses: actions/cache@v3
Copy link
Contributor

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

if: matrix.os == 'ubuntu-latest'
with:
command: clippy
args: --workspace --all-features --tests --benches --examples --bins --all-targets -- -D warnings
Copy link
Contributor

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.

Copy link
Contributor

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

Copy link
Collaborator Author

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.

Comment on lines +142 to +146
# Force not building debuginfo to save space on disk.
RUSTFLAGS: "-C debuginfo=0"
Copy link
Contributor

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.

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
Copy link
Contributor

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.


- name: clippy
uses: actions-rs/cargo@v1
if: matrix.os == 'ubuntu-latest'
Copy link
Contributor

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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

good point.

Copy link
Member

@b5 b5 left a comment

Choose a reason for hiding this comment

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

🤠

@Arqu Arqu merged commit 57addda into main Nov 18, 2022
@Arqu Arqu deleted the arqu/ci_reboot branch November 18, 2022 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci continous integration ops operational infrastructure (hardware, deployments) concerns, excluding continuous integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants