rul1an/Zig Cross-Compile Action
Secure, cached, polyglot cross-compilation toolchain using Zig.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| version | Zig version (e.g. 0.13.0, 0.13.x, stable) | no | 0.13.0 |
| target | Zig target triple (e.g. x86_64-linux-gnu). Supersedes target_preset. | no | — |
| project-type | Project type: zig | c/go/rust/custom (polyglot env support only) | no | custom |
| cmd | Build command to execute (run depends on project-type) | no | "" |
| verify-level | Deprecated: no-op in v3. | no | basic |
| strict_version | Fail if the exact version cannot be resolved | no | true |
| setup_only | Only set up toolchain/env, do not run build command | no | false |
| target_preset | Target alias (e.g. linux-x86_64-musl, macos-arm64) | no | — |
| use_cache | Enable caching of Zig artifacts (~/.cache/zig) | no | false |
| cache_suffix | Optional suffix for cache keys | no | "" |
| run_tests | Run tests before build | no | false |
| test_script | Script to execute tests | no | "" |
| perf_command | Optional performance benchmark command | no | "" |
| sbom | Generate SBOM using Syft (Linux only) | no | false |
| sbom_format | SBOM format | no | cyclonedx-json |
| sbom_target | Path to input artifact for SBOM generation | no | "" |
| sbom_output | SBOM output path | no | dist/sbom.cdx.json |
| sign | Sign artifact using Cosign (Linux only) | no | false |
| sign_artifact | Path to artifact to sign | no | "" |
Outputs
| name | description |
|---|---|
| zig_path | Path to installed Zig binary |
| zig_version_resolved | Resolved Zig version |
| zig_target_triple | Resolved target triple |
| cache_hit | Cache hit status |