Skip to content

fix(ci): resolve both zig and cargo-zigbuild binary paths - #957

Merged
ajianaz merged 1 commit into
developfrom
fix/zigbuild-path-v3
Aug 8, 2026
Merged

ajianaz merged 1 commit into
developfrom
fix/zigbuild-path-v3

Conversation

@ajianaz

@ajianaz ajianaz commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

What

Fix zig: command not found di release workflow. Dua binary ada di lokasi berbeda setelah pip install — perlu resolve keduanya secara dinamis.

Why

PR sebelumnya (#953, #955) gagal karena:

  1. PR fix(ci): add ~/.local/bin to PATH for ziglang binary #953: $HOME/.local/bin → salah, pip install ke user-base yang bervariasi
  2. PR fix(ci): resolve zig binary path for current step #955: python3 -m site --user-base → hanya menemukan cargo-zigbuild, bukan zig

Binary zig sebenarnya ada di dalam Python package ziglang/ (bukan di bin/), sementara cargo-zigbuild ada di user-base/bin. Dua lokasi berbeda.

Changes

  • Resolve zig binary via import ziglang; os.path.dirname(ziglang.__file__)
  • Resolve cargo-zigbuild via python3 -m site --user-base/bin
  • Add kedua path ke GITHUB_PATH (subsequent steps) dan PATH (current step)
  • Verify kedua command: zig version + cargo zigbuild --version

Testing

CI akan verify:

  1. zig version runs in install step
  2. cargo zigbuild --version runs in install step
  3. Build step can run cargo zigbuild --target ...2.17
  4. GLIBC verification passes

Two binaries at different locations:
- cargo-zigbuild: python3 -m site --user-base /bin/
- zig: inside ziglang Python package directory

Add both to GITHUB_PATH (subsequent steps) and PATH (current step).
Verify both commands work in the install step.
@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown

🔍 Cora AI Code Review

✅ No issues found. Code looks good!


Review powered by cora-code · BYOK · MIT

@ajianaz
ajianaz merged commit e47c9cf into develop Aug 8, 2026
12 checks passed
ajianaz added a commit that referenced this pull request Aug 13, 2026
Two binaries at different locations:
- cargo-zigbuild: python3 -m site --user-base /bin/
- zig: inside ziglang Python package directory

Add both to GITHUB_PATH (subsequent steps) and PATH (current step).
Verify both commands work in the install step.

Co-authored-by: ajianaz <[email protected]>
@ajianaz
ajianaz deleted the fix/zigbuild-path-v3 branch August 13, 2026 01:52
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