support openCypher-like relationsiop-type edge alternation #2833
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: Build / Regression | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| pull_request: | |
| branches: [ "master" ] | |
| jobs: | |
| build: | |
| # Pinned (not ubuntu-latest) so the Bison version stays fixed at 3.8.x. | |
| # The Cypher GLR grammar pins exact conflict counts via %expect / %expect-rr | |
| # in src/backend/parser/cypher_gram.y, and Bison treats %expect as exact-match: | |
| # a different Bison version can report different counts and break the build. | |
| # Freezing the runner image freezes Bison; bump both together, intentionally. | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Get latest commit id of PostgreSQL 18 | |
| run: | | |
| echo "PG_COMMIT_HASH=$(git ls-remote https://git.postgresql.org/git/postgresql.git refs/heads/REL_18_STABLE | awk '{print $1}')" >> $GITHUB_ENV | |
| - name: Cache PostgreSQL 18 | |
| uses: actions/cache@v3 | |
| id: pg18cache | |
| with: | |
| path: ~/pg18 | |
| key: ${{ runner.os }}-v1-pg18-${{ env.PG_COMMIT_HASH }} | |
| - name: Install necessary dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y build-essential libreadline-dev zlib1g-dev flex bison | |
| - name: Verify Bison version (grammar conflict counts are pinned) | |
| run: | | |
| ver=$(bison --version | awk 'NR==1 {print $NF}') | |
| if [ -z "$ver" ]; then | |
| echo "::error::Could not determine Bison version from 'bison --version'." | |
| echo "::error::Expected the first line to end with a version (e.g. '... 3.8.2')." | |
| exit 1 | |
| fi | |
| echo "bison $ver" | |
| case "$ver" in | |
| 3.8.*) ;; | |
| *) | |
| echo "::error::Bison $ver != 3.8.x. The Cypher GLR grammar pins exact" | |
| echo "::error::%expect / %expect-rr conflict counts in src/backend/parser/cypher_gram.y." | |
| echo "::error::A new Bison version may report different counts. Re-run bison locally," | |
| echo "::error::update the %expect/%expect-rr numbers (and the comment block), then bump" | |
| echo "::error::the pinned runner image and this guard together." | |
| exit 1 | |
| ;; | |
| esac | |
| - name: Install PostgreSQL 18 and some extensions | |
| if: steps.pg18cache.outputs.cache-hit != 'true' | |
| run: | | |
| git clone --depth 1 --branch REL_18_STABLE https://git.postgresql.org/git/postgresql.git ~/pg18source | |
| cd ~/pg18source | |
| ./configure --prefix=$HOME/pg18 CFLAGS="-std=gnu99 -ggdb -O0" --enable-cassert | |
| make install -j$(nproc) > /dev/null | |
| cd contrib | |
| cd fuzzystrmatch | |
| make PG_CONFIG=$HOME/pg18/bin/pg_config install -j$(nproc) > /dev/null | |
| cd ../pg_trgm | |
| make PG_CONFIG=$HOME/pg18/bin/pg_config install -j$(nproc) > /dev/null | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 100 | |
| - name: Build AGE | |
| id: build | |
| run: | | |
| make PG_CONFIG=$HOME/pg18/bin/pg_config COPT=-Werror install -j$(nproc) | |
| - name: Pull and build pgvector | |
| id: pgvector | |
| run: | | |
| git clone https://github.com/pgvector/pgvector.git | |
| cd pgvector | |
| make PG_CONFIG=$HOME/pg18/bin/pg_config install -j$(nproc) > /dev/null | |
| - name: Regression tests | |
| id: regression_tests | |
| run: | | |
| make PG_CONFIG=$HOME/pg18/bin/pg_config installcheck EXTRA_TESTS="pgvector fuzzystrmatch pg_trgm" | |
| continue-on-error: true | |
| - name: Dump regression test errors | |
| if: steps.regression_tests.outcome != 'success' | |
| run: | | |
| echo "Dump section begin." | |
| cat $HOME/work/age/age/regress/regression.diffs | |
| echo "Dump section end." | |
| exit 1 |