Skip to content

ci(nightly): scheduled nightly build + smoke + optional pre-release - #93

Merged
gustavobertoi merged 1 commit into
mainfrom
ci/nightly-builds
Jul 1, 2026
Merged

ci(nightly): scheduled nightly build + smoke + optional pre-release#93
gustavobertoi merged 1 commit into
mainfrom
ci/nightly-builds

Conversation

@gustavobertoi

Copy link
Copy Markdown
Contributor

What

Adds a scheduled Nightly GitHub Actions lane plus supporting Makefile targets.

  • .github/workflows/nightly.yml
    • schedule: cron '0 7 * * *' (07:00 UTC daily) + workflow_dispatch.
    • nightly job runs the full make ci equivalent plus the 4-target CGO-free cross-build and the determinism assertion, via a single make nightly target: fmt-check → vet → cross (linux/darwin × amd64/arm64, CGO_ENABLED=0) → test-race (CGO_ENABLED=1) → determinism.
    • check-latest: true on setup-go so the lane picks up new Go point releases (the whole point of a nightly).
    • Guarded by if: github.repository == 'open-source-cloud/devstack' so scheduled/dispatch runs no-op on forks.
    • prerelease job (default OFF): gated on the repo variable NIGHTLY_PRERELEASE == 'true'. Runs goreleaser in snapshot mode and uploads the tarballs/.deb/.rpm/checksums as workflow artifacts (7-day retention). It never creates a GitHub Release and never pushes a git tag.
  • Makefile: new cross (4-target build smoke) and nightly (make ci + cross + determinism) targets; added to .PHONY.

Why

Catch drift the per-PR CI can miss — a new Go release, a transitive dep that breaks a cross-compile target, or non-deterministic generation — before it bites a real release.

Deliberately no semver release and no git tag: a stray non-semver tag (e.g. nightly) confuses goreleaser's git describe and breaks release-dryrun on every PR (per the repo's no-non-semver-tags rule). Nightly builds surface as workflow artifacts only.

How tested

  • gofmt -l . clean, go vet ./... clean, CGO_ENABLED=0 go build ./... ok.
  • CGO_ENABLED=1 go test ./internal/... all green.
  • make -n nightly expands to the expected fmt-check/vet/cross/test-race/determinism chain.
  • nightly.yml validated with yaml.safe_load (parses ok).

🤖 Generated with Claude Code

Add .github/workflows/nightly.yml: a scheduled (07:00 UTC daily) +
workflow_dispatch lane that runs the full nightly gate (fmt-check, vet,
4-target CGO-free cross-build, CGO=1 test-race, determinism) via a new
`make nightly` target, plus an optional, default-OFF goreleaser snapshot
pre-release job gated on the NIGHTLY_PRERELEASE repo variable that uploads
artifacts (never a git tag, never a semver release).

Both jobs are guarded by `github.repository == 'open-source-cloud/devstack'`
so scheduled/dispatch runs no-op on forks. The pre-release path publishes
goreleaser SNAPSHOT artifacts as workflow artifacts only — it never creates
a `nightly` git tag, which would confuse goreleaser's git describe and break
release-dryrun on every PR (MEMORY: no-non-semver-tags).

Also adds `make cross` (4-target build smoke) and `make nightly` (make ci +
cross + determinism) to mirror the workflow locally.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@gustavobertoi
gustavobertoi merged commit 6b3c5a6 into main Jul 1, 2026
4 checks passed
@gustavobertoi
gustavobertoi deleted the ci/nightly-builds branch July 1, 2026 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant