planner

package
v1.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

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

func HashFile(path string) (string, error)

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

func PerVersionYAML(spec *catalog.PHPSpec, version string) ([]byte, error)

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

func WriteMatrices(result *Result, outputDir string) error

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.

type Result

type Result struct {
	PHP  Matrix
	Ext  Matrix
	Tool Matrix
}

Result contains the three output matrices.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL