diff --git a/.github/workflows/build_and_test.yaml b/.github/workflows/build_and_test.yaml index 127bb5d..55d90dd 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 }} @@ -81,26 +82,33 @@ jobs: submodules: 'recursive' path: duckdb - - name: Compute DuckDB SHA + - name: Checkout PostgreSQL code + 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