Skip to content

Commit 375976f

Browse files
committed
(CI) Updating ubuntu and ubuntu with clang
1 parent ab32ee4 commit 375976f

File tree

2 files changed

+26
-7
lines changed

2 files changed

+26
-7
lines changed

.github/workflows/clang.yml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ jobs:
5252

5353
strategy:
5454
fail-fast: false
55+
matrix:
56+
release: [Debug, Release]
57+
os: [ubuntu-latest, ubuntu-22.04]
5558

5659
steps:
5760
- uses: actions/checkout@v5
@@ -64,12 +67,21 @@ jobs:
6467
echo "PGIS=3" >> $GITHUB_ENV
6568
echo "PGPORT=5432" >> $GITHUB_ENV
6669
70+
- name: 'Raise Priority for apt.postgresql.org'
71+
run: |
72+
cat << EOF >> ./pgdg.pref
73+
Package: *
74+
Pin: release o=apt.postgresql.org
75+
Pin-Priority: 600
76+
EOF
77+
sudo mv ./pgdg.pref /etc/apt/preferences.d/
78+
sudo apt update
79+
6780
- name: Add PostgreSQL APT repository
6881
run: |
69-
sudo apt-get install curl ca-certificates gnupg
70-
curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
71-
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ \
72-
$(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
82+
sudo apt-get purge postgresql-*
83+
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg-testing main ${PGVER}" > /etc/apt/sources.list.d/pgdg.list'
84+
curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/apt.postgresql.org.gpg >/dev/null
7385
7486
- name: Install dependencies
7587
run: |
@@ -84,13 +96,13 @@ jobs:
8496
postgresql-${PGVER}-postgis-${PGIS}-scripts \
8597
postgresql-server-dev-${PGVER}
8698
87-
- name: Configure
99+
- name: Configure for clang
88100
run: |
89101
export PATH=/usr/lib/postgresql/${PGVER}/bin:$PATH
90102
mkdir build
91103
cd build
92104
CXX=clang++ CC=clang cmake -DPOSTGRESQL_VERSION=${PGVER} \
93-
-DCMAKE_BUILD_TYPE=Debug -DBUILD_HTML=OFF -DBUILD_DOXY=OFF \
105+
-DCMAKE_BUILD_TYPE=${{ matrix.release }} -DBUILD_HTML=OFF -DBUILD_DOXY=OFF \
94106
-DUSE_CLANG_TIDY=ON ..
95107
96108
- name: Build

.github/workflows/ubuntu.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ on:
1010
push:
1111
paths:
1212
- '.github/workflows/ubuntu.yml'
13+
- 'src/**'
14+
- 'include/**'
15+
- 'pgtap/**'
16+
- 'tools/testers/**'
17+
- './CMakeLists.txt'
1318

1419
branches-ignore:
1520
- 'gh-pages'
@@ -31,6 +36,7 @@ jobs:
3136
matrix:
3237
psql: [13,14,15,16,17,18]
3338
postgis: [3]
39+
release: [Debug, Release]
3440
os: [ubuntu-latest, ubuntu-22.04]
3541

3642
steps:
@@ -69,7 +75,8 @@ jobs:
6975
export PATH=/usr/lib/postgresql/${{ matrix.psql }}/bin:$PATH
7076
mkdir build
7177
cd build
72-
cmake -DPOSTGRESQL_VERSION=${{ matrix.psql }} -DCMAKE_BUILD_TYPE=Release -DWITH_DOC=OFF ..
78+
cmake -DPOSTGRESQL_VERSION=${{ matrix.psql }} \
79+
-DCMAKE_BUILD_TYPE=${{ matrix.release }} -DBUILD_HTML=OFF -DBUILD_DOXY=OFF ..
7380
7481
- name: Build
7582
run: |

0 commit comments

Comments
 (0)