-
Notifications
You must be signed in to change notification settings - Fork 92
160 lines (142 loc) · 5.88 KB
/
tap-tests.yml
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
name: TAP Tests
on: [push, pull_request]
jobs:
run-babelfish-tap-tests:
env:
OLD_INSTALL_DIR: psql_source
NEW_INSTALL_DIR: psql_target
ENGINE_BRANCH_OLD: BABEL_2_6_STABLE__PG_14_9
EXTENSION_BRANCH_OLD: BABEL_2_6_STABLE
INSTALL_DIR_16: psql16
ENGINE_BRANCH_16: BABEL_4_X_DEV__PG_16_X
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
id: checkout
- name: Install Dependencies
id: install-dependencies
if: always()
uses: ./.github/composite-actions/install-dependencies
- name: Install Tap Tests Dependencies
id: install-tap-dependencies
if: always() && steps.install-dependencies.outcome == 'success'
run: |
export PERL_MM_USE_DEFAULT=1
sudo perl -MCPAN -e 'install IPC::Run'
shell: bash
- name: Install Kerberos Dependencies
id: install-kerberos-dependencies
if: always() && steps.install-tap-dependencies.outcome == 'success'
run: |
cd ~
export DEBIAN_FRONTEND=noninteractive
sudo -E apt-get install krb5-admin-server krb5-kdc krb5-user libkrb5-dev -y -qq
shell: bash
- name: Build Modified Postgres using ${{env.ENGINE_BRANCH_16}}
id: build-modified-postgres-16
if: always() && steps.install-kerberos-dependencies.outcome == 'success'
uses: ./.github/composite-actions/build-modified-postgres
with:
engine_branch: ${{env.ENGINE_BRANCH_16}}
install_dir: ${{env.INSTALL_DIR_16}}
- name: Build Modified Postgres using ${{env.ENGINE_BRANCH_OLD}}
id: build-modified-postgres-old
if: always() && steps.build-modified-postgres-16.outcome == 'success'
uses: ./.github/composite-actions/build-modified-postgres
with:
engine_branch: ${{env.ENGINE_BRANCH_OLD}}
install_dir: ${{env.OLD_INSTALL_DIR}}
- name: Compile ANTLR
id: compile-antlr
if: always() && steps.build-modified-postgres-old.outcome == 'success'
uses: ./.github/composite-actions/compile-antlr
with:
version: 4.9.3
install_dir: ${{env.OLD_INSTALL_DIR}}
- name: Build PostGIS Extension using ${{env.EXTENSION_BRANCH_OLD}}
id: build-postgis-extension-old
if: always() && steps.compile-antlr.outcome == 'success'
run: |
cd ..
export CC='ccache gcc'
export CMAKE_C_COMPILER_LAUNCHER=ccache
export CMAKE_CXX_COMPILER_LAUNCHER=ccache
sudo apt-get install wget
max_retries=20
retries=0
until [ $retries -ge $max_retries ]
do
wget http://postgis.net/stuff/postgis-3.5.0.tar.gz && break
retries=$((retries+1))
done
tar -xvzf postgis-3.5.0.tar.gz
retries1=0
until [ $retries1 -ge $max_retries ]
do
wget https://download.osgeo.org/proj/proj-9.2.1.tar.gz && break
retries1=$((retries1+1))
done
tar -xvzf proj-9.2.1.tar.gz
cd proj-9.2.1
if [ ! -d "build" ]; then
mkdir build
fi
cd build
cmake -DCMAKE_INSTALL_LIBDIR="lib/x86_64-linux-gnu" -DCMAKE_INSTALL_PREFIX="/usr" ..
cmake --build .
sudo cmake --build . --target install
cd ../../postgis-3.5.0
./configure --without-protobuf --without-raster --with-pgconfig=$HOME/psql_source/bin/pg_config
make USE_PGXS=1 PG_CONFIG=~/psql_source/bin/pg_config
sudo make USE_PGXS=1 PG_CONFIG=~/psql_source/bin/pg_config install
shell: bash
- name: Build Extensions using ${{env.EXTENSION_BRANCH_OLD}}
id: build-extensions-old
if: always() && steps.build-postgis-extension-old.outcome == 'success'
uses: ./.github/composite-actions/build-extensions
with:
install_dir: ${{env.OLD_INSTALL_DIR}}
extension_branch: ${{env.EXTENSION_BRANCH_OLD}}
- uses: actions/checkout@v2
- name: Build Modified Postgres using latest version
id: build-modified-postgres-new
if: always() && steps.build-extensions-old.outcome == 'success'
uses: ./.github/composite-actions/build-modified-postgres
with:
tap_tests: 'yes'
install_dir: ${{env.NEW_INSTALL_DIR}}
- name: Compile new ANTLR
id: compile-new-antlr
if: always() && steps.build-modified-postgres-new.outcome == 'success'
uses: ./.github/composite-actions/compile-antlr
with:
install_dir: ${{env.NEW_INSTALL_DIR}}
- name: Build Extensions using latest version
id: build-extensions-new
if: always() && steps.compile-new-antlr.outcome == 'success'
uses: ./.github/composite-actions/build-extensions
with:
install_dir: ${{env.NEW_INSTALL_DIR}}
- name: Build PostGIS Extension
id: build-postgis-extension
if: always() && steps.build-extensions-new.outcome == 'success'
uses: ./.github/composite-actions/build-postgis-extension
with:
install_dir: ${{env.NEW_INSTALL_DIR}}
- name: Run TAP Tests
id: tap
if: always() && steps.build-postgis-extension.outcome == 'success'
timeout-minutes: 5
run: |
export PG_CONFIG=~/${{env.NEW_INSTALL_DIR}}/bin/pg_config
export PATH=/opt/mssql-tools/bin:$PATH
export oldinstall=$HOME/${{env.OLD_INSTALL_DIR}}
export installdir16=$HOME/${{env.INSTALL_DIR_16}}
cd contrib/babelfishpg_tds
make installcheck PROVE_TESTS="t/001_tdspasswd.pl t/002_tdskerberos.pl t/003_bbfextnotloaded.pl t/004_bbfdumprestore.pl"
- name: Upload Logs
if: always() && steps.tap.outcome == 'failure'
uses: actions/upload-artifact@v4
with:
name: tap_tests_logs
path: contrib/babelfishpg_tds/test/tmp_check