forked from jconway/plr
-
Notifications
You must be signed in to change notification settings - Fork 27
126 lines (117 loc) · 4.74 KB
/
schedule.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
# This is a basic workflow to help you get started with Actions
name: daily plr
run-name: daily plr - ${{ github.event.head_commit.message }}
on:
push:
pull_request:
workflow_dispatch:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '30 1 * * *'
jobs:
master:
# SEEN JUL 2024
# Ubuntu 22.04 ubuntu-latest
# https://github.com/actions/runner-images
# jammy (22.04, LTS)
# https://wiki.postgresql.org/wiki/Apt
# https://apt.postgresql.org/pub/repos/apt/dists/
runs-on: ubuntu-latest
steps:
- name: Echo site details
run: echo building master
- name: Checkout code
uses: actions/checkout@v4
- name: checkout postgres
run: |
sudo apt-get update -qq
sudo apt-get install -qq r-base-dev acl bison flex libssl-dev
sudo R --version
sudo /etc/init.d/postgresql stop
sudo apt-get remove --purge postgresql\*
sudo rm -rf /etc/postgresql /var/lib/postgresql
git clone --depth=1 https://github.com/postgres/postgres.git
pushd postgres
./configure
make
sudo make install
export PATH=/usr/local/pgsql/bin:$PATH
initdb -D data
pg_ctl -D data -l logfile start
popd
- name: Script
run: |
export USE_PGXS=1
export PATH=/usr/local/pgsql/bin:$PATH
SHLIB_LINK=-lgcov PG_CPPFLAGS="-fprofile-arcs -ftest-coverage -O0" make
# USE_PGXS=1 is not required in Travis, and it is required in Github Actions
sudo USE_PGXS=1 PATH=/usr/local/pgsql/bin:$PATH make install
psql --version
make installcheck || (cat regression.diffs && false)
env:
USE_PGXS: 1
REL_17_:
# SEEN JUL 2024
# Ubuntu 22.04 ubuntu-latest
# https://github.com/actions/runner-images
# jammy (22.04, LTS)
# https://wiki.postgresql.org/wiki/Apt
# https://apt.postgresql.org/pub/repos/apt/dists/
runs-on: ubuntu-latest
steps:
- name: Echo site details
run: echo building master
- name: Checkout code
uses: actions/checkout@v4
- name: checkout postgres
run: |
sudo apt-get update -qq
sudo apt-get install -qq r-base-dev acl bison flex libssl-dev
sudo R --version
sudo /etc/init.d/postgresql stop
sudo apt-get remove --purge postgresql\*
sudo rm -rf /etc/postgresql /var/lib/postgresql
export RET=$(git ls-remote --tags https://github.com/postgres/postgres.git | cut -c 52- | grep -c 'REL_17_[0-9]')
if [ "${RET}" -gt "0" ]
then
echo -n "Release(s) are found. Taking the last Release . . . "
export GITTAG=$(git ls-remote --tags https://github.com/postgres/postgres.git | cut -c 52- | grep -e 'REL_17_[0-9]' | tail -n 1)
else
echo "Release(s) are not found. Trying Release Candidates."
export RET=$(git ls-remote --tags https://github.com/postgres/postgres.git | cut -c 52- | grep -c 'REL_17_RC[0-9]')
if [ "${RET}" -gt "0" ]
then
echo -n "Release Candidate(s) are found. Taking the last Release Candidate . . . "
export GITTAG=$(git ls-remote --tags https://github.com/postgres/postgres.git | cut -c 52- | grep -e 'REL_17_RC[0-9]' | tail -n 1)
else
echo "Release Candidate(s) are not found. Trying Betas."
export RET=$(git ls-remote --tags https://github.com/postgres/postgres.git | cut -c 52- | grep -c 'REL_17_BETA[0-9]')
if [ "${RET}" -gt "0" ]
then
echo -n "Beta(s) are found. Taking the last Beta . . . "
export GITTAG=$(git ls-remote --tags https://github.com/postgres/postgres.git | cut -c 52- | grep -e 'REL_17_BETA[0-9]' | tail -n 1)
else
echo "Beta(s) are not found."
fi
fi
fi
git clone --branch $GITTAG --depth=1 https://github.com/postgres/postgres.git
pushd postgres
./configure
make
sudo make install
export PATH=/usr/local/pgsql/bin:$PATH
initdb -D data
pg_ctl -D data -l logfile start
popd
- name: Script
run: |
export USE_PGXS=1
export PATH=/usr/local/pgsql/bin:$PATH
SHLIB_LINK=-lgcov PG_CPPFLAGS="-fprofile-arcs -ftest-coverage -O0" make
# USE_PGXS=1 is not required in Travis, and it is required in Github Actions
sudo USE_PGXS=1 PATH=/usr/local/pgsql/bin:$PATH make install
psql --version
make installcheck || (cat regression.diffs && false)
env:
USE_PGXS: 1