11name : Build for Ubuntu
22
3+ # manually triggered workflow
4+
35on :
6+ workflow_dispatch :
47 push :
5- branches-ignore :
6- - ' translations_*'
7- tags : []
88 pull_request :
9- paths-ignore :
10- - ' **.po'
119
1210
11+ concurrency :
12+ group : ${{ github.workflow }}-${{ github.ref }}
13+ cancel-in-progress : true
14+
15+ permissions :
16+ contents : read
17+
1318jobs :
1419 build :
15- name : Build
20+ name : Ubuntu psql
1621 runs-on : ${{ matrix.os }}
1722
1823 strategy :
1924 fail-fast : false
2025 matrix :
21- psql : [9.6,10,11,12, 13]
22- postgis : [2.5,3]
23- os : [ubuntu-latest]
26+ psql : [13, 14, 15, 16, 17, 18]
27+ postgis : [3]
28+ release : [Debug, Release]
29+ os : [ubuntu-latest, ubuntu-22.04]
30+ compiler : [ gcc-latest, g++-11, clang ]
2431
2532 steps :
26- - uses : actions/checkout@v2
33+ - uses : actions/checkout@v5
2734
28- - name : get postgres version
35+ - name : ' Raise Priority for apt.postgresql.org '
2936 run : |
30- sudo service postgresql start
31- pgver=$(psql --version | grep -Po '(?<=psql \(PostgreSQL\) )[^;]+(?=\.\d \()')
32- echo "PGVER=${pgver}" >> $GITHUB_ENV
33- PGP=5433
34- if [ "${{ matrix.psql }}" == "${pgver}" ]; then PGP=5432; fi
35- echo "PGPORT=${PGP}" >> $GITHUB_ENV
37+ cat << EOF >> ./pgdg.pref
38+ Package: *
39+ Pin: release o=apt.postgresql.org
40+ Pin-Priority: 600
41+ EOF
42+ sudo mv ./pgdg.pref /etc/apt/preferences.d/
43+ sudo apt update
3644
3745 - name : Add PostgreSQL APT repository
3846 run : |
39- sudo apt-get install curl ca-certificates gnupg
40- curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
41- sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ \
42- $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
47+ sudo apt-get -y purge postgresql-*
48+ sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg-testing main ${{ matrix.psql }}" > /etc/apt/sources.list.d/pgdg.list'
49+ curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/apt.postgresql.org.gpg >/dev/null
50+
51+ - name : Install compiler
52+ id : install_cc
53+ uses : rlalik/setup-cpp-compiler@master
54+ with :
55+ compiler : ${{ matrix.compiler }}
4356
4457 - name : Install dependencies
4558 run : |
@@ -54,23 +67,20 @@ jobs:
5467 postgresql-${{ matrix.psql }}-pgrouting \
5568 libpqxx-dev \
5669 postgresql-server-dev-${{ matrix.psql }}
70+ # should be 7 on latest and 6 on 22.04
71+ apt-cache policy libpqxx-dev
5772
58- - name : Configure
73+ - name : Configure compiler
5974 run : |
75+ export CC=/usr/bin/${{ steps.install_cc.outputs.cc }}
76+ export CXX=/usr/bin/${{ steps.install_cc.outputs.cxx }}
6077 export PATH=/usr/lib/postgresql/${{ matrix.psql }}/bin:$PATH
6178 mkdir build
6279 cd build
63- cmake -DPOSTGRESQL_VERSION =${{ matrix.psql }} -DCMAKE_BUILD_TYPE=Release -DWITH_DOC=OFF ..
80+ cmake -DCMAKE_BUILD_TYPE =${{ matrix.release }} ..
6481
6582 - name : Build
6683 run : |
6784 cd build
6885 make -j 4
6986 sudo make install
70-
71- - name : Test
72- if : false
73- run : |
74- sudo service postgresql start
75- sudo -u postgres createdb -p ${PGPORT} ___vrp___test___
76- sudo -u postgres bash ./tools/testers/pg_prove_tests.sh postgres ${PGPORT} Release
0 commit comments