-
Notifications
You must be signed in to change notification settings - Fork 24
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
fix: avoid downloading package when local cache exists #123
Merged
sylvestre
merged 2 commits into
Mozilla-Actions:main
from
i10416:fix/add-local-cache-search-before-download
Jul 18, 2024
Merged
fix: avoid downloading package when local cache exists #123
sylvestre
merged 2 commits into
Mozilla-Actions:main
from
i10416:fix/add-local-cache-search-before-download
Jul 18, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Xuanwo
approved these changes
Jun 18, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
i10416
commented
Jun 18, 2024
// Search local file system cache for sccache. | ||
// This is useful when actions run on a self-hosted runner. | ||
let sccacheHome = find('sccache', version); | ||
if (sccacheHome === '') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems find
returns empty string when a tool is not found.
sylvestre
force-pushed
the
fix/add-local-cache-search-before-download
branch
from
June 18, 2024 07:56
bbaa6a8
to
de2ec3d
Compare
sylvestre
force-pushed
the
fix/add-local-cache-search-before-download
branch
from
July 18, 2024 07:31
de2ec3d
to
5201bf8
Compare
As mentioned in #107, `setup` function didn't use `find` function even though it uses `cacheDir` to store downloaded files, which leads to redundant download. It is not significant on GitHub-hosted runners because `cacheDir` stores files in local file system, which is ephemeral. However, it wastes time on self-hosted runners. This commit adds a step to search local file system cache for sccache as well as splitting download procedure to a dedicated function.
sylvestre
force-pushed
the
fix/add-local-cache-search-before-download
branch
from
July 18, 2024 08:27
5201bf8
to
8dbd02f
Compare
renovate bot
referenced
this pull request
in spiraldb/vortex
Sep 27, 2024
…942) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [mozilla-actions/sccache-action](https://github.com/mozilla-actions/sccache-action) | action | patch | `v0.0.5` -> `v0.0.6` | --- ### Release Notes <details> <summary>mozilla-actions/sccache-action (mozilla-actions/sccache-action)</summary> ### [`v0.0.6`](https://github.com/Mozilla-Actions/sccache-action/releases/tag/v0.0.6) [Compare Source](https://github.com/mozilla-actions/sccache-action/compare/v0.0.5...v0.0.6) ##### What's Changed - fix: string interpolation by [@​i10416](https://github.com/i10416) in [https://github.com/Mozilla-Actions/sccache-action/pull/122](https://github.com/Mozilla-Actions/sccache-action/pull/122) - Keep GitHub Actions up to date with GitHub's Dependabot by [@​cclauss](https://github.com/cclauss) in [https://github.com/Mozilla-Actions/sccache-action/pull/131](https://github.com/Mozilla-Actions/sccache-action/pull/131) - fix: avoid downloading package when local cache exists by [@​i10416](https://github.com/i10416) in [https://github.com/Mozilla-Actions/sccache-action/pull/123](https://github.com/Mozilla-Actions/sccache-action/pull/123) - Set baseUrl for Octokit to make it work on GitHub Enterprise Server by [@​palloberg](https://github.com/palloberg) in [https://github.com/Mozilla-Actions/sccache-action/pull/144](https://github.com/Mozilla-Actions/sccache-action/pull/144) ##### dependencies - Bump eslint-plugin-jest from 28.5.0 to 28.6.0 by [@​dependabot](https://github.com/dependabot) in [https://github.com/Mozilla-Actions/sccache-action/pull/130](https://github.com/Mozilla-Actions/sccache-action/pull/130) - Bump ts-jest from 29.1.4 to 29.2.2 by [@​dependabot](https://github.com/dependabot) in [https://github.com/Mozilla-Actions/sccache-action/pull/134](https://github.com/Mozilla-Actions/sccache-action/pull/134) - Bump [@​types/node](https://github.com/types/node) from 20.13.0 to 20.14.11 by [@​dependabot](https://github.com/dependabot) in [https://github.com/Mozilla-Actions/sccache-action/pull/133](https://github.com/Mozilla-Actions/sccache-action/pull/133) - Bump [@​typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/eslint-plugin) from 7.8.0 to 7.16.1 by [@​dependabot](https://github.com/dependabot) in [https://github.com/Mozilla-Actions/sccache-action/pull/132](https://github.com/Mozilla-Actions/sccache-action/pull/132) - Bump typescript from 5.4.5 to 5.5.3 by [@​dependabot](https://github.com/dependabot) in [https://github.com/Mozilla-Actions/sccache-action/pull/128](https://github.com/Mozilla-Actions/sccache-action/pull/128) - Bump ts-jest from 29.2.2 to 29.2.5 by [@​dependabot](https://github.com/dependabot) in [https://github.com/Mozilla-Actions/sccache-action/pull/141](https://github.com/Mozilla-Actions/sccache-action/pull/141) - Bump eslint-plugin-prettier from 5.1.3 to 5.2.1 by [@​dependabot](https://github.com/dependabot) in [https://github.com/Mozilla-Actions/sccache-action/pull/140](https://github.com/Mozilla-Actions/sccache-action/pull/140) - Bump prettier from 3.3.2 to 3.3.3 by [@​dependabot](https://github.com/dependabot) in [https://github.com/Mozilla-Actions/sccache-action/pull/136](https://github.com/Mozilla-Actions/sccache-action/pull/136) - Bump typescript from 5.5.3 to 5.6.2 by [@​dependabot](https://github.com/dependabot) in [https://github.com/Mozilla-Actions/sccache-action/pull/145](https://github.com/Mozilla-Actions/sccache-action/pull/145) ##### New Contributors - [@​i10416](https://github.com/i10416) made their first contribution in [https://github.com/Mozilla-Actions/sccache-action/pull/122](https://github.com/Mozilla-Actions/sccache-action/pull/122) - [@​cclauss](https://github.com/cclauss) made their first contribution in [https://github.com/Mozilla-Actions/sccache-action/pull/131](https://github.com/Mozilla-Actions/sccache-action/pull/131) - [@​palloberg](https://github.com/palloberg) made their first contribution in [https://github.com/Mozilla-Actions/sccache-action/pull/144](https://github.com/Mozilla-Actions/sccache-action/pull/144) **Full Changelog**: Mozilla-Actions/sccache-action@v0.0.5...v0.0.6 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/spiraldb/vortex). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC45Ny4wIiwidXBkYXRlZEluVmVyIjoiMzguOTcuMCIsInRhcmdldEJyYW5jaCI6ImRldmVsb3AiLCJsYWJlbHMiOltdfQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
renovate bot
referenced
this pull request
in spiraldb/fastlanes
Sep 27, 2024
) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [mozilla-actions/sccache-action](https://github.com/mozilla-actions/sccache-action) | action | patch | `v0.0.5` -> `v0.0.6` | --- ### Release Notes <details> <summary>mozilla-actions/sccache-action (mozilla-actions/sccache-action)</summary> ### [`v0.0.6`](https://github.com/Mozilla-Actions/sccache-action/releases/tag/v0.0.6) [Compare Source](https://github.com/mozilla-actions/sccache-action/compare/v0.0.5...v0.0.6) ##### What's Changed - fix: string interpolation by [@​i10416](https://github.com/i10416) in [https://github.com/Mozilla-Actions/sccache-action/pull/122](https://github.com/Mozilla-Actions/sccache-action/pull/122) - Keep GitHub Actions up to date with GitHub's Dependabot by [@​cclauss](https://github.com/cclauss) in [https://github.com/Mozilla-Actions/sccache-action/pull/131](https://github.com/Mozilla-Actions/sccache-action/pull/131) - fix: avoid downloading package when local cache exists by [@​i10416](https://github.com/i10416) in [https://github.com/Mozilla-Actions/sccache-action/pull/123](https://github.com/Mozilla-Actions/sccache-action/pull/123) - Set baseUrl for Octokit to make it work on GitHub Enterprise Server by [@​palloberg](https://github.com/palloberg) in [https://github.com/Mozilla-Actions/sccache-action/pull/144](https://github.com/Mozilla-Actions/sccache-action/pull/144) ##### dependencies - Bump eslint-plugin-jest from 28.5.0 to 28.6.0 by [@​dependabot](https://github.com/dependabot) in [https://github.com/Mozilla-Actions/sccache-action/pull/130](https://github.com/Mozilla-Actions/sccache-action/pull/130) - Bump ts-jest from 29.1.4 to 29.2.2 by [@​dependabot](https://github.com/dependabot) in [https://github.com/Mozilla-Actions/sccache-action/pull/134](https://github.com/Mozilla-Actions/sccache-action/pull/134) - Bump [@​types/node](https://github.com/types/node) from 20.13.0 to 20.14.11 by [@​dependabot](https://github.com/dependabot) in [https://github.com/Mozilla-Actions/sccache-action/pull/133](https://github.com/Mozilla-Actions/sccache-action/pull/133) - Bump [@​typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/eslint-plugin) from 7.8.0 to 7.16.1 by [@​dependabot](https://github.com/dependabot) in [https://github.com/Mozilla-Actions/sccache-action/pull/132](https://github.com/Mozilla-Actions/sccache-action/pull/132) - Bump typescript from 5.4.5 to 5.5.3 by [@​dependabot](https://github.com/dependabot) in [https://github.com/Mozilla-Actions/sccache-action/pull/128](https://github.com/Mozilla-Actions/sccache-action/pull/128) - Bump ts-jest from 29.2.2 to 29.2.5 by [@​dependabot](https://github.com/dependabot) in [https://github.com/Mozilla-Actions/sccache-action/pull/141](https://github.com/Mozilla-Actions/sccache-action/pull/141) - Bump eslint-plugin-prettier from 5.1.3 to 5.2.1 by [@​dependabot](https://github.com/dependabot) in [https://github.com/Mozilla-Actions/sccache-action/pull/140](https://github.com/Mozilla-Actions/sccache-action/pull/140) - Bump prettier from 3.3.2 to 3.3.3 by [@​dependabot](https://github.com/dependabot) in [https://github.com/Mozilla-Actions/sccache-action/pull/136](https://github.com/Mozilla-Actions/sccache-action/pull/136) - Bump typescript from 5.5.3 to 5.6.2 by [@​dependabot](https://github.com/dependabot) in [https://github.com/Mozilla-Actions/sccache-action/pull/145](https://github.com/Mozilla-Actions/sccache-action/pull/145) ##### New Contributors - [@​i10416](https://github.com/i10416) made their first contribution in [https://github.com/Mozilla-Actions/sccache-action/pull/122](https://github.com/Mozilla-Actions/sccache-action/pull/122) - [@​cclauss](https://github.com/cclauss) made their first contribution in [https://github.com/Mozilla-Actions/sccache-action/pull/131](https://github.com/Mozilla-Actions/sccache-action/pull/131) - [@​palloberg](https://github.com/palloberg) made their first contribution in [https://github.com/Mozilla-Actions/sccache-action/pull/144](https://github.com/Mozilla-Actions/sccache-action/pull/144) **Full Changelog**: Mozilla-Actions/sccache-action@v0.0.5...v0.0.6 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/spiraldb/fastlanes). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC45Ny4wIiwidXBkYXRlZEluVmVyIjoiMzguOTcuMCIsInRhcmdldEJyYW5jaCI6ImRldmVsb3AiLCJsYWJlbHMiOltdfQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
jschwe
added a commit
to jschwe/servo
that referenced
this pull request
Sep 27, 2024
Interesting changes since v0.0.4 - fix: avoid downloading package when local cache exists in Mozilla-Actions/sccache-action#123 - Output sccache stats as a notice and a summary table in Mozilla-Actions/sccache-action#113 v0.0.6 changelog: https://github.com/Mozilla-Actions/sccache-action/releases/tag/v0.0.6 v0.0.5 changelog: https://github.com/Mozilla-Actions/sccache-action/releases/tag/v0.0.5 Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
2 tasks
github-merge-queue bot
pushed a commit
to servo/servo
that referenced
this pull request
Sep 27, 2024
Interesting changes since v0.0.4 - fix: avoid downloading package when local cache exists in Mozilla-Actions/sccache-action#123 - Output sccache stats as a notice and a summary table in Mozilla-Actions/sccache-action#113 v0.0.6 changelog: https://github.com/Mozilla-Actions/sccache-action/releases/tag/v0.0.6 v0.0.5 changelog: https://github.com/Mozilla-Actions/sccache-action/releases/tag/v0.0.5 Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As mentioned in
#107,
setup
function didn't usefind
function even though it usescacheDir
to store downloaded files, which leads to redundant download.It is not significant on GitHub-hosted runners because
cacheDir
stores files in local file system, which is ephemeral. However, it wastes time on self-hosted runners.This commit adds a step to search local file system cache for sccache as well as splitting download procedure to a dedicated function.