-
Notifications
You must be signed in to change notification settings - Fork 94
130 lines (113 loc) · 4.74 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
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
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_OLD}}
id: build-modified-postgres-old
if: always() && steps.install-kerberos-dependencies.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:
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 ..
sudo apt-get install wget
wget http://postgis.net/stuff/postgis-3.3.3dev.tar.gz
tar -xvzf postgis-3.3.3dev.tar.gz
wget https://download.osgeo.org/proj/proj-4.9.1.tar.gz
tar -xvzf proj-4.9.1.tar.gz
cd proj-4.9.1
if [ ! -d "build" ]; then
mkdir build
fi
cd build
cmake ..
cmake --build .
sudo cmake --build . --target install
cd ../../postgis-3.3.3dev
./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: Copy ANTLR
run: cp "/usr/local/lib/libantlr4-runtime.so.4.9.3" ~/${{env.NEW_INSTALL_DIR}}/lib/
- name: Build Extensions using latest version
id: build-extensions-new
if: always() && steps.build-modified-postgres-new.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}}
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@v2
with:
name: tap_tests_logs
path: contrib/babelfishpg_tds/test/tmp_check