Stabilize regression tests against non-deterministic Heap Fetches #193
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Standard extension's make check | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| test: | |
| name: PG ${{ matrix.pg_version }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| pg_version: [17, 18] | |
| steps: | |
| - name: Checkout extension code | |
| uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| build-essential \ | |
| libreadline-dev \ | |
| zlib1g-dev \ | |
| flex \ | |
| bison \ | |
| libxml2-dev \ | |
| libxslt-dev \ | |
| libssl-dev \ | |
| libxml2-utils \ | |
| xsltproc \ | |
| ccache | |
| - name: Get PostgreSQL branch HEAD SHA | |
| id: pg-sha | |
| run: | | |
| if [ "${{ matrix.pg_version }}" = "master" ]; then | |
| BRANCH="master" | |
| else | |
| BRANCH="REL_${{ matrix.pg_version }}_STABLE" | |
| fi | |
| SHA=$(git ls-remote https://github.com/postgres/postgres.git refs/heads/$BRANCH | cut -f1) | |
| echo "sha=$SHA" >> $GITHUB_OUTPUT | |
| - name: Cache PostgreSQL build | |
| uses: actions/cache@v4 | |
| id: pg-cache | |
| with: | |
| path: ~/postgresql | |
| key: ${{ runner.os }}-pg-${{ matrix.pg_version }}-${{ steps.pg-sha.outputs.sha }} | |
| - name: Clone PostgreSQL | |
| if: steps.pg-cache.outputs.cache-hit != 'true' | |
| run: | | |
| cd ~ | |
| if [ "${{ matrix.pg_version }}" = "master" ]; then | |
| git clone --depth 1 --branch master https://github.com/postgres/postgres.git postgresql | |
| else | |
| git clone --depth 1 --branch REL_${{ matrix.pg_version }}_STABLE https://github.com/postgres/postgres.git postgresql | |
| fi | |
| - name: Build PostgreSQL | |
| if: steps.pg-cache.outputs.cache-hit != 'true' | |
| run: | | |
| cd ~/postgresql | |
| ./configure --prefix=$HOME/postgresql/inst --enable-debug --enable-cassert --enable-depend | |
| make -j$(nproc) | |
| make install | |
| - name: Add PostgreSQL to PATH | |
| run: | | |
| echo "$HOME/postgresql/inst/bin" >> $GITHUB_PATH | |
| echo "PG_CONFIG=$HOME/postgresql/inst/bin/pg_config" >> $GITHUB_ENV | |
| - name: Build extension | |
| run: | | |
| export PATH="$HOME/postgresql/inst/bin:$PATH" | |
| make USE_PGXS=1 clean | |
| make USE_PGXS=1 | |
| - name: Run regression tests | |
| run: | | |
| export PATH="$HOME/postgresql/inst/bin:$PATH" | |
| make USE_PGXS=1 check | |
| - name: Show regression diffs on failure | |
| if: failure() | |
| run: | | |
| if [ -f regression.diffs ]; then | |
| cat regression.diffs | |
| fi | |
| - name: Upload test artifacts on failure | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: regression-diffs-pg${{ matrix.pg_version }} | |
| path: | | |
| regression.diffs | |
| regression.out | |
| results/ | |
| if-no-files-found: ignore |