Skip to content

CI: Use year and week number cache key for -master and -latest - #1110

Merged
rhenium merged 1 commit into
ruby:masterfrom
junaruga:wip/ci-cache-openssl-libressl-master-aws-lc-validity
Sep 8, 2026
Merged

CI: Use year and week number cache key for -master and -latest#1110
rhenium merged 1 commit into
ruby:masterfrom
junaruga:wip/ci-cache-openssl-libressl-master-aws-lc-validity

Conversation

@junaruga

@junaruga junaruga commented Sep 7, 2026

Copy link
Copy Markdown
Member

This PR is a follow-up for #1109 (790ed93). This PR includes the current year and week number by date -u '+%Y%W' in the cache key for openssl-master, libressl-master, and aws-lc-latest to ensure the cached builds are refreshed weekly.

$ date -u '+%Y%W'
202636

I tested the openssl-master and aws-lc-latest cases in my fork repository. The log is below.

https://github.com/junaruga/ruby-openssl/actions/runs/34144869607/job/101814592780#step:4:4

Run actions/cache@v6
  with:
    path: ~/openssl
    key: openssl-Linux-openssl-master-default-202636
    enableCrossOsArchive: false
    fail-on-cache-miss: false
    lookup-only: false
    save-always: false
Cache not found for input keys: openssl-Linux-openssl-master-default-202636

https://github.com/junaruga/ruby-openssl/actions/runs/34144869607/job/101814592774#step:4:4

Run actions/cache@v6
  with:
    path: ~/openssl
    key: openssl-Linux-aws-lc-latest-default-202636
    enableCrossOsArchive: false
    fail-on-cache-miss: false
    lookup-only: false
    save-always: false
Cache not found for input keys: openssl-Linux-aws-lc-latest-default-202636

Commit message

The commit 790ed93 ("CI: enable caching for
openssl-master, libressl-master, and aws-lc-latest") assumed that caches expire
after a week, but they only expire if not accessed within that period. On an
active repository, the cache would be accessed on every CI run and remain
permanently stale.

https://github.com/actions/cache#cache-limits

Include the current year and week number in the cache key for openssl-master,
libressl-master, and aws-lc-latest to ensure the cached builds are refreshed
weekly.

http://man7.org/linux/man-pages/man1/date.1.html

   %W     week number of year, with Monday as first day of week
          (00..53)

Assisted-by: Claude:Opus 4.6

The commit 790ed93 ("CI: enable caching for
openssl-master, libressl-master, and aws-lc-latest") assumed that caches expire
after a week, but they only expire if not accessed within that period. On an
active repository, the cache would be accessed on every CI run and remain
permanently stale.

https://github.com/actions/cache#cache-limits

Include the current year and week number in the cache key for openssl-master,
libressl-master, and aws-lc-latest to ensure the cached builds are refreshed
weekly.

http://man7.org/linux/man-pages/man1/date.1.html

>        %W     week number of year, with Monday as first day of week
>               (00..53)

Assisted-by: Claude:Opus 4.6
@junaruga
junaruga force-pushed the wip/ci-cache-openssl-libressl-master-aws-lc-validity branch from 29d656f to 2ef44dd Compare September 7, 2026 17:17
@junaruga junaruga changed the title CI: Use week number cache key for -master and -latest CI: Use year and week number cache key for -master and -latest Sep 7, 2026
@rhenium
rhenium merged commit b625420 into ruby:master Sep 8, 2026
48 checks passed
@rhenium

rhenium commented Sep 8, 2026

Copy link
Copy Markdown
Member

Thanks! This looks even better.

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.

2 participants