forked from apache/age
-
Notifications
You must be signed in to change notification settings - Fork 1
98 lines (85 loc) · 3.64 KB
/
Copy pathinstallcheck.yaml
File metadata and controls
98 lines (85 loc) · 3.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
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: 75
- 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