Skip to content

CI: Various caching fixes - #717

Closed
notroj wants to merge 9 commits into
apache:trunkfrom
notroj:ci-better-caching
Closed

CI: Various caching fixes#717
notroj wants to merge 9 commits into
apache:trunkfrom
notroj:ci-better-caching

Conversation

@notroj

@notroj notroj commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

@notroj
notroj force-pushed the ci-better-caching branch 3 times, most recently from b14cd59 to d87ccc1 Compare August 26, 2026 22:02
notroj and others added 6 commits August 26, 2026 23:06
~/perl5 was keyed on $JOBID, giving one near-identical copy per matrix
entry; its content depends only on the perl ABI and the module list.

* .github/workflows/linux.yml: Key it on the image, architecture and a
  hash of travis_before_linux.sh, and skip it for jobs which do not use
  the Perl framework.

* test/README.ci: Describe the cache keys.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Caches in GHA are immutable, so a key which does not change when a
dependency does can never be refreshed; branch builds were therefore
rebuilt on every run, and CLEAR_CACHE disabled caching altogether for
the nine jobs using them.  The key also hashed the whole matrix entry,
so jobs building identical dependencies each had their own copy.

* test/gha-resolve-deps.sh: Added.  Compute $ROOTID from the dependency
  versions, their configure arguments and the compiler flags, resolving
  any branch to a commit; export the commit so that the build uses what
  the key names rather than resolving it a second time.

* .github/workflows/linux.yml: Key ~/root on $ROOTID, skip the cache
  where nothing is built from source, and save it only once the
  dependencies have built successfully.  Drop CLEAR_CACHE=1 from the
  nine jobs which set it.

* test/travis_before_linux.sh (resolve_apx, fetch_apx): Split out of
  install_apx().
  (install_apx): Fetch the APR source before building APR-util if APR
  came from the cache; trust a restored install root.  Drop the
  CLEAR_CACHE handling and the .key-* and openssl-is-* staleness files,
  which the cache key now covers.

* test/README.ci: Update accordingly.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
MARGS is read by nothing.

* .github/workflows/linux.yml: Drop MARGS.  Default MFLAGS to the
  runner's CPU count, unless the matrix entry sets it.

* test/README.ci: Update the MFLAGS description.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Added in r1921311 for the "svn co" of Apache-Test, which went away in
r1934474 along with the last use of svn in CI.

* .github/workflows/linux.yml: Remove pkgs: subversion.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
cpanminus and perl-doc build the CPAN modules for the Perl test
framework, and perl-doc pulls in around a hundred packages; gdb only
extracts backtraces from core dumps.

* .github/workflows/linux.yml: Install the first two only for jobs
  running the framework, and gdb only for jobs which run tests at all.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The ASan jobs are the slowest in the matrix and so set the wall-clock
time for the whole workflow; testing is three quarters of it.

* .github/workflows/linux.yml: Run the Perl framework and the pytest
  suites in separate jobs for each ASan configuration.  Both halves
  build the same dependencies, so they share a ~/root cache entry.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@notroj
notroj force-pushed the ci-better-caching branch from d87ccc1 to 50f74a1 Compare August 26, 2026 22:18
notroj and others added 3 commits August 26, 2026 23:47
The matrix ran all its jobs at once - 37 in the last run - where
https://infra.apache.org/github-actions-policy.html allows at most 20.

* .github/workflows/linux.yml: Set max-parallel.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
With max-parallel set, jobs start in matrix order, so the long ones
have to start first or they run alone at the end; this is worth two
minutes of wall clock.

* .github/workflows/linux.yml: Move the SSL/TLS variant, ASan, UBSan
  and pytest jobs to the head of the matrix.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
It needs only a checkout: of the 23 seconds it took as a matrix job,
one was the check and the rest was installing packages it never used.

* .github/workflows/sanity.yml: Added, for quick checks which need
  nothing built.

* .github/workflows/linux.yml: Drop the job.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
asf-gitbox-commits pushed a commit that referenced this pull request Aug 27, 2026
~/perl5 was keyed on $JOBID, giving one near-identical copy per matrix
entry; its content depends only on the perl ABI and the module list.

* .github/workflows/linux.yml: Key it on the image, architecture and a
  hash of travis_before_linux.sh, and skip it for jobs which do not use
  the Perl framework.

* test/README.ci: Describe the cache keys.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
GitHub: PR #717


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1937497 13f79535-47bb-0310-9956-ffa450edef68
asf-gitbox-commits pushed a commit that referenced this pull request Aug 27, 2026
Caches in GHA are immutable, so a key which does not change when a
dependency does can never be refreshed; branch builds were therefore
rebuilt on every run, and CLEAR_CACHE disabled caching altogether for
the nine jobs using them.  The key also hashed the whole matrix entry,
so jobs building identical dependencies each had their own copy.

* test/gha-resolve-deps.sh: Added.  Compute $ROOTID from the dependency
  versions, their configure arguments and the compiler flags, resolving
  any branch to a commit; export the commit so that the build uses what
  the key names rather than resolving it a second time.

* .github/workflows/linux.yml: Key ~/root on $ROOTID, skip the cache
  where nothing is built from source, and save it only once the
  dependencies have built successfully.  Drop CLEAR_CACHE=1 from the
  nine jobs which set it.

* test/travis_before_linux.sh (resolve_apx, fetch_apx): Split out of
  install_apx().
  (install_apx): Fetch the APR source before building APR-util if APR
  came from the cache; trust a restored install root.  Drop the
  CLEAR_CACHE handling and the .key-* and openssl-is-* staleness files,
  which the cache key now covers.

* test/README.ci: Update accordingly.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
GitHub: PR #717


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1937498 13f79535-47bb-0310-9956-ffa450edef68
asf-gitbox-commits pushed a commit that referenced this pull request Aug 27, 2026
MARGS is read by nothing.

* .github/workflows/linux.yml: Drop MARGS.  Default MFLAGS to the
  runner's CPU count, unless the matrix entry sets it.

* test/README.ci: Update the MFLAGS description.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
GitHub: PR #717


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1937499 13f79535-47bb-0310-9956-ffa450edef68
asf-gitbox-commits pushed a commit that referenced this pull request Aug 27, 2026
Added in r1921311 for the "svn co" of Apache-Test, which went away in
r1934474 along with the last use of svn in CI.

* .github/workflows/linux.yml: Remove pkgs: subversion.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
GitHub: PR #717


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1937500 13f79535-47bb-0310-9956-ffa450edef68
asf-gitbox-commits pushed a commit that referenced this pull request Aug 27, 2026
…ip ci]

cpanminus and perl-doc build the CPAN modules for the Perl test
framework, and perl-doc pulls in around a hundred packages; gdb only
extracts backtraces from core dumps.

* .github/workflows/linux.yml: Install the first two only for jobs
  running the framework, and gdb only for jobs which run tests at all.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
GitHub: PR #717


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1937501 13f79535-47bb-0310-9956-ffa450edef68
asf-gitbox-commits pushed a commit that referenced this pull request Aug 27, 2026
The ASan jobs are the slowest in the matrix and so set the wall-clock
time for the whole workflow; testing is three quarters of it.

* .github/workflows/linux.yml: Run the Perl framework and the pytest
  suites in separate jobs for each ASan configuration.  Both halves
  build the same dependencies, so they share a ~/root cache entry.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
GitHub: PR #717


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1937502 13f79535-47bb-0310-9956-ffa450edef68
asf-gitbox-commits pushed a commit that referenced this pull request Aug 27, 2026
The matrix ran all its jobs at once - 37 in the last run - where
https://infra.apache.org/github-actions-policy.html allows at most 20.

* .github/workflows/linux.yml: Set max-parallel.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
GitHub: PR #717


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1937503 13f79535-47bb-0310-9956-ffa450edef68
asf-gitbox-commits pushed a commit that referenced this pull request Aug 27, 2026
With max-parallel set, jobs start in matrix order, so the long ones
have to start first or they run alone at the end; this is worth two
minutes of wall clock.

* .github/workflows/linux.yml: Move the SSL/TLS variant, ASan, UBSan
  and pytest jobs to the head of the matrix.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
GitHub: PR #717


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1937504 13f79535-47bb-0310-9956-ffa450edef68
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.

1 participant