mirror of
https://github.com/neondatabase/neon.git
synced 2026-05-18 05:30:37 +00:00
Separate Postgres build dir from installation dir.
Previously, Postgres was built in 'tmp_install/build', and installed into 'tmp_install'. In the CI, the 'build' directory was included in the final neon.tar.zst artifact that includes all the necessary binaries. That was unnecessary, the intermediate build results are not needed, only the final binaries. Separate the build directory so that the Postgres build happens in 'build', and it is installed into 'tmp_install'. That makes the final neon.tar.zst artifact smaller. The changes to the python tests are needed to find the 'pg_regress' binary in the installation directory. Previously, they would use the 'pg_regress' binary from the build directory, not the final installation location.
This commit is contained in:
18
.github/actions/run-python-test-set/action.yml
vendored
18
.github/actions/run-python-test-set/action.yml
vendored
@@ -31,6 +31,13 @@ inputs:
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Checkout
|
||||
if: inputs.needs_postgres_source == 'true'
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Get Neon artifact for restoration
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
@@ -44,12 +51,11 @@ runs:
|
||||
tar -xf ./neon-artifact/neon.tar.zst -C /tmp/neon/
|
||||
rm -rf ./neon-artifact/
|
||||
|
||||
- name: Checkout
|
||||
if: inputs.needs_postgres_source == 'true'
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
fetch-depth: 1
|
||||
# Restore the parts of the 'build' directory that were included in the
|
||||
# tarball. This includes the regression test modules in
|
||||
# src/test/regress/*.so.
|
||||
mkdir -p build/
|
||||
cp -a /tmp/neon/pg_build/* build/
|
||||
|
||||
- name: Cache poetry deps
|
||||
id: cache_poetry
|
||||
|
||||
11
.github/workflows/build_and_test.yml
vendored
11
.github/workflows/build_and_test.yml
vendored
@@ -88,7 +88,9 @@ jobs:
|
||||
id: cache_pg
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: tmp_install/
|
||||
path: |
|
||||
tmp_install/
|
||||
build/src/test/regress/*.so
|
||||
key: v1-${{ runner.os }}-${{ matrix.build_type }}-pg-${{ steps.pg_ver.outputs.pg_rev }}-${{ hashFiles('Makefile') }}
|
||||
|
||||
- name: Build postgres
|
||||
@@ -143,7 +145,12 @@ jobs:
|
||||
fi
|
||||
|
||||
- name: Install postgres binaries
|
||||
run: cp -a tmp_install /tmp/neon/pg_install
|
||||
run: |
|
||||
cp -a tmp_install /tmp/neon/pg_install
|
||||
|
||||
# Include modules needed by the Postgres regression tests
|
||||
mkdir -p /tmp/neon/pg_build/src/test/regress
|
||||
cp -a build/src/test/regress/*.so /tmp/neon/pg_build/src/test/regress
|
||||
|
||||
- name: Prepare neon artifact
|
||||
run: ZSTD_NBTHREADS=0 tar -C /tmp/neon/ -cf ./neon.tar.zst --zstd .
|
||||
|
||||
Reference in New Issue
Block a user