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 ./...