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

[Merged by Bors] - Ci stability and speed improvements #2551

Closed
wants to merge 6 commits into from

Conversation

mockersf
Copy link
Member

@mockersf mockersf commented Jul 26, 2021

Objective

  • There are a few random failures in CI, mostly due to contacting crates.io or checking for deadlinks
  • CI can take some time, more than 20 minutes for a full status
  • A clippy/format issue stops running tests on other platforms

Solution

  • Use GitHub cache for cargo artefacts
    • This speeds up builds and reduce dependencies on outside world
  • Reorder and add dependencies between short jobs. They are still setup to run even if one of the dependency failed
    • This reduce the number of parallel jobs that are running for one PR. On GitHub free tier, we're limited to 20.
  • Split CI checks (format & clippy) in its own job
    • This speeds up test jobs, and allow us to not kill all platform tests for a format issue
  • Retry in case of dead links check failure
    • Internet is just that kind of place where things may seem dead at some point but back alive 5 seconds later

Before

Screenshot 2021-07-27 at 01 18 52

After (with all cache live)

Screenshot 2021-07-27 at 01 18 28

@mockersf mockersf added the A-Build-System Related to build systems or continuous integration label Jul 26, 2021
@cart
Copy link
Member

cart commented Jul 26, 2021

Good calls all round. I wish the dead link checker could do retries internally (they have hard coded support for 429 error retries, but nothing more). But this seems like a reasonable workaround in the interim.

@cart
Copy link
Member

cart commented Jul 27, 2021

The retry ran in ~13 minutes, which lines up with the numbers you reported. Awesome!

@cart
Copy link
Member

cart commented Jul 27, 2021

bors r+

bors bot pushed a commit that referenced this pull request Jul 27, 2021
# Objective

- There are a few random failures in CI, mostly due to contacting crates.io or checking for deadlinks
- CI can take some time, more than 20 minutes for a full status
- A clippy/format issue stops running tests on other platforms


## Solution

- Use GitHub cache for cargo artefacts
  - This speeds up builds and reduce dependencies on outside world
- Reorder and add dependencies between short jobs. They are still setup to run even if one of the dependency failed
  - This reduce the number of parallel jobs that are running for one PR. On GitHub free tier, we're limited to 20.
- Split CI checks (format & clippy) in its own job
  - This speeds up test jobs, and allow us to not kill all platform tests for a format issue
- Retry in case of dead links check failure
  - Internet is just that kind of place where things may seem dead at some point but back alive 5 seconds later

## Before

<img width="1062" alt="Screenshot 2021-07-27 at 01 18 52" src="https://user-images.githubusercontent.com/8672791/127071973-9a2c5ce8-c871-4f8d-9b17-08871824b6c4.png">

## After (with all cache live)

<img width="1063" alt="Screenshot 2021-07-27 at 01 18 28" src="https://user-images.githubusercontent.com/8672791/127071986-767a7e65-53ed-45fd-8d75-51a571f0b851.png">
@bors bors bot changed the title Ci stability and speed improvements [Merged by Bors] - Ci stability and speed improvements Jul 27, 2021
@bors bors bot closed this Jul 27, 2021
bors bot pushed a commit that referenced this pull request Aug 6, 2021
# Objective

- #2551 revamped our CI setup which included running clippy and rustfmt in another Job.
- This new Job wasn't added to the bors.toml, which means that PRs would be accepted that didn't run them.

## Solution

- Add the "ci" job to the bors.toml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Build-System Related to build systems or continuous integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants