Documentation
¶
Index ¶
- func ComputeSpecHash(cell *MatrixCell, catalogData []byte, builderHash string) string
- func ExtensionYAML(spec *catalog.ExtensionSpec) ([]byte, error)
- func HashFile(path string) (string, error)
- func PerVersionYAML(spec *catalog.PHPSpec, version string) ([]byte, error)
- func WriteMatrices(result *Result, outputDir string) error
- type Matrix
- type MatrixCell
- type Result
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComputeSpecHash ¶
func ComputeSpecHash(cell *MatrixCell, catalogData []byte, builderHash string) string
ComputeSpecHash computes a deterministic hash for a matrix cell.
func ExtensionYAML ¶ added in v1.2.0
func ExtensionYAML(spec *catalog.ExtensionSpec) ([]byte, error)
ExtensionYAML marshals an extension spec into canonical YAML for hashing.
func HashFile ¶ added in v1.2.0
HashFile returns "sha256:<hex>" of file contents. Intentionally bails on missing files so callers don't silently produce an empty spec_hash and skip rebuilds when a builder script has been deleted/moved.
func PerVersionYAML ¶ added in v1.2.0
PerVersionYAML marshals a single version entry from a PHP spec into canonical YAML, suitable for hashing. Only the named version is included; unrelated versions and the top-level Name/Smoke fields are omitted so that editing one version does not bust the hash of others.
func WriteMatrices ¶
WriteMatrices writes php.json, ext.json, tool.json to the output directory.
Types ¶
type Matrix ¶
type Matrix struct {
Include []MatrixCell `json:"include"`
}
Matrix is the GitHub Actions matrix JSON format.
type MatrixCell ¶
type MatrixCell struct {
Version string `json:"version,omitempty"`
OS string `json:"os"`
Arch string `json:"arch"`
TS string `json:"ts"`
Digest string `json:"digest,omitempty"`
SpecHash string `json:"spec_hash,omitempty"`
Extension string `json:"extension,omitempty"`
ExtVer string `json:"ext_version,omitempty"`
PHPAbi string `json:"php_abi,omitempty"`
}
MatrixCell represents one concrete build job.
func ExpandExtMatrix ¶
func ExpandExtMatrix(spec *catalog.ExtensionSpec) []MatrixCell
ExpandExtMatrix expands an extension's abi_matrix, applying excludes.
func ExpandPHPMatrix ¶
func ExpandPHPMatrix(spec *catalog.PHPSpec) []MatrixCell
ExpandPHPMatrix expands php.yaml's per-version abi_matrix into concrete build cells. Only versions with `sources:` set contribute cells — the rest encode compat intent and are intentionally skipped here.