diff --git a/.github/workflows/build_and_test.yaml b/.github/workflows/build_and_test.yaml index 127bb5d3..ad4638e2 100644 --- a/.github/workflows/build_and_test.yaml +++ b/.github/workflows/build_and_test.yaml @@ -48,12 +48,13 @@ jobs: run: ruff check --output-format=github . - name: Run ruff format run: ruff format --diff + build-and-test: name: 'Build and test' strategy: fail-fast: false matrix: - os: [ubuntu-latest] + os: [ubuntu-24.04] version: [REL_16_STABLE, REL_17_STABLE] runs-on: ${{ matrix.os }} @@ -66,7 +67,7 @@ jobs: sudo apt-get update -qq sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9 sudo apt-get install -y build-essential libreadline-dev zlib1g-dev flex bison libxml2-dev libxslt-dev \ - libssl-dev libxml2-utils xsltproc pkg-config libc++-dev libc++abi-dev libglib2.0-dev libtinfo5 cmake \ + libssl-dev libxml2-utils xsltproc pkg-config libc++-dev libc++abi-dev libglib2.0-dev libtinfo6 cmake \ libstdc++-12-dev echo "${PWD}/postgres/inst/bin:$PATH'" > $GITHUB_PATH @@ -81,26 +82,34 @@ jobs: submodules: 'recursive' path: duckdb - - name: Compute DuckDB SHA + - name: Checkout PostgreSQL code + run: | + rm -rf postgres + git clone --branch ${{ matrix.version }} --single-branch --depth 1 https://github.com/postgres/postgres.git + + - name: Compute Version SHAs id: versions run: | pushd duckdb DUCKDB_SHA=`git ls-tree HEAD third_party/duckdb --format='%(objectname)'` echo "duckdb_sha=${DUCKDB_SHA}" >> "$GITHUB_OUTPUT" echo "Got DUCKDB_SHA='${DUCKDB_SHA}'" + popd + pushd postgres + POSTGRES_SHA=`git ls-tree HEAD --format='%(objectname)'` + echo "postgres_sha=${POSTGRES_SHA}" >> "$GITHUB_OUTPUT" + echo "Got POSTGRES_SHA='${POSTGRES_SHA}'" - name: Setup PG build cache id: cache-pg-build uses: actions/cache@v4 with: path: postgres/inst - key: pg-build-${{ matrix.version }} + key: pg-build-${{ steps.versions.outputs.postgres_sha }} - - name: Checkout and build PostgreSQL code + - name: Build PostgreSQL code if: steps.cache-pg-build.outputs.cache-hit != 'true' run: | - rm -rf postgres - git clone --branch ${{ matrix.version }} --single-branch --depth 1 https://github.com/postgres/postgres.git pushd postgres git branch ./configure --prefix=$PWD/inst/ --enable-cassert --enable-debug --with-openssl --with-icu --with-libxml