Skip to content

Add Julia CI cache#24

Merged
bernalde merged 4 commits into
mainfrom
fix/issue-23-cache-benchmark
Jun 8, 2026
Merged

Add Julia CI cache#24
bernalde merged 4 commits into
mainfrom
fix/issue-23-cache-benchmark

Conversation

@bernalde

@bernalde bernalde commented Jun 8, 2026

Copy link
Copy Markdown
Member

Summary

  • Adds julia-actions/cache@v3 after Julia setup and before julia-buildpkg.
  • Updates actions/upload-artifact from v5 to v7, which removes the Node 20 deprecation annotation seen while benchmarking.
  • Keeps package code unchanged; this is limited to CI workflow behavior.

Benchmark

No-cache medians from #23:

Job Median total Median build Median test
Julia 1.10 Ubuntu 2m42s 16s 2m16s
Julia 1 Ubuntu 4m16s 12s 3m26s
Julia 1.10 Windows 5m08s 40s 4m05s
Julia 1 Windows 6m37s 30s 5m40s

Cold/warm cache benchmark with julia-actions/cache@v3.1.0 on run 27117362896:

Job Cold total Warm total Delta Cold test Warm test Warm cache restore Warm cache save
Julia 1.10 Ubuntu 2m56s 1m48s -68s (-39%) 2m16s 1m06s 10s 9s
Julia 1 Ubuntu 4m33s 1m53s -160s (-59%) 3m37s 1m14s 7s 7s
Julia 1.10 Windows 5m23s 3m42s -101s (-31%) 4m05s 2m17s 32s 18s
Julia 1 Windows 7m51s 4m11s -220s (-47%) 6m22s 2m22s 43s 27s

The cache adds save overhead on cold runs, but warm runs are materially faster. The direct v3 benchmark improved the matrix critical path from 7m51s to 4m11s (-220s, -47%). At review time, julia-actions/cache@v3 resolves to the same tag SHA as v3.1.0.

Final branch validation after switching to major action tags used run 27119881459:

Job Total Build Test Cache restore Cache save
Julia 1.10 Ubuntu 1m48s 11s 1m07s 9s 8s
Julia 1 Ubuntu 1m54s 8s 1m13s 8s 8s
Julia 1.10 Windows 3m30s 16s 2m09s 32s 15s
Julia 1 Windows 3m56s 9s 1m59s 43s 28s

The latest final-workflow attempt's matrix critical path was 3m56s, still materially below the 6m37s no-cache baseline critical path from #23. The final workflow passed with julia-actions/cache@v3 and actions/upload-artifact@v7.

Validation

  • git diff --check
  • actionlint .github/workflows/ci.yml
  • julia --project=. -e 'using Pkg; Pkg.test()'
  • CI run 27117362896: pass after cold and warm attempts
  • CI run 27119881459: pass after switching new actions to major tags

Closes #23

@bernalde bernalde changed the title Benchmark Julia CI cache Add Julia CI cache Jun 8, 2026
@bernalde bernalde marked this pull request as ready for review June 8, 2026 05:30

@bernalde bernalde left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review as repository maintainer.

I am the PR author, so GitHub does not allow me to submit a formal APPROVE or REQUEST_CHANGES on this PR (HTTP 422); this is submitted as COMMENT. The formal verdict must come from another maintainer. Based on my review there are no blocking issues and the PR is merge-ready.

What the change does: adds julia-actions/cache@v3.1.0 between setup-julia and julia-buildpkg, and bumps actions/upload-artifact from v5 to v7.0.1. CI-only; no package code changes.

Verification:

  • Diff confirmed against merge-base e1ad2b4: 1 file, +2/-1, matching the PR's reported totals. The three commits net to exactly these two line changes.
  • Both action references resolve to real, current tags: julia-actions/cache@v3.1.0 (a45e8fa, identical to the floating v3) and actions/upload-artifact@v7.0.1 (043fb46, identical to the floating v7).
  • The cache step is placed where issue #23 specified (after setup-julia@v3, before julia-buildpkg@v1).
  • The cache action key is derived from the Julia version and Project/Manifest hashes, so it invalidates correctly; no stale-environment correctness concern.
  • CI is green on all four jobs (ubuntu + windows, Julia 1.10 and 1) on run 27117763727.

Intent vs issue #23: the issue is a benchmark-then-decide task. Acceptance criteria are met: no package code changes; cold/warm timings recorded in the PR body and the issue comment; cache restore/save times reported for all four matrix jobs; CI passes on both OSes and both Julia versions; and the warm critical path improves well past the issue's threshold (slowest Windows job 7m51s -> 4m11s, -220s; overall -47%, vs the >=60s or >=20% bar). The issue proposed @v2, but the recorded benchmark was run with @v3.1.0, so the merged version matches what was actually measured. Closes #23 is appropriate (the issue's decision criterion is satisfied and the change is being adopted, not just measured). I take the benchmark numbers as contributor-supplied claims; I did not re-run the timing matrix, but the action tags, placement, and green CI are independently verified.

  1. Blocking issues: none.

  2. Nonblocking issues:

  • Version-pinning inconsistency. The two touched actions are pinned to patch tags (cache@v3.1.0, upload-artifact@v7.0.1) while every other action in the workflow floats on a major (checkout@v6, setup-julia@v3, julia-buildpkg@v1, julia-runtest@v1, julia-processcoverage@v1). Patch pins won't pick up upstream bugfixes and read inconsistently with the rest of the file. Pick one convention: float to @v3/@v7 to match the existing style, or (if pinning for supply-chain reasons) pin all actions to full commit SHAs. Minor.
  1. Questions:
  • The actions/upload-artifact v5->v7 bump is outside issue #23's stated scope (purely the cache benchmark). It is benign and justified by the PR body (removes the Node 20 deprecation annotation), and CI confirms the artifact still uploads, but it is an unrelated CI-hygiene change folded into a cache PR. Intentional to bundle here, or better as its own commit/PR for a cleaner history? Not blocking either way.
  1. Tests run and outcomes:
  • No package tests are affected by this change. Verified the two action tags exist and resolve to current releases; verified placement against the issue; relied on the PR's CI (run 27117763727), which passes on all four matrix jobs and exercises both the cache step and the updated artifact upload.
  1. Merge-readiness: merge-ready. Small, CI-only change that meets issue #23's documented merge criterion with green CI on all supported platforms. The nonblocking pinning item and the scope question are optional cleanups.

Comment thread .github/workflows/ci.yml Outdated
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/cache@v3.1.0

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nonblocking (minor): this pins to the patch tag v3.1.0, while every other action in this file floats on a major (checkout@v6, setup-julia@v3, julia-buildpkg@v1, etc.). A patch pin won't pick up upstream bugfixes and is inconsistent with the surrounding style. Suggest julia-actions/cache@v3 to match convention, or pin all actions to full SHAs if the intent is supply-chain hardening.

@bernalde bernalde Jun 8, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in d3d8a33 by switching this to julia-actions/cache@v3. I also verified @v3 currently resolves to the same tag SHA as the benchmarked v3.1.0, and CI run 27119881459 passed with @v3.

Comment thread .github/workflows/ci.yml Outdated
- uses: julia-actions/julia-processcoverage@v1
if: matrix.version == '1' && matrix.os == 'ubuntu-latest'
- uses: actions/upload-artifact@v5
- uses: actions/upload-artifact@v7.0.1

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question + same pinning note: bumping upload-artifact v5 -> v7.0.1 is outside issue #23's scope (cache benchmark). It's benign and CI confirms the upload still works, but it's an unrelated change in a cache PR; consider whether it belongs in its own commit/PR. Also @v7.0.1 is a patch pin where the rest of the file floats on majors -- prefer @v7 for consistency.

@bernalde bernalde Jun 8, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed the pinning part in d3d8a33 by switching this to actions/upload-artifact@v7. I kept the artifact bump in this PR rather than splitting it out because it removes the Node 20 warning from the same CI workflow; CI run 27119881459 passed with @v7.

@bernalde bernalde left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking issues: none.

Nonblocking issues: none.

Questions: none.

Tests run and outcomes:

  • Fetched origin/main and origin/fix/issue-23-cache-benchmark, then diffed from merge-base e1ad2b4883e0f1c2a2c70deb57b93c67a5fe4f13.
  • Verified GitHub's PR file totals match local diff totals: 1 changed file, +2/-1.
  • Read issue #23 and its comments; the PR addresses the requested cache benchmark, records cold/warm timings, confirms passing CI, and uses Closes #23 appropriately.
  • git diff --check: passed.
  • julia --project=. -e 'using Pkg; Pkg.test()': passed, including package metadata, README JuMP workflow, and QUBODrivers tests.
  • gh pr checks 24: passed on all four CI matrix jobs for run 27117763727 attempt 2.

Merge-readiness: merge-ready from my review. Because I am authenticated as the PR author, GitHub does not permit a formal self-approval; this review is submitted as COMMENT, and the formal approval must come from another maintainer.

@bernalde

bernalde commented Jun 8, 2026

Copy link
Copy Markdown
Member Author

Addressed the unresolved review threads.

Commits pushed:

Main changes made:

  • Changed julia-actions/cache@v3.1.0 to julia-actions/cache@v3.
  • Changed actions/upload-artifact@v7.0.1 to actions/upload-artifact@v7.
  • Updated the PR body so the summary and final validation table match the current workflow.

Tests run and results:

  • git diff --check: passed.
  • actionlint .github/workflows/ci.yml: passed.
  • julia --project=. -e 'using Pkg; Pkg.test()': passed.
  • Verified julia-actions/cache@v3 resolves to the same tag SHA as v3.1.0, and actions/upload-artifact@v7 resolves to the same tag SHA as v7.0.1.
  • CI run 27119881459 passed on all four matrix jobs with cache@v3 and upload-artifact@v7.

Comments intentionally not addressed:

  • I did not split the actions/upload-artifact bump into a separate PR. I kept it here because it is a small CI-only cleanup in the same workflow, removes the Node 20 deprecation annotation observed during this cache validation, and the final PR CI validates the upload step.

Remaining risks or follow-up items:

  • The only remaining CI annotation is GitHub's windows-latest image redirect notice, unrelated to these review threads.

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.

Benchmark julia-actions/cache for CI runtime

1 participant