Skip to content

ci: cache dependencies and share frontend build artifacts across workflows - #945

Merged
kyasbal merged 6 commits into
GoogleCloudPlatform:mainfrom
kyasbal:push-xsxuqrxsuptr
Sep 3, 2026
Merged

kyasbal merged 6 commits into
GoogleCloudPlatform:mainfrom
kyasbal:push-xsxuqrxsuptr

Conversation

@kyasbal

@kyasbal kyasbal commented Sep 3, 2026

Copy link
Copy Markdown
Member

Summary

This PR optimizes GitHub Actions CI workflow runtimes and reliability by:

  1. Enabling npm dependency caching across all workflows using actions/setup-node with cache: "npm" and cache-dependency-path: "web/package-lock.json".
  2. Enabling explicit Go module & build caching across all workflows with cache: true and cache-dependency-path: "go.sum".
  3. Caching font atlas generation & pinning woff2 commit:
    • Pinned woff2 git clone to an immutable commit SHA (1c69169e9e1811dccd6c54c532fedda300233968).
    • Made scripts/msdf-generator/setup.sh CWD-safe.
    • Added two-level caching for the compiled woff2_decompress binary and generated font atlas assets to avoid re-cloning and recompiling C++ on every run.
  4. Caching and sharing frontend build artifacts:
    • Added a dedicated build-web job that builds pkg/server/dist once, caches it via actions/cache, and shares it via actions/upload-artifact.
    • Updated backend-tests and build-binaries to consume the build artifact via actions/download-artifact, completely eliminating redundant frontend builds and npm ci steps in those jobs.
    • Added frontend build cache support to release.yaml.

Commits

  • ci: enable npm cache across GitHub Actions workflows
  • ci: configure explicit Go caching with go.sum across GitHub Actions workflows
  • ci: cache font atlas and woff2 binary across GitHub Actions workflows
  • ci: cache and share frontend build artifacts across GitHub Actions workflows

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request adds a nil check when parsing form task requests in Go, and refactors the MSDF generator setup script to pin the woff2 dependency and avoid redundant builds. The reviewer correctly identified that changing the working directory in the setup script breaks the relative path to node_modules (which resides in the web directory), and provided a robust code suggestion using absolute paths and subshells to fix this issue.

Comment thread scripts/msdf-generator/setup.sh Resolved
@kyasbal
kyasbal force-pushed the push-xsxuqrxsuptr branch 3 times, most recently from 0f56f16 to 68a8697 Compare September 3, 2026 02:36
@kyasbal
kyasbal marked this pull request as ready for review September 3, 2026 04:28
@kyasbal
kyasbal merged commit 6f0f1c2 into GoogleCloudPlatform:main Sep 3, 2026
17 checks passed
@kyasbal
kyasbal deleted the push-xsxuqrxsuptr branch September 3, 2026 04:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant