-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve ccache use on github workflows (#1243)
* Update merge group job * Move pr to pull_request for consistency * Define Celeritas hostname in github CI to improve caching * Add ccache debug and increase sizes * Add weekly cron job and ccache rebuild
- Loading branch information
Showing
7 changed files
with
102 additions
and
9 deletions.
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