Skip to content

Conversation

@mmcky
Copy link
Contributor

@mmcky mmcky commented Nov 7, 2025

Objective

Migrate cache.yml to use composite actions with global caching infrastructure.

Changes

Composite Actions

  • setup-lecture-env@main - Conda environment with global cache
  • setup-latex@main - LaTeX packages with global cache
  • build-lectures@main - Jupyter Book HTML build

Global Caching Strategy

  • Conda cache key: conda-Linux-hash(environment.yml)-v1

    • Shared across all workflows (cache.yml, ci.yml, publish.yml)
    • Invalidates when environment.yml changes
  • LaTeX cache key: latex-Linux-hash(latex-requirements.txt)-v1

    • Shared across all workflows
    • Invalidates when latex-requirements.txt changes
    • Version-pinned packages (TexLive 2023.20240207-1)

New Files

  • latex-requirements.txt - Version-pinned LaTeX packages

Workflow Triggers

  • Added push: branches: [main] to create golden cache on main branch
  • Existing: weekly cron + manual dispatch

Testing Plan

  1. Run cache.yml workflow on this branch
  2. Verify cache creation (conda + latex)
  3. Verify build completes successfully
  4. Merge to main
  5. Subsequent workflows should restore from cache

Benefits

  • ⚡ Faster builds (cache restore vs fresh install)
  • 🌍 Global cache sharing across workflows
  • 📌 Version-pinned LaTeX for reproducibility
  • 🔄 Explicit cache invalidation via version changes

Next Steps

After merge:

  • Migrate ci.yml workflow
  • Migrate publish.yml workflow
  • Convert _build artifact to cache mechanism

Changes:
- Use setup-lecture-env@main for Conda environment (global cache)
- Use setup-latex@main for LaTeX packages (global cache)
- Use build-lectures@main for Jupyter Book builds
- Add latex-requirements.txt with version pinning
- Add push:branches:[main] trigger for golden cache creation

This establishes the global caching infrastructure:
- Conda cache: shared across all workflows
- LaTeX cache: shared across all workflows
- Version-pinned LaTeX packages for explicit invalidation
@netlify
Copy link

netlify bot commented Nov 7, 2025

Deploy Preview for jade-tarsier-d98a19 ready!

Name Link
🔨 Latest commit 59afd5a
🔍 Latest deploy log https://app.netlify.com/projects/jade-tarsier-d98a19/deploys/690d7c009626700007fbe907
😎 Deploy Preview https://deploy-preview-3--jade-tarsier-d98a19.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

mmcky added 2 commits November 7, 2025 15:45
Long-running cache builds should only run:
- Weekly on schedule (Monday 3am)
- Manual dispatch when needed
- Not on every main push (dependencies change rarely)
@github-actions
Copy link

github-actions bot commented Nov 7, 2025

mmcky and others added 2 commits November 7, 2025 15:54
Renamed collab.yml to collab.yml.disabled to prevent execution during cache migration testing
@mmcky
Copy link
Contributor Author

mmcky commented Nov 7, 2025

  • manual cache run works so merging - not worried about ci.yml yet.

@mmcky mmcky merged commit d84b0a1 into main Nov 7, 2025
5 checks passed
@github-actions github-actions bot temporarily deployed to pull request November 7, 2025 05:05 Inactive
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