-
Notifications
You must be signed in to change notification settings - Fork 10
chore: add cache-maintenance, bump workflow versions #162
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
Open
ryan-steel
wants to merge
4
commits into
eclipse-score:main
Choose a base branch
from
etas-contrib:add-caching-to-workflows
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
f524f85
add cache-maintenance, bump workflow versions
ryan-steel 2ec569d
chore: update to match cache-maintenance guide
ryan-steel b7c2c1e
chore: Merge branch 'main' of https://github.com/etas-contrib/score_t…
ryan-steel 4391703
chore: fix cache_maintenance permissions
ryan-steel 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,68 @@ | ||
| # ******************************************************************************* | ||
| # Copyright (c) 2026 Contributors to the Eclipse Foundation | ||
| # | ||
| # See the NOTICE file(s) distributed with this work for additional | ||
| # information regarding copyright ownership. | ||
| # | ||
| # This program and the accompanying materials are made available under the | ||
| # terms of the Apache License Version 2.0 which is available at | ||
| # https://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # ******************************************************************************* | ||
|
|
||
| name: Cache maintenance | ||
|
|
||
| # Refreshes caches and rebuilds a new bazel repository cache when MODULE.bazel.lock changes. | ||
| # Caches are only saved on pushes to the main branch or on workflow_dispatch events. | ||
| # In merge_groups and pull requests a fast dry-run is executed to ensure inputs are valid and caches can be rebuilt successfully. | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [opened, reopened, synchronize, labeled, unlabeled] | ||
| merge_group: | ||
| types: [checks_requested] | ||
| workflow_dispatch: | ||
| push: | ||
| branches: [main] | ||
|
|
||
| jobs: | ||
| repository_cache_maintenance: | ||
| permissions: | ||
| actions: write # needed for cache deletion after cache refresh | ||
| contents: read | ||
| secrets: | ||
| score-qnx-license: ${{ secrets.SCORE_QNX_LICENSE }} | ||
| score-qnx-user: ${{ secrets.SCORE_QNX_USER }} | ||
| score-qnx-password: ${{ secrets.SCORE_QNX_PASSWORD }} | ||
| uses: eclipse-score/cicd-workflows/.github/workflows/cache-maintenance.yml@c644440e1f98e65db039cd66bcaa557314e6201b | ||
| with: | ||
| variants: | | ||
| //... | ||
| --config=time-x86_64-linux //... | ||
| --config=time-arm64-linux //... | ||
| --config=time-x86_64-qnx //score/... //examples/... | ||
| --config=time-arm64-qnx //score/... //examples/... | ||
|
|
||
| warmup-qnx: | ||
| needs: repository_cache_maintenance | ||
| # PR and merge-queue runs validate variants above but never warm or write | ||
| # shared caches. | ||
| if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} | ||
| permissions: | ||
| contents: read | ||
| pull-requests: read | ||
| secrets: inherit | ||
| uses: ./.github/workflows/build-qnx.yml | ||
|
|
||
| delete_old_caches: | ||
| runs-on: ubuntu-24.04 | ||
| needs: | ||
| - warmup-qnx | ||
| permissions: | ||
| actions: write # needed for deletion of old caches | ||
| contents: read | ||
| if: ${{ !cancelled() && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') }} | ||
| steps: | ||
| - name: Prune obsolete Bazel caches | ||
| uses: eclipse-score/cicd-actions/prune-cache@212bbf86267e9381da9d2daf962d12f6feafbc90 | ||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
I think, to make it working (if need), we need to follow the full manual
see https://github.com/eclipse-score/cicd-workflows/blob/main/.github/workflows/cache-maintenance.md
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.
And another uestion is if we really needs the job
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.
Ah, good catch - this guide didn't exist when I first created the PR. Updated to reflect.
I also would argue that we do need the job, because our QNX builds fail quite often from a timeout trying to download from qnx.com - this mitigates that. I've only added the caching for qnx.