Skip to content

Improve CI workflow verification and caching#26

Merged
Symmetricity merged 6 commits into
masterfrom
ci/workflow-improvements
Jun 4, 2026
Merged

Improve CI workflow verification and caching#26
Symmetricity merged 6 commits into
masterfrom
ci/workflow-improvements

Conversation

@Symmetricity

@Symmetricity Symmetricity commented Jun 4, 2026

Copy link
Copy Markdown
Owner

AI-generated PR.

This is a fork-only draft PR for validating CI changes before deciding whether to send anything upstream.

Summary

This updates the CI workflow to make generated tile checks more useful and repeated runs faster:

  • add a TILEMAKER_DISABLE_CLIP_CACHE build option for semantic verification builds
  • build both the normal tilemaker binary and a no-clip-cache binary in CI
  • use the no-clip-cache binary only for semantic generated-tile comparison
  • keep the normal production build path unchanged
  • move vcpkg dependencies into vcpkg.json
  • add Dependabot coverage for vcpkg and GitHub Actions
  • add compiler caching with ccache/sccache
  • add a CMake configure-only smoke job before the full matrix
  • move repeated tile generation commands into shared Bash and PowerShell helpers
  • make generated artifact uploads fail if expected outputs are missing
  • avoid recompressing generated tile artifacts during upload
  • add static validation for PowerShell CI scripts

Clip Cache Verification Mode

The clip cache disable option is intended for CI verification, or for anyone who explicitly wants guaranteed repeatability over runtime performance.

Production behavior remains unchanged. The normal CI builds still compile and run tilemaker with the clip cache enabled. Only the semantic verification artifacts are generated with TILEMAKER_DISABLE_CLIP_CACHE=ON, so normal output generation and packaged binaries continue to exercise the default production path.

This avoids treating known clip-cache scheduling differences as semantic failures while still keeping the normal cache-enabled build covered by build and tile-generation checks.

Generated tile output is not expected to semantically match across all CI runners until systemed#889 is merged. The no-clip-cache verification path is meant to provide a stable CI comparison once the remaining semantic-output fix is present.

Dependency And Cache Changes

vcpkg.json now records the Windows/Linux vcpkg dependency set directly in the repository. CI installs from the manifest instead of repeating the dependency list inline in the workflow. This gives Dependabot a file it can understand and keeps dependency drift easier to review.

The workflow also adds:

  • vcpkg binary cache keys based on vcpkg.json
  • an explicit checkout of the vcpkg.json builtin-baseline before manifest install, so hosted-runner vcpkg checkouts use the matching registry files
  • ccache for Linux and macOS builds
  • sccache for Windows CMake builds
  • runner image details in cache keys where appropriate

These caches are best-effort. The build remains correct on cache miss; the benefit is reduced rebuild time on warmed runners and repeated CI runs.

Validation Changes

The workflow now runs cheap checks before starting dependency-heavy builds:

  • JSON validation
  • Lua profile syntax validation
  • Python CI script compilation
  • PowerShell CI script parsing
  • shellcheck
  • actionlint
  • CMake configure-only smoke check

The changed-file gate also treats .github/scripts/*, vcpkg.json, and vcpkg-configuration.json as runtime-impacting so changes to CI helpers or dependency manifests do not accidentally skip the matrix that needs to exercise them.

Tile Generation Helpers

The repeated generated-tile commands were moved into:

  • .github/scripts/generate-tiles.sh
  • .github/scripts/generate-tiles.ps1

Both helpers check tilemaker's exit status and verify that each expected output file exists and is non-empty. This keeps the Windows, CMake, and Makefile jobs aligned and avoids maintaining the same error handling in several inline workflow blocks.

Artifact Handling

Generated tile and binary uploads now set if-no-files-found: error, so missing output is reported at the upload step instead of silently producing incomplete artifacts.

Generated tile artifact uploads also use compression-level: 0. The outputs are already compressed formats, so this avoids spending CI time recompressing MBTiles/PMTiles artifacts.

Local Checks

Ran locally:

  • actionlint .github/workflows/ci.yml
  • shellcheck .github/scripts/generate-tiles.sh
  • YAML parse for .github/workflows/ci.yml and .github/dependabot.yml
  • JSON parse for vcpkg.json
  • PowerShell parse for .github/scripts/generate-tiles.ps1
  • git diff --cached --check
  • local smoke generation with .github/scripts/generate-tiles.sh against the Liechtenstein fixture using the no-clip-cache binary

Symmetricity and others added 6 commits June 4, 2026 18:21
The clip cache can make generated tile semantics depend on which ancestor clips happen to be present during parallel tile generation. That is useful for normal runtime, but it makes CI semantic checks sensitive to cache scheduling instead of the underlying output path being verified.

Add a compile-time CMake switch that replaces ClipCache with always-miss no-op methods, then build a second CI binary with that switch enabled. Normal tile outputs are still generated and archive-validated with the cache enabled, while repeat and cross-runner semantic comparisons use only the no-cache artifacts.

Co-authored-by: Codex <noreply@openai.com>
The CMake jobs listed the same vcpkg packages directly in the workflow, which made dependency changes harder to review and made the binary cache depend on unrelated workflow edits.

Move the dependency list into vcpkg.json with a pinned builtin baseline, use manifest-mode installs in the Windows and Linux vcpkg jobs, and key the binary cache on the manifest files. Add Dependabot coverage for the vcpkg baseline so dependency refreshes are proposed as focused changes.

Co-authored-by: Codex <noreply@openai.com>
Add compiler caching to the CMake and Makefile jobs so repeated CI runs can reuse object files in addition to the vcpkg binary cache.

Move repeated tile generation commands into shared Bash and PowerShell helpers, then require uploaded artifacts to exist and avoid spending time recompressing generated tile outputs.

Add a configure-only CMake smoke job and parse checks for PowerShell CI scripts so common workflow or build-setup mistakes fail before the full matrix starts.

Co-authored-by: Codex <noreply@openai.com>
Hosted runner vcpkg checkouts can be too shallow to resolve the manifest builtin-baseline, which makes vcpkg install fail before CMake starts.

Fetch the baseline named in vcpkg.json before dependency installation so Dependabot baseline updates remain usable across the Windows and Linux CMake jobs.

Co-authored-by: Codex <noreply@openai.com>
Fetching the manifest baseline is not enough for hosted runner vcpkg checkouts because vcpkg also reads the working-tree versions database.

Check out the baseline named in vcpkg.json before installing dependencies so the registry files and builtin-baseline agree on both Windows and Linux CMake jobs.

Co-authored-by: Codex <noreply@openai.com>
The normal tile-generation path passes an empty suffix so that the generated files keep their historical names. PowerShell treats a mandatory string parameter as rejecting empty input unless it is explicitly allowed, which made the Windows CMake job fail before tilemaker ran.

Allow only this parameter to accept an empty string. The non-empty no-clip-cache suffix path and the shell script behavior are unchanged.

Co-authored-by: Codex <noreply@openai.com>
@Symmetricity Symmetricity merged commit ecb80c8 into master Jun 4, 2026
12 of 13 checks passed
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