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

CI: Set cache-downloads to false to speedup the "Setup Micromamba" step #2946

Merged
merged 3 commits into from
Jan 3, 2024

Conversation

seisman
Copy link
Member

@seisman seisman commented Jan 2, 2024

Currently, we set both cache-downloads and cache-environment options to true in the mamba-org/setup-micromamba action. So, in the "Setup Micromamba" step, we see information like below:

Restoring downloads from `/home/runner/micromamba/pkgs` ...
  Received 209715200 of 614617264 (34.1%), 199.6 MBs/sec
  Received 528482304 of 614617264 (86.0%), 251.7 MBs/sec
  Cache Size: ~586 MB (614617264 B)
  /usr/bin/tar -xf /home/runner/work/_temp/6f85073e-da84-4b9b-a62e-5a406ad9f613/cache.tzst -P -C /home/runner/work/pygmt/pygmt --use-compress-program unzstd
  Received 614617264 of 614617264 (100.0%), 195.2 MBs/sec
  Cache restored successfully
  Restored cache with key `micromamba-downloads--linux-64`
Restoring environment `pygmt` from `/home/runner/micromamba/envs/pygmt` ...
  Received 192937984 of 559585675 (34.5%), 184.0 MBs/sec
  Received 452984832 of 559585675 (81.0%), 216.0 MBs/sec
  Cache Size: ~534 MB (559585675 B)
  /usr/bin/tar -xf /home/runner/work/_temp/5b8debfc-6237-4bc9-ba5b-6f421a5ad7ff/cache.tzst -P -C /home/runner/work/pygmt/pygmt --use-compress-program unzstd
  Received 559585675 of 559585675 (100.0%), 177.8 MBs/sec
  Cache restored successfully
  Restored cache with key `micromamba-environment--linux-64-pygmt-args-62be375-root-dcc80ee`

Apparently, cache-downloads caches/restores the packages in the /home/runner/micromamba/pkgs directory and cache-environment caches/restores the environment from /home/runner/micromamba/envs/pygmt. The cached packages are NOT used in the following steps, thus caching downloads is unnecessary.

This PR changes the cache-downloads option to false in ci_*.yml workflows.

Comparing this branch (https://github.com/GenericMappingTools/pygmt/actions/runs/7384789955/job/20088312682?pr=2946) with the main branch (https://github.com/GenericMappingTools/pygmt/actions/runs/7383547780/job/20084932207), the "Setup Micromamba" step is now faster by a few seconds on Linux and 10-100 seconds faster on Windows.

@seisman seisman changed the title WIP: Do not cache downloads CI: Set cache-downloads to false to speedup the "Setup Micromamba" step Jan 2, 2024
@seisman seisman added maintenance Boring but important stuff for the core devs needs review This PR has higher priority and needs review. labels Jan 2, 2024
@seisman seisman added this to the 0.11.0 milestone Jan 2, 2024
@michaelgrund michaelgrund added final review call This PR requires final review and approval from a second reviewer and removed needs review This PR has higher priority and needs review. labels Jan 3, 2024
@seisman seisman merged commit 6f26aea into main Jan 3, 2024
16 of 17 checks passed
@seisman seisman deleted the faster-ci branch January 3, 2024 10:35
@seisman seisman removed the final review call This PR requires final review and approval from a second reviewer label Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Boring but important stuff for the core devs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants