Skip to content

Commit 013c8a4

Browse files
committed
ga build
1 parent 1649ccc commit 013c8a4

File tree

1 file changed

+34
-6
lines changed

1 file changed

+34
-6
lines changed

.github/workflows/build.yml

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,36 @@ jobs:
6868
restore-keys: |
6969
${{ runner.os }}-pgrx-pg${{ matrix.pg-version }}-
7070
71-
- name: Install pgrx
71+
- name: Debug pg_config (macOS)
72+
if: runner.os == 'macOS'
73+
run: |
74+
which pg_config || echo "pg_config not found"
75+
find /opt/homebrew -name pg_config | grep pg_config || echo "pg_config not found in homebrew"
76+
brew info postgresql@${{ matrix.pg-version }}
77+
78+
- name: Install pgrx (macOS)
79+
if: runner.os == 'macOS'
7280
run: |
7381
cargo install --locked cargo-pgrx --version 0.13.1 || true
74-
# Initialize pgrx with the correct syntax for specifying PostgreSQL version
75-
cargo pgrx init --pg${{ matrix.pg-version }} $(which pg_config)
82+
PG_CONFIG_PATH=$(find /opt/homebrew -name pg_config | grep "@${{ matrix.pg-version }}" | head -n 1)
83+
echo "Found pg_config at: $PG_CONFIG_PATH"
84+
85+
# First do a clean init
86+
cargo pgrx init --control-file
87+
88+
# Then explicitly register PostgreSQL 15
89+
cargo pgrx init --pg${{ matrix.pg-version }} $PG_CONFIG_PATH
90+
env:
91+
CARGO_HTTP_TIMEOUT: 300
92+
PKG_CONFIG_PATH: /opt/homebrew/opt/icu4c/lib/pkgconfig:/opt/homebrew/opt/postgresql@${{ matrix.pg-version }}/lib/pkgconfig
93+
94+
- name: Install pgrx (Linux/Windows)
95+
if: runner.os != 'macOS'
96+
run: |
97+
cargo install --locked cargo-pgrx --version 0.13.1 || true
98+
cargo pgrx init
7699
env:
77100
CARGO_HTTP_TIMEOUT: 300
78-
PKG_CONFIG_PATH: ${{ runner.os == 'macOS' && '/opt/homebrew/opt/icu4c/lib/pkgconfig:/opt/homebrew/opt/postgresql@15/lib/pkgconfig' || '' }}
79101

80102
- name: Lint
81103
run: |
@@ -87,8 +109,14 @@ jobs:
87109
run: |
88110
cargo pgrx package --pg-config "C:\Program Files\PostgreSQL\${{ matrix.pg-version }}\bin\pg_config.exe" --target x86_64-pc-windows-msvc
89111
90-
- name: Build Extension (Other OS)
91-
if: runner.os != 'Windows'
112+
- name: Build Extension (macOS)
113+
if: runner.os == 'macOS'
114+
run: |
115+
PG_CONFIG_PATH=$(find /opt/homebrew -name pg_config | grep "@${{ matrix.pg-version }}" | head -n 1)
116+
cargo pgrx package --pg-config $PG_CONFIG_PATH
117+
118+
- name: Build Extension (Linux)
119+
if: runner.os == 'Linux'
92120
run: cargo pgrx package --pg-config $(which pg_config)
93121

94122
- name: Upload Extension Artifact (Linux)

0 commit comments

Comments
 (0)