Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
set -eu
assets="$(gh release view "$TAG" --repo "$GITHUB_REPOSITORY" --json assets --jq '.assets[].name')"
echo "$assets"
for t in darwin-arm64 linux-amd64 linux-arm64; do
for t in darwin-arm64 darwin-amd64 linux-amd64 linux-arm64; do
for f in "pgx-$VERSION-$t.tar.gz" "pgx-$VERSION-$t.tar.gz.sha256"; do
echo "$assets" | grep -qx "$f" || { echo "::error::release $TAG lacks $f" >&2; exit 1; }
done
Expand Down
10 changes: 1 addition & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,8 @@ jobs:
- { os: ubuntu-24.04, target: linux-amd64 }
- { os: ubuntu-24.04-arm, target: linux-arm64 }
- { os: macos-14, target: darwin-arm64 }
# Experimental: Intel macOS. Not yet validated; continue-on-error so a
# failure here never blocks the release of the three supported targets.
# Remove `experimental` once an artifact has passed smoke_packaged.sh.
- { os: macos-15-intel, target: darwin-amd64, experimental: true }
- { os: macos-15-intel, target: darwin-amd64 }
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental || false }}
steps:
- uses: actions/checkout@v4
- name: Determine version
Expand Down Expand Up @@ -104,10 +100,6 @@ jobs:
steps:
- uses: actions/download-artifact@v4
with: { path: artifacts }
- name: Drop the experimental darwin-amd64 build (actions artifact only, never a release asset)
# macOS on Intel is not supported until that artifact has been validated;
# publishing it would make `npx pgxdb` / install.sh pick it up blindly.
run: rm -rf artifacts/pgx-darwin-amd64
- name: Collect checksums
run: |
cd artifacts && find . -name '*.sha256' -exec cat {} \; > ../checksums.txt
Expand Down
17 changes: 12 additions & 5 deletions .github/workflows/validate-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
- { os: ubuntu-24.04, target: linux-amd64 }
- { os: ubuntu-24.04-arm, target: linux-arm64 }
- { os: macos-14, target: darwin-arm64 }
- { os: macos-15-intel, target: darwin-amd64 }
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand All @@ -50,7 +51,7 @@ jobs:
uses: actions/cache@v4
with:
path: ${{ runner.temp }}/pgx-static-re2
key: static-re2-macos-arm64-absl20260817.0-re2-2025-11-05-v1
key: static-re2-macos-${{ runner.arch }}-absl20260817.0-re2-2025-11-05-v1
- name: Build static re2+abseil prefix (macOS)
if: runner.os == 'macOS'
run: |
Expand Down Expand Up @@ -122,20 +123,26 @@ jobs:
runuser -u pgxtester -- sh dist/test/smoke_packaged.sh "$DIST"

smoke-macos:
name: smoke darwin-arm64 (no Homebrew re2/abseil loaded)
name: smoke ${{ matrix.target }} (no Homebrew re2/abseil loaded)
needs: build
runs-on: macos-14
strategy:
fail-fast: false
matrix:
include:
- { os: macos-14, target: darwin-arm64, arch: arm64 }
- { os: macos-15-intel, target: darwin-amd64, arch: x86_64 }
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with: { name: pgx-darwin-arm64, path: dl }
with: { name: "pgx-${{ matrix.target }}", path: dl }
- name: Verify checksum, architecture, extract
run: |
cd dl
shasum -a 256 -c ./*.tar.gz.sha256
tar -xzf ./*.tar.gz
d="$(find . -maxdepth 1 -type d -name 'pgx-*')"
file "$d/bin/postgres" | grep -qi 'Mach-O 64-bit executable arm64'
file "$d/bin/postgres" | grep -qi 'Mach-O 64-bit executable ${{ matrix.arch }}'
echo "DIST=$PWD/$d" >> "$GITHUB_ENV"
- name: Self-contained + smoke (asserts 0 Homebrew dylibs loaded)
run: |
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,8 @@ npx pgxdb stop

The binary is downloaded once (SHA-256 verified) into `~/.pgx/dist/<version>`
and reused. `npm install -g pgxdb` puts `pgx` on your PATH for good. Supported:
Apple silicon Macs and Linux (arm64, x86-64). Intel Macs are not supported yet.
macOS (Apple silicon and Intel) and Linux (arm64, x86-64). Intel Macs are
supported from the first release after v0.1.2.

Without Node, the shell installer does the same install:

Expand Down
3 changes: 0 additions & 3 deletions dist/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ case "$arch" in
aarch64|arm64) arch=arm64 ;;
*) err "unsupported CPU architecture: $arch (PGX supports amd64 and arm64)" ;;
esac
if [ "$os" = darwin ] && [ "$arch" = amd64 ]; then
err "macOS on Intel is not a supported target; supported: darwin-arm64, linux-amd64, linux-arm64"
fi

# Downloader.
if have curl; then dl() { curl -fsSL "$1" -o "$2"; }; dlout() { curl -fsSL "$1"; }
Expand Down
4 changes: 2 additions & 2 deletions dist/npm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ Environment overrides:
| `PGX_HOME`, `PGX_PORT`, `PGX_PASSWORD`, `PGX_DURABILITY` | passed through to `pgx` (see `npx pgxdb help`) |

Requires Node.js 18 or newer and `tar` (present on every supported OS).
Intel Macs are not supported yet (no binary is published; `npx pgxdb` says
so), and Windows is not supported.
Intel Macs are supported from the first release after 0.1.2 (older releases
publish no darwin-amd64 binary; `npx pgxdb` says so). Windows is not supported.

## Links

Expand Down
4 changes: 2 additions & 2 deletions dist/npm/lib/pgxdb.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ function missingAssetMessage(target, version, url, status) {
let msg = `download failed: ${url}: HTTP ${status}`;
if (target === 'darwin-amd64' && status === 404) {
msg +=
`\n macOS on Intel is not supported yet: no PGX ${version} binary is published for darwin-amd64.` +
'\n PGX runs on Apple silicon Macs and on Linux (arm64, x86-64).';
`\n PGX ${version} predates macOS on Intel: no binary is published for darwin-amd64.` +
'\n Intel Macs are supported from the first release after 0.1.2; install `pgxdb@latest`.';
}
return msg;
}
Expand Down
6 changes: 3 additions & 3 deletions dist/npm/test/unit.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ test('pgxArgs defaults to `run` when no arguments are given', () => {
assert.deepEqual(pgxdb.pgxArgs(['--json']), ['--json', 'run'], 'bare --json still means run');
});

test('missingAssetMessage names macOS Intel as unsupported when its asset is missing', () => {
test('missingAssetMessage explains a release that predates macOS Intel', () => {
const url = 'https://example/v0.1.0/pgx-0.1.0-darwin-amd64.tar.gz';
const m = pgxdb.missingAssetMessage('darwin-amd64', '0.1.0', url, 404);
assert.match(m, /download failed: .*darwin-amd64\.tar\.gz: HTTP 404/);
assert.match(m, /macOS on Intel .*not supported yet/);
assert.match(m, /Apple silicon|Linux/);
assert.match(m, /0\.1\.0 predates macOS on Intel/);
assert.match(m, /pgxdb@latest/);
// Other targets get the plain message only.
const other = pgxdb.missingAssetMessage('linux-amd64', '0.1.0', url, 404);
assert.equal(other, `download failed: ${url}: HTTP 404`);
Expand Down
1 change: 1 addition & 0 deletions dist/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ Or download the tarball for your platform below, verify its SHA-256 against
| Linux x86-64 | `pgx-<version>-linux-amd64.tar.gz` |
| Linux arm64 | `pgx-<version>-linux-arm64.tar.gz` |
| macOS arm64 | `pgx-<version>-darwin-arm64.tar.gz` |
| macOS x86-64 | `pgx-<version>-darwin-amd64.tar.gz` |

XML functions and ICU collations use the host's libxml2 and ICU when present.

Expand Down
2 changes: 1 addition & 1 deletion dist/test/assemble_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ PGX_STUB="$TMP/pgx-stub"; printf '#!/bin/sh\necho stub\n' > "$PGX_STUB"; chmod +
PREFIX="$(find "$TMP/out" -maxdepth 1 -type d -name 'pgx-0.0.0-test-*' | head -1)"
[ -n "$PREFIX" ] || fail "no pgx-0.0.0-test-<os>-<arch> directory under out/"
case "$(basename "$PREFIX")" in
pgx-0.0.0-test-darwin-arm64|pgx-0.0.0-test-linux-amd64|pgx-0.0.0-test-linux-arm64) ;;
pgx-0.0.0-test-darwin-arm64|pgx-0.0.0-test-darwin-amd64|pgx-0.0.0-test-linux-amd64|pgx-0.0.0-test-linux-arm64) ;;
*) fail "unexpected platform suffix: $(basename "$PREFIX")" ;;
esac

Expand Down
2 changes: 1 addition & 1 deletion dist/test/smoke_packaged.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ if [ "$OS" = Darwin ]; then
[ -e "$f" ] || continue
stray="$(otool -L "$f" | tail -n +2 | awk '{print $1}' | grep -vE '^/usr/lib/|^/System/|^@(rpath|loader_path|executable_path)/' || true)"
[ -z "$stray" ] || die "$f loads non-system libs:\n$stray"
[ "$f" = "$PG" ] && { n=$(DYLD_PRINT_LIBRARIES=1 "$PG" --version 2>&1 | grep -c '/opt/homebrew' || true); [ "$n" = 0 ] || die "engine loads $n Homebrew dylibs"; }
[ "$f" = "$PG" ] && { n=$(DYLD_PRINT_LIBRARIES=1 "$PG" --version 2>&1 | grep -cE '^dyld[^ ]* <[^>]*> (/opt/homebrew|/usr/local)/' || true); [ "$n" = 0 ] || die "engine loads $n Homebrew dylibs"; }
done
echo "ok: only /usr/lib + /System (and bundled @rpath), 0 Homebrew loads"
else
Expand Down
6 changes: 3 additions & 3 deletions docs/pgx/local-dev/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ runs start in well under a second.
`pgxdb@X.Y.Z` installs PGX `X.Y.Z`, so `@latest` is the latest PGX release.
`PGX_VERSION`, `PGX_INSTALL_DIR` and `PGX_BASE_URL` override the version,
cache directory and download base. `npm install -g pgxdb` provides both
`pgxdb` and `pgx` on your PATH. Node.js 18+ is required. Supported: Apple
silicon Macs and Linux (arm64, x86-64); Intel Macs and Windows are not
`pgxdb` and `pgx` on your PATH. Node.js 18+ is required. Supported: macOS
(Apple silicon and Intel) and Linux (arm64, x86-64); Windows is not
supported (see the platform table below).

## One-line install (shell)
Expand Down Expand Up @@ -93,5 +93,5 @@ See the repository README "Quickstart → Build": the Rust toolchain (pinned by
| macOS arm64 (Apple silicon) | supported, verified |
| Linux arm64 | supported, verified |
| Linux x86-64 | supported, built and smoke-tested in CI |
| macOS x86-64 (Intel) | **not supported yet**: no binary is published. `npx pgxdb` and the shell installer both refuse with a clear message. The release workflow has an experimental, non-blocking Intel build leg whose artifact is kept out of releases until it has been validated |
| macOS x86-64 (Intel) | supported from the first release after v0.1.2, built and smoke-tested in CI; verified on macOS 15.8 (Core i5-8279U): lifecycle, databases and clone suites and `smoke_packaged.sh` pass. Releases up to v0.1.2 publish no Intel binary |
| Windows | not supported |
4 changes: 2 additions & 2 deletions plugins/pgx/skills/pgx/references/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ for the user to run themselves and stop.

## Platforms

macOS arm64 (Apple silicon), Linux amd64, Linux arm64. Not supported: Intel
macOS, Windows (WSL2 counts as Linux). Do not claim otherwise; on an
macOS arm64 (Apple silicon), macOS amd64 (Intel; releases after v0.1.2
only), Linux amd64, Linux arm64. Not supported: Windows (WSL2 counts as Linux). Do not claim otherwise; on an
unsupported platform explain and stop.

Docker is not needed. PGX is a single runtime process started by `pgx start`
Expand Down
4 changes: 2 additions & 2 deletions skills/pgx/references/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ for the user to run themselves and stop.

## Platforms

macOS arm64 (Apple silicon), Linux amd64, Linux arm64. Not supported: Intel
macOS, Windows (WSL2 counts as Linux). Do not claim otherwise; on an
macOS arm64 (Apple silicon), macOS amd64 (Intel; releases after v0.1.2
only), Linux amd64, Linux arm64. Not supported: Windows (WSL2 counts as Linux). Do not claim otherwise; on an
unsupported platform explain and stop.

Docker is not needed. PGX is a single runtime process started by `pgx start`
Expand Down