Skip to content

Commit

Permalink
Checkout postgres directly
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeSiFive committed Jan 5, 2024
1 parent fd03d5f commit b6d4bf9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,15 @@ jobs:

- name: Vendor remote cache deps
run: cd rust/rsc && cargo vendor --locked

- name: Checkout postgres
run: git clone https://github.com/postgres/postgres.git && git checkout origin/REL_16_1

- name: Build postgres
run: ./configure && make install

- name: Run Remote Cache Tests
run: POSTGRES_DIR=/etc/postgresql/14 make remoteCacheTests
run: POSTGRES_DIR=/usr/local/pgsql make remoteCacheTests

- name: Check Wake Formatting
run: ./bin/wake-format.native-cpp14-release --auto --dry-run
Expand Down
13 changes: 4 additions & 9 deletions rust/rsc/postgres-tests.wake
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,10 @@ export target testPostgres Unit =
require Pass postgresDir = match (getenv "POSTGRES_DIR")
Some dir -> Pass "{dir}/bin"
None ->
require Some osPath = getenv "PATH"
else failWithError "could not find postgres"
require Some postgresPath = whichInEnvPath "postgres"
else failWithError "could not find postges on path"

def postgresPath = whichIn osPath "postgres"

if postgresPath ==* "postgres" then
failWithError "could not find postgres on path"
else
Pass (dirname postgresPath)
Pass (dirname postgresPath)

require Pass cargoPath = findCargoPath Unit

Expand Down Expand Up @@ -71,7 +66,7 @@ export target testPostgres Unit =

# Jobs require that we write stdin out to a file in order to
# pipe it in
require Pass scriptPath = write ".build/postgres-cargo.sh" script
require Pass _scriptPath = write ".build/postgres-cargo.sh" script
require Pass pgJsonPath = source "{@here}/postgres-cmd-spec.json"

def emitVendorWarning status =
Expand Down

0 comments on commit b6d4bf9

Please sign in to comment.