-
Notifications
You must be signed in to change notification settings - Fork 27
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
ENH: Fix caching-related warnings in GHA build-test-publish
CI
#475
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -88,7 +88,7 @@ jobs: | |
- uses: actions/checkout@v4 | ||
- uses: actions/cache@v4 | ||
with: | ||
path: /var/lib/apt | ||
path: ${{ runner.temp }}/cache-linux | ||
key: apt-cache-v3 | ||
restore-keys: | | ||
apt-cache-v3 | ||
|
@@ -102,13 +102,16 @@ jobs: | |
libglu1-mesa-dev libglw1-mesa \ | ||
libxm4 build-essential | ||
|
||
- uses: actions/cache@v4 | ||
- name: Restore cache for AFNI | ||
id: cache-afni | ||
uses: actions/cache@v4 | ||
with: | ||
path: /opt/afni | ||
key: afni-v1 | ||
key: afni-v1-${{ matrix.python-version }}-${{ matrix.dependencies }}-${{ matrix.marks }} | ||
restore-keys: | | ||
afni-v1 | ||
afni-v1- | ||
- name: Install AFNI | ||
if: steps.cache-afni.outputs.cache-hit != 'true' | ||
Comment on lines
+105
to
+114
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We set up this cache to not depend on the specific job, as its contents should not vary. Not saving multiple caches is a feature, not a bug. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My memory is vague now, but looking at the commit message maybe GHA was showing some warning about name clashes (e.g. if two processes were trying to write to the same file)? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When there's a cache miss, each job will populate the directory, and the first to finish will successfully save the cache. That's fine and expected. The alternative would be to create a separate job to ensure the cache exists, and insert it into the workflow ahead of these. |
||
run: | | ||
if [[ ! -d "${AFNI_HOME}" ]]; then | ||
curl -O https://afni.nimh.nih.gov/pub/dist/bin/misc/@update.afni.binaries && \ | ||
|
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.
Warning: Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.
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.
Maybe we should just drop the APT cache, since it hasn't worked, and it would only save us up to 15s in 8m jobs.
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'm fine if we want to drop this; I do not have a strong opinion. Let me know if you firmly believe we should go ahead and remove it, or whether you want other maintainers to weigh in.
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's clearly not serving its purpose, so it's safe to remove. If you or @oesteban want to take another stab at reducing this time, you're welcome to, but if you're just motivated to reduce warnings, the simple path forward is remove the cache.