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

Refactoring of the CI. #3676

Merged
merged 2 commits into from Jul 24, 2023
Merged

Refactoring of the CI. #3676

merged 2 commits into from Jul 24, 2023

Conversation

fulmicoton
Copy link
Contributor

The previous CI was strangely relying on workflows to split the CI and have it run in parallel.

A lot of the work was made several times:
e.g. installing rust stable + nightly, installing packages, starting our builder image etc.

Overall it was done x6 times. It was strongly overkill considering some of the steps run in (<1s).

After this refactoring we run in two "jobs" with a different set of steps.

  • Lint runs clippy + all of the smaller jobs (cargo fmt, cargo deny, checking the license)
  • Test runs the unit test.

In addition, we stop relying on the builder image and the associated confusion. For instance, the rust stable installed in the CI workflow was actually not used. The quickwit-builder image one was taken because of the rust-toolchain.toml.

After the PR, we run on stock ubuntu-latest directly. We then rely on rustup to install the right version of cargo/rust as define in the rust-toolchain.
Updating the rust version does not require any extra changes.

cargo deny / cargo nextest need to be build unfortunately. That step is however cached.

The previous CI was strangely relying on workflows to split the CI
and have it run in parallel.

A lot of the work was made several times:
e.g. installing rust stable + nightly, installing packages, starting our
builder image etc.

Overall it was done x6 times. It was strongly overkill considering some of the
steps run in (<1s).

After this refactoring we run in two "jobs" with a different set of steps.
- Lint runs clippy + all of the smaller jobs (cargo fmt, cargo deny, checking the license)
- Test runs the unit test.

In addition, we stop relying on the builder image and the associated confusion.
For instance, the rust stable installed in the CI workflow was actually not used.
The quickwit-builder image one was taken because of the rust-toolchain.toml.

After the PR, we run on stock ubuntu-latest directly.
We then rely on rustup to install the right version of cargo/rust
as define in the rust-toolchain.
Updating the rust version does not require any extra changes.

cargo deny / cargo nextest need to be build unfortunately.
That step is however cached.
@fulmicoton fulmicoton requested a review from guilload July 24, 2023 06:27
@fulmicoton
Copy link
Contributor Author

After the PR is merged, we need to edit the settings of the main branch.

if: matrix.task.name == 'cargo nextest'
uses: taiki-e/install-action@nextest
- name: ${{ matrix.task.name }}
if: steps.modified-files.outputs.qw-src == 'true' && steps.modified-files.outputs.ui-src == 'false'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

that was broken.

@fulmicoton fulmicoton merged commit f1a25a4 into main Jul 24, 2023
4 checks passed
@fulmicoton fulmicoton deleted the refactoring-ci branch July 24, 2023 12:35
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

2 participants