From 56365047338573c408543ce0e44f4bfee1f2efa9 Mon Sep 17 00:00:00 2001 From: rldyourmnd Date: Mon, 24 Aug 2026 03:56:42 +0500 Subject: [PATCH] ci(macos): run the darwin target this repository already ships MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `schemas/v1/release-installation.schema.json` and `bundle-trust.schema.json` both declare `target_os: {"enum": ["darwin", "linux"]}`, and the release builder emits darwin artifacts. Every test so far ran on ubuntu only, so darwin has been cross-compiled and never executed. Cross-compilation proves it builds. It says nothing about behaviour, and this engine is made of the things that differ between the two systems: path resolution, `os.Root` confinement, file locking, temp directory semantics, case sensitivity. `agent-runtime` already tests `[ubuntu-latest, macos-latest]` for the same reason — it ships the same two targets. Standard macOS runners are unmetered on public repositories, so this costs nothing. macOS-XL is billed even on public and is deliberately not used. A separate workflow rather than a matrix inside `gds-ci.yml`, because that file is a generated projection carrying a single `.Runner`; widening it means changing the engine's template and generator and then regenerating under the governed projection path. `.github` is outside `developmentBundleSourcePaths`, so adding a file here leaves the bundle lock alone — confirmed by running `gds context` on this branch, which reports no `GDS_CONTEXT_POLICY_SOURCE_DIGEST_MISMATCH`. It is the same reason `release-bundle.yml` and `codeql.yml` already sit beside the generated workflow. The steps are the repository's own declared commands from `.gds/repository.yaml` (`go vet ./...`, `go build -trimpath ./core/cmd/gds`, `go test ./...`) so this lane cannot drift into testing something else. Not added to `required_contexts`: a lane with no green run yet should not gate the pull request that introduces it. This may well fail on its first run. That would be the finding, not a setback — it would mean the darwin binaries shipped so far were never exercised. Verified on linux: `go vet ./...` and `go build -trimpath ./core/cmd/gds` pass; actionlint 1.7.12 clean. --- .github/workflows/macos.yml | 55 +++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/workflows/macos.yml diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml new file mode 100644 index 0000000..3863a8d --- /dev/null +++ b/.github/workflows/macos.yml @@ -0,0 +1,55 @@ +# macOS coverage for a target this repository already ships. +# +# `schemas/v1/release-installation.schema.json` and `bundle-trust.schema.json` +# both declare `target_os: {"enum": ["darwin", "linux"]}`, and the release +# builder emits darwin artifacts. Until now every test ran on ubuntu only, so +# darwin was cross-compiled and never executed. Cross-compilation proves it +# builds; it says nothing about behaviour, and this engine is full of the things +# that differ between the two — path resolution, os.Root confinement, file +# locking, temp directory semantics, case sensitivity. +# +# This is a separate workflow rather than a matrix inside `gds-ci.yml` because +# that file is a generated projection with a single `.Runner`; widening it is a +# change to the engine's template and generator plus a governed regeneration. +# `.github` is outside `developmentBundleSourcePaths`, so adding a file here +# does not disturb the bundle lock — the same reason `release-bundle.yml` and +# `codeql.yml` sit beside the generated workflow. +# +# Standard macOS runners are unmetered on public repositories. macOS-XL is not, +# and is deliberately not used. +name: macos + +on: + pull_request: + push: + branches: [main] + +permissions: {} + +concurrency: + group: macos-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + +jobs: + darwin: + name: darwin + runs-on: macos-latest + timeout-minutes: 20 + permissions: + contents: read + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 + with: + go-version-file: go.mod + cache: true + # The repository's own declared commands, from `.gds/repository.yaml`, + # so this lane cannot drift into testing something else. + - name: go vet + run: go vet ./... + - name: go build + run: go build -trimpath ./core/cmd/gds + - name: go test + run: go test ./...