Skip to content

Reduce use of self-hosted runner and use cache#409

Merged
Kailai-Wang merged 40 commits intodevfrom
393-avoid-self-runner-in-CI
Mar 24, 2022
Merged

Reduce use of self-hosted runner and use cache#409
Kailai-Wang merged 40 commits intodevfrom
393-avoid-self-runner-in-CI

Conversation

@Kailai-Wang
Copy link
Copy Markdown
Collaborator

resolves #259
resolves #393

This PR:

  • uses github runner when possible in GHA, currently our self-hosted runner is used to build docker image only, as it's significantly faster than the github runner
  • uses cargo-chef + buildx local cache to cache docker layers for regular CI, for more experiments refer to Accelerate the rust compilation #259
  • use sccache to accelerate the native binary compilation
  • use path-filter to optionally skip the docker building process (e.g. when dependabot bumps the ts-tests dependencies)
  • separate dev and prod Dockerfile
  • upgrade the upload/download action to v3

Overall it was an interesting research and I've learned new things from the experiments.
I'd like to keep the caching mechanism like this and see how it goes, we could revert it anytime if we think it doesn't fit well.

@Kailai-Wang Kailai-Wang requested a review from a team March 17, 2022 11:05
@Kailai-Wang Kailai-Wang self-assigned this Mar 17, 2022
@Kailai-Wang Kailai-Wang merged commit 9a5dac9 into dev Mar 24, 2022
@Kailai-Wang Kailai-Wang deleted the 393-avoid-self-runner-in-CI branch March 24, 2022 15:29
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.

Avoid running CI on self-hosted runner when possible Accelerate the rust compilation

2 participants