Skip to content

Add phase-1 native arm64 nightly CI (regress + isolation on ubuntu-24.04-arm) - #8816

Open
ibrahim halatci (ihalatci) wants to merge 2 commits into
mainfrom
ihalatci-arm64-nightly-ci
Open

Add phase-1 native arm64 nightly CI (regress + isolation on ubuntu-24.04-arm)#8816
ibrahim halatci (ihalatci) wants to merge 2 commits into
mainfrom
ihalatci-arm64-nightly-ci

Conversation

@ihalatci

Copy link
Copy Markdown
Contributor

What

Adds a phase-1, bounded nightly GitHub Actions workflow that natively compiles Citus and runs its core regression suites on arm64 (ubuntu-24.04-arm). This is the upstream half of the multi-arch effort tracked by citus#8612.

Docker (multi-arch alpine image) and packaging (gated arm64 .deb legs) have already shipped their arm64 support; the remaining gap was that no CI validated that Citus itself builds and its tests pass on arm64 — a search of .github/ finds zero arm64 / aarch64 / ubuntu-24.04-arm references before this change. This PR closes that gap.

Files changed

  • NEW .github/workflows/nightly_arm64.yml
  • MODIFY .github/actions/setup_cassert_pg/action.yml (optional cassert input; cache-key hardening)

Design

Reuses the arch-portable from-source build seam

The workflow reuses .github/actions/setup_cassert_pg, which builds PostgreSQL from source via pgenv and then ./configure && make all && make install-all for Citus on a bare runner — no prebuilt, amd64-locked container. Getting native arm64 coverage is therefore mostly a matter of runs-on: ubuntu-24.04-arm.

Bounded phase-1 matrix (intentional, to cap arm-runner cost)

  • PostgreSQL: 17 (17.9) and 18 (18.3) only.
  • Suite groups: regress and isolation only (≈4 test jobs), reusing the exact make-target lists from nightly_cassert.yml.
  • Deliberately dropped for phase 1 (with an in-file comment to expand once green): arbitrary-configs, pg-upgrade, citus-upgrade, columnar, failure, tap, generator.
  • Triggers: schedule at 0 4 * * * (04:00 UTC — offset from the 03:00 cassert nightly cron) + workflow_dispatch.

Clean pass/fail signal → assert-off build

The purpose of this nightly is arm validation (green = "Citus works on arm"). setup_cassert_pg normally builds an --enable-cassert PG whose nightly is "expected red" as pre-existing asserts surface — that would muddy the arm signal. So this workflow builds assert-off:

  • A new optional input cassert (default "true") was added to setup_cassert_pg. The default preserves the existing cassert nightly's behavior byte-for-byte.
  • When cassert: "false" (which the arm workflow passes), the action strips --enable-cassert from the copied pgenv default.conf (the source config is untouched) and skips the guard that otherwise hard-fails a non-cassert build.

Tradeoff: an assert-off build won't catch arm-specific assertion violations. That's acceptable for a phase-1 pass/fail gate; a cassert arm leg can be layered on later once the basic gate is reliably green.

Cache-key correctness (arch + cassert segments)

The pgenv cache key gained ${{ runner.arch }} and a cassert${{ inputs.cassert }} segment. runner.os is Linux on both amd64 and arm64 runners, so without an arch segment an amd64 ~/.pgenv (prebuilt binaries) could be restored onto an arm64 runner. The cassert segment keeps assert-on and assert-off builds in separate cache entries (the assert-off edit is applied to the copied config, so it does not change hashFiles('.devcontainer/pgenv/config/default.conf')). Net effect on the existing cassert nightly: a one-time cache rebuild, then identical behavior.

Failure notifications

The notify job mirrors the cassert nightly's auto-file-issue-on-failure logic but uses an arm64-specific label (nightly-arm64), marker, and title, so its failure issues never collide with the cassert nightly's.

Explicitly out of scope (follow-up)

Gating pull requests on arm64. build_and_test.yml / run_tests.yml run inside prebuilt, amd64-only containers (ghcr.io/citusdata/extbuilder:*, ghcr.io/citusdata/exttester:*). arm64 PR-gating would first require rebuilding that whole builder/tester image toolchain multi-arch (in citusdata/the-process). That is the natural next step if/when arm64 PR-gating is desired — not part of this PR.

Guarantees / blast radius

  • The existing amd64 pipelines (build_and_test.yml, run_tests.yml, nightly_cassert.yml) are not modified. The only shared change is the optional, default-preserving cassert input on setup_cassert_pg.
  • Validated with actionlint (clean on the new workflow) and YAML parse.

Notes

  • This PR is opened as a DRAFT. First scheduled/dispatched runs may reveal arm-specific compile or test issues; the intent is to surface those for triage rather than to deep-fix arm bugs in this PR.

Refs citus#8612.

@codecov

codecov Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.72%. Comparing base (92d0b92) to head (b79d864).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8816      +/-   ##
==========================================
- Coverage   88.73%   88.72%   -0.01%     
==========================================
  Files         289      289              
  Lines       65013    65013              
  Branches     8203     8203              
==========================================
- Hits        57691    57686       -5     
- Misses       4954     4956       +2     
- Partials     2368     2371       +3     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Adds a bounded nightly GitHub Actions workflow that natively compiles Citus
and runs the core regress + isolation suites on ubuntu-24.04-arm, closing the
gap where no CI validated Citus on arm64. Upstream half of the multi-arch
effort tracked by citus#8612.

- New .github/workflows/nightly_arm64.yml: runs-on ubuntu-24.04-arm, cron
  04:00 UTC + workflow_dispatch, bounded matrix (PG 17/18 x {regress,
  isolation}), assert-off build for a clean pass/fail signal, arm64-specific
  failure-issue notify job.
- setup_cassert_pg: add optional cassert input (default "true", behavior
  unchanged for the existing cassert nightly). cassert=false strips
  --enable-cassert from the copied pgenv config and skips the assert-on guard.
  Cache key gains runner.arch + cassert segments so amd64/arm64 and
  assert-on/off caches never collide.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@ihalatci
ibrahim halatci (ihalatci) marked this pull request as ready for review September 2, 2026 14:35
Matches build_and_test.yml after #8804.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.

2 participants