Skip to content

fix(ci): use ZIG_LOCAL_CACHE_DIR and pre-warm zig cc for cross-compile - #23

Merged
c2j merged 1 commit into
mainfrom
release/v0.2.5
Jul 13, 2026
Merged

c2j merged 1 commit into
mainfrom
release/v0.2.5

Conversation

@c2j

@c2j c2j commented Jul 13, 2026

Copy link
Copy Markdown
Owner

ZIG_GLOBAL_CACHE_DIR does not control where zig cc caches compiled

objects (.o files) — that is ZIG_LOCAL_CACHE_DIR. The arm64 build was

silently using the default ~/.cache/zig, causing tree-sitter-java's

build script to hit a corrupted cache entry (parser.o FileNotFound)

when parallel C compilations raced on the first aarch64 libc setup.

  • Replace ZIG_GLOBAL_CACHE_DIR with ZIG_LOCAL_CACHE_DIR in all build steps

  • Add a pre-warm step that compiles a trivial C file before the parallel

    cargo build, serializing zig's bundled libc compilation

Ultraworked with Sisyphus

ZIG_GLOBAL_CACHE_DIR does not control where zig cc caches compiled

objects (.o files) — that is ZIG_LOCAL_CACHE_DIR. The arm64 build was

silently using the default ~/.cache/zig, causing tree-sitter-java's

build script to hit a corrupted cache entry (parser.o FileNotFound)

when parallel C compilations raced on the first aarch64 libc setup.

- Replace ZIG_GLOBAL_CACHE_DIR with ZIG_LOCAL_CACHE_DIR in all build steps

- Add a pre-warm step that compiles a trivial C file before the parallel

  cargo build, serializing zig's bundled libc compilation

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
@c2j
c2j merged commit 925b6a9 into main Jul 13, 2026
5 checks passed
@github-actions

Copy link
Copy Markdown

CodeRoughcollie 多项目审核报告

总览

项目 🔴 Critical 🟡 Warning 🔵 Info 健康度
self 0 0 0 100 (优秀)

项目: self

执行摘要

指标
健康度评分 🟢 100/100(优秀)
问题总数 0(🔴 Critical: 0 / 🟡 Warning: 0 / 🔵 Info: 0)
审核分支 origin/main
门禁结论 通过 — 未发现问题

审核通过,未发现问题。

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