-
Notifications
You must be signed in to change notification settings - Fork 47
65 lines (57 loc) · 1.65 KB
/
build-nix.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
name: Build and Run Linux Tests
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
pg-version:
- 9.3
- 9.4
- 9.5
- 9.6
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
steps:
- uses: actions/checkout@v3
- name: Set up Postgresql and Dependencies ${{ matrix.pg-version }}
env:
PG_VERSION: ${{ matrix.pg-version }}
run: |
sudo apt-get purge -y '^postgres.*' '^libpq.*'
sudo apt-get install -y wget gnupg
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update -y -qq --fix-missing
sudo apt-get install -y \
gcc \
make \
build-essential \
postgresql-$PG_VERSION \
postgresql-server-dev-$PG_VERSION
sudo setfacl -Rm u:postgres:rwx,d:u:runner:rwx $HOME
- name: Start Postgres
env:
PG_VERSION: ${{ matrix.pg-version }}
run: |
sudo service postgresql start
sudo pg_lsclusters
sudo -u postgres psql -c 'SELECT version()'
- name: Build
run: |
make
sudo make install
- name: Test
run: |
sudo -u postgres make installcheck
- name: Show Test Result
run: |
cat ./regression.diffs
if: ${{ failure() }}