-
Notifications
You must be signed in to change notification settings - Fork 35
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
Improve ccache use on github workflows #1243
Merged
+102
−9
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
a67d3ed
Add preset for MI250
sethrj 3b85f66
Update merge group job
sethrj d27149a
Move pr to pull_request for consistency
sethrj 99fae2a
Define Celeritas hostname in github CI to improve caching
sethrj 6405eb2
Add ccache debug and increase sizes
sethrj bde4fa3
Add weekly cron job and ccache rebuild
sethrj b9c9355
Revert "Add preset for MI250"
sethrj 3e91294
Merge branch 'develop' into ci-ccache
sethrj File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: clear-cache | ||
|
||
on: | ||
workflow_dispatch: | ||
workflow_call: | ||
|
||
jobs: | ||
clear-cache: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Clear ccache | ||
uses: actions/github-script@v7 | ||
with: | ||
script: | | ||
console.log("Getting action cache") | ||
const caches = await github.rest.actions.getActionsCacheList({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
}) | ||
for (const cache of caches.data.actions_caches) { | ||
if (cache.key.startsWith("ccache-") { | ||
console.log("Deleting cache entry", cache) | ||
github.rest.actions.deleteActionsCacheById({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
cache_id: cache.id, | ||
}) | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: pull_request | ||
run-name: >- | ||
${{github.event.pull_request.title}} | ||
(#${{github.event.number}}) | ||
|
||
on: | ||
schedule: | ||
- cron: "33 06 * * 0" # Sunday at 6:33 am UTC | ||
|
||
jobs: | ||
clear-ccache: | ||
uses: ./.github/workflows/clear-cache.yml | ||
build-fast: | ||
needs: [clear-cache] | ||
uses: ./.github/workflows/build-fast.yml | ||
build-ultralite: | ||
needs: [clear-cache] | ||
uses: ./.github/workflows/build-ultralite.yml | ||
build-spack: | ||
needs: [clear-cache] | ||
uses: ./.github/workflows/build-spack.yml | ||
|
||
all: | ||
if: ${{always()}} | ||
needs: | ||
- build-fast | ||
- build-spack | ||
- build-ultralite | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check that all jobs succeeded | ||
uses: re-actors/alls-green@release/v1 | ||
with: | ||
jobs: ${{toJSON(needs)}} | ||
|
||
# vim: set nowrap tw=100: |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: pr | ||
name: pull_request | ||
run-name: >- | ||
${{github.event.pull_request.title}} | ||
(#${{github.event.number}}) | ||
|
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
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
Oops, something went wrong.
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.
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.
Should it run on all the platform with CCache? (I.e. eg Windows?)
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.
Nope. All it's doing is making GitHub calls; the cache itself is platform agnostic.