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

add sccache to build-test.yml #418

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

add sccache to build-test.yml #418

wants to merge 1 commit into from

Conversation

altendky
Copy link
Contributor

@altendky altendky commented Mar 4, 2024

No description provided.

Copy link

coveralls-official bot commented Mar 4, 2024

Pull Request Test Coverage Report for Build 8135307016

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 85.2%

Totals Coverage Status
Change from base Build 8115930322: 0.0%
Covered Lines: 11439
Relevant Lines: 13426

💛 - Coveralls

Copy link
Contributor

@arvidn arvidn left a comment

Choose a reason for hiding this comment

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

is this using some sccache service?
it would seem simpler (and perhaps more reliable) to use the github action cache action and point it to the cargo target directory (which essentially is a ccache already)


- name: Set sccache env vars
run: |
echo "SCCACHE_GHA_ENABLED=true" >> "$GITHUB_ENV"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
echo "SCCACHE_GHA_ENABLED=true" >> "$GITHUB_ENV"
echo "SCCACHE_GHA_ENABLED=on" >> "$GITHUB_ENV"

according to: https://github.com/mozilla/sccache/blob/main/docs/GHA.md

Copy link
Contributor Author

Choose a reason for hiding this comment

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

https://github.com/mozilla-actions/sccache-action#conditionally-run-cache-and-enable-it says true which is where I copied it from. I haven't actually merged any PR using this though so we don't have any in-house precedence.

@altendky
Copy link
Contributor Author

altendky commented Mar 4, 2024

sccache has builtin GitHub Actions cache support. In my mind it can be way smarter than caching a directory this way. I hadn't dug into it but it might be able to be a global cache instead of per-repository with lots of duplication.

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