-
-
Notifications
You must be signed in to change notification settings - Fork 39
71 lines (59 loc) · 1.89 KB
/
centos.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
name: Build for Centos
# manually triggered workflow
# or when this file changes
on:
workflow_dispatch:
push:
paths:
- '.github/workflows/centos.yml'
- 'src/**'
- 'include/**'
- 'pgtap/**'
- 'tools/testers/**'
- './CMakeLists.txt'
branches-ignore:
- 'gh-pages'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
build:
name: centos-7-gcc-4.8.5
runs-on:
- self-hosted
- centos-7 gcc-4.8.5
steps:
- uses: actions/checkout@v3
- name: get postgres version
run: |
echo "PGVER=15" >> $GITHUB_ENV
echo "PGPORT=5432" >> $GITHUB_ENV
- name: Configure for gcc
run: |
mkdir build
cd build
export PATH=${PATH}:/usr/pgsql-${PGVER}/bin
cmake3 -DCMAKE_BUILD_TYPE=Release -DBOOST_ROOT:PATH="/opt/boost" ..
- name: Build
run: |
cd build
make -j 4
- name: Install
run: |
cd build
sudo make install
- name: Test
run: |
sudo systemctl restart postgresql-15
export PGPORT=5432
export PG_RUNNER_USER=`whoami`
sudo -u postgres psql -p ${PGPORT} -c "DROP DATABASE IF EXISTS ___pgr___test___;"
sudo -u postgres psql -p ${PGPORT} -c "DROP DATABASE IF EXISTS \"${PG_RUNNER_USER}\";"
sudo -u postgres psql -p ${PGPORT} -c "DROP ROLE IF EXISTS \"${PG_RUNNER_USER}\";"
sudo -u postgres psql -p ${PGPORT} -c "CREATE ROLE \"${PG_RUNNER_USER}\" WITH LOGIN SUPERUSER;"
sudo -u postgres psql -p ${PGPORT} -c "CREATE DATABASE \"${PG_RUNNER_USER}\";"
psql -c "CREATE DATABASE ___pgr___test___;"
./tools/testers/pg_prove_tests.sh ${PG_RUNNER_USER} ${PGPORT} Release
psql -c "DROP DATABASE IF EXISTS ___pgr___test___;"