Skip to content

Commit 6c9cc1a

Browse files
committed
(CI) Adjusting to build changes
1 parent 231bdac commit 6c9cc1a

File tree

9 files changed

+171
-464
lines changed

9 files changed

+171
-464
lines changed

.github/workflows/clang.yml

Lines changed: 21 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ name: Build for Ubuntu with clang
88
# - On request
99
#
1010
# using
11-
# - the postgres installed version
11+
# - postgres installed version on actions
1212

1313
on:
1414
workflow_dispatch:
@@ -35,7 +35,6 @@ permissions:
3535
env:
3636
postgis: 3
3737
os: ubuntu-latest
38-
vroom: 1.12.0
3938

4039
jobs:
4140
build:
@@ -53,28 +52,33 @@ jobs:
5352
- name: Get postgres version
5453
run: |
5554
sudo service postgresql start
56-
pgver=$(psql --version | grep -Po '(?<=psql \(PostgreSQL\) )[^;]+(?=\.\d+ \()')
57-
echo "PGVER=${pgver}" >> $GITHUB_ENV
55+
PGVER=$(psql --version | grep -Po '(?<=psql \(PostgreSQL\) )[^;]+(?=\.\d+ \()')
56+
echo "PGVER=${PGVER}" >> $GITHUB_ENV
5857
echo "PGPORT=5432" >> $GITHUB_ENV
59-
echo "PGBIN=/usr/lib/postgresql/${pgver}/bin" >> $GITHUB_ENV
60-
echo "PGINC=/usr/include/postgresql/${pgver}/server" >> $GITHUB_ENV
58+
echo "PGBIN=/usr/lib/postgresql/${PGVER}/bin" >> $GITHUB_ENV
59+
echo "PGINC=/usr/include/postgresql/${PGVER}/server" >> $GITHUB_ENV
60+
61+
- name: 'Raise Priority for apt.postgresql.org'
62+
run: |
63+
cat << EOF >> ./pgdg.pref
64+
Package: *
65+
Pin: release o=apt.postgresql.org
66+
Pin-Priority: 600
67+
EOF
68+
sudo mv ./pgdg.pref /etc/apt/preferences.d/
69+
sudo apt update
6170
6271
- name: Add PostgreSQL APT repository
6372
run: |
64-
sudo apt-get install curl ca-certificates gnupg
65-
curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
66-
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ \
67-
$(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
73+
sudo apt-get purge postgresql-*
74+
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'
75+
curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/apt.postgresql.org.gpg >/dev/null
6876
69-
- name: Install python
70-
uses: actions/setup-python@v5
71-
with:
72-
python-version: '3.x'
7377
7478
- name: Install dependencies
7579
run: |
7680
sudo apt-get update
77-
# vrpRouting dependencies
81+
7882
sudo apt-get install -y \
7983
clang \
8084
libtap-parser-sourcehandler-pgtap-perl \
@@ -83,48 +87,15 @@ jobs:
8387
postgresql-${PGVER}-postgis-${{ env.postgis }} \
8488
postgresql-${PGVER}-postgis-${{ env.postgis }}-scripts \
8589
postgresql-${PGVER}-pgrouting \
86-
postgresql-server-dev-${PGVER} \
87-
postgresql-plpython3-${PGVER}
88-
# vroom dependencies
89-
sudo apt-get install libssl-dev libasio-dev libglpk-dev
90-
91-
- name: Install Google OR-Tools dependencies
92-
run: |
93-
sudo pip install --root=/ ortools
94-
95-
- name: Cache VROOM
96-
id: cache-vroom
97-
uses: actions/cache@v4
98-
env:
99-
cache-name: vroom
100-
with:
101-
path: vroom-${{ env.vroom }}
102-
key: ${{ env.os }}-${{ env.cache-name }}-${{ env.vroom }}
103-
104-
- name: Checkout VROOM
105-
if: steps.cache-vroom.outputs.cache-hit != 'true'
106-
uses: actions/checkout@v4
107-
with:
108-
path: vroom-${{ env.vroom }}
109-
repository: VROOM-Project/vroom
110-
ref: "v${{ env.vroom }}"
111-
submodules: true
112-
113-
- name: Build VROOM
114-
if: steps.cache-vroom.outputs.cache-hit != 'true'
115-
run: |
116-
cd vroom-${{ env.vroom }}/src
117-
USE_ROUTING=false make shared
90+
postgresql-server-dev-${PGVER}
11891
11992
- name: Configure
12093
run: |
12194
export PATH=/usr/lib/postgresql/${PGVER}/bin:$PATH
122-
VROOM=$(pwd)/vroom-${{ env.vroom }}
12395
mkdir build
12496
cd build
12597
CXX=clang++ CC=clang cmake -DCMAKE_BUILD_TYPE=${{ matrix.release }} \
126-
-DPostgreSQL_INCLUDE_DIR=${PGINC} -DPOSTGRESQL_BIN=${PGBIN} \
127-
-DVROOM_INSTALL_PATH=${VROOM} ..
98+
-DPostgreSQL_INCLUDE_DIR=${PGINC} -DPOSTGRESQL_BIN=${PGBIN} ..
12899
129100
- name: Build
130101
run: |
@@ -152,4 +123,3 @@ jobs:
152123
sudo service postgresql start
153124
psql -c "CREATE DATABASE ___vrp___test___;"
154125
bash ./tools/testers/pg_prove_tests.sh -U ${PG_RUNNER_USER} -p ${PGPORT} -d ___vrp___test___
155-

.github/workflows/documentation.yml

Lines changed: 12 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,15 @@ on:
2020
- 'locale/**'
2121
- 'CMakeLists.txt'
2222

23-
branches-ignore:
24-
- 'gh-pages'
25-
2623
tags: []
2724

28-
29-
3025
pull_request:
3126
paths:
3227
- '.github/workflows/documentation.yml'
3328
- 'doc/**'
3429
- 'locale/**'
3530
- 'CMakeLists.txt'
3631

37-
branches-ignore:
38-
- 'gh-pages'
39-
4032
concurrency:
4133
group: ${{ github.workflow }}-${{ github.ref }}
4234
cancel-in-progress: true
@@ -48,7 +40,6 @@ env:
4840
postgis: 3
4941
release: Release
5042
os: ubuntu-latest
51-
vroom: 1.12.0
5243

5344
jobs:
5445
check-documentation:
@@ -74,7 +65,7 @@ jobs:
7465
if [[ "${{ matrix.language }}" == "zh_Hans" && "${{ github.repository_owner }}" != "pgRouting" ]]; then echo "PROCESS=false" >> $GITHUB_ENV; exit 0; fi
7566
7667
# when this file changes all languages are tested
77-
if git diff --name-only HEAD^ HEAD | grep -q '.github/workflows/doc-check.yml' ; then echo "PROCESS=true" >> $GITHUB_ENV; exit 0; fi
68+
if git diff --name-only HEAD^ HEAD | grep -q '.github/workflows/documentation.yml' ; then echo "PROCESS=true" >> $GITHUB_ENV; exit 0; fi
7869
7970
# when there is a change on the way the build is done all languages are tested
8071
if git diff --name-only HEAD^ HEAD | grep -q '^CMakeLists.txt' ; then echo "PROCESS=true" >> $GITHUB_ENV; exit 0; fi
@@ -88,24 +79,10 @@ jobs:
8879
if: env.PROCESS == 'true'
8980
run: |
9081
sudo service postgresql start
91-
pgver=$(psql --version | grep -Po '(?<=psql \(PostgreSQL\) )[^;]+(?=\.\d+ \()')
92-
echo "PGVER=${pgver}" >> $GITHUB_ENV
82+
PGVER=$(psql --version | grep -Po '(?<=psql \(PostgreSQL\) )[^;]+(?=\.\d+ \()')
83+
echo "PGVER=${PGVER}" >> $GITHUB_ENV
9384
echo "PGPORT=5432" >> $GITHUB_ENV
9485
95-
- name: Add PostgreSQL APT repository
96-
if: env.PROCESS == 'true'
97-
run: |
98-
sudo apt-get install curl ca-certificates gnupg
99-
curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
100-
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ \
101-
$(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
102-
103-
- name: Install python
104-
if: env.PROCESS == 'true'
105-
uses: actions/setup-python@v5
106-
with:
107-
python-version: '3.x'
108-
10986
- name: Install dependencies
11087
if: env.PROCESS == 'true'
11188
run: |
@@ -114,49 +91,23 @@ jobs:
11491
sudo apt-get install -y \
11592
postgresql-${PGVER} \
11693
postgresql-server-dev-${PGVER}
117-
# vroom dependencies
118-
sudo apt-get install libssl-dev libasio-dev libglpk-dev
119-
# documentation dependencies
120-
sudo apt-get install -y graphviz doxygen
121-
pip install -r requirements.txt
122-
python -m pip install --upgrade pip
123-
pip install -r requirements.txt
124-
pip list
125-
126-
- name: Cache VROOM
127-
id: cache-vroom
128-
if: env.PROCESS == 'true'
129-
uses: actions/cache@v4
130-
env:
131-
cache-name: vroom
132-
with:
133-
path: vroom-${{ env.vroom }}
134-
key: ${{ env.os }}-${{ env.cache-name }}-${{ env.vroom }}
13594
136-
- name: Checkout VROOM
137-
if: env.PROCESS == 'true' && steps.cache-vroom.outputs.cache-hit != 'true'
138-
uses: actions/checkout@v4
139-
with:
140-
path: vroom-${{ env.vroom }}
141-
repository: VROOM-Project/vroom
142-
ref: "v${{ env.vroom }}"
143-
submodules: true
144-
145-
- name: Build VROOM
146-
if: env.PROCESS == 'true' && steps.cache-vroom.outputs.cache-hit != 'true'
147-
run: |
148-
cd vroom-${{ env.vroom }}/src
149-
USE_ROUTING=false make shared
95+
# documentation dependencies
96+
sudo apt-get install -y \
97+
doxygen \
98+
graphviz \
99+
python3-sphinx \
100+
python3-sphinx-bootstrap-theme \
101+
sphinx-intl
150102
151103
- name: Configure
152104
if: env.PROCESS == 'true'
153105
run: |
154106
mkdir build
155107
cd build
156-
cmake -DCMAKE_BUILD_TYPE=${{ env.release }} -DWITH_DOC=ON -DLINKCHECK=ON -DBUILD_DOXY=ON \
157-
-DVROOM_INSTALL_PATH=${GIT_WORKSPACE}/vroom-${{ env.vroom }} ..
108+
cmake -DCMAKE_BUILD_TYPE=${{ env.release }} -DSPHINX_LINKCHECK=ON -DBUILD_DOXY=ON ..
158109
159-
- name: Check Documentation
110+
- name: Build Documentation
160111
if: env.PROCESS == 'true'
161112
run: |
162113
cd build

.github/workflows/files.yml

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ name: Check files
55
# Verifies:
66
# - the signatures are up-to-date
77
# - the release_notes and NEWS are consitent
8-
# - the C/C++ files have a license
8+
# - the files have a license
99
# - the shell scripts are ok
1010
# - the code style is ok
1111
# Does not makes a compilation
@@ -15,22 +15,31 @@ on: [push, pull_request]
1515
permissions:
1616
contents: read
1717

18+
defaults:
19+
run:
20+
shell: bash
21+
working-directory: tools/scripts
22+
23+
concurrency:
24+
group: ${{ github.workflow }}-${{ github.ref }}
25+
cancel-in-progress: true
26+
1827
jobs:
1928
Signature_check:
2029
runs-on: ubuntu-latest
2130
steps:
2231
- name: Checkout repository
2332
uses: actions/checkout@v4
2433
- name: Signatures are not removed
25-
run: |
26-
tools/scripts/test_signatures.sh
34+
run: ./test_signatures.sh
2735

2836
News_check:
2937
runs-on: ubuntu-latest
3038
steps:
3139
- name: Checkout
3240
uses: actions/checkout@v4
3341
- name: News file up to date
42+
working-directory: ./
3443
run: |
3544
tools/scripts/notes2news.pl
3645
if git status | grep 'NEWS.md'; then echo "NEWS.md is not up to date"; exit 1; fi
@@ -42,21 +51,19 @@ jobs:
4251
- name: Checkout
4352
uses: actions/checkout@v4
4453
- name: Install Requirements
45-
run: |
46-
sudo apt install -y licensecheck
54+
run: sudo apt install -y licensecheck
4755
- name: Run License Check
48-
run: ./tools/scripts/test_license.sh
56+
run: ./test_license.sh
4957

5058
Shell_check:
5159
runs-on: ubuntu-latest
5260
steps:
5361
- name: Checkout
5462
uses: actions/checkout@v4
5563
- name: Install Requirements
56-
run: |
57-
sudo apt install -y shellcheck
64+
run: sudo apt-get install -y shellcheck
5865
- name: Run Shell Check
59-
run: ./tools/scripts/test_shell.sh
66+
run: ./test_shell.sh
6067

6168
style-check:
6269
runs-on: ubuntu-latest
@@ -70,5 +77,5 @@ jobs:
7077
ref: "develop"
7178
path: "code_linter/cpplint"
7279
- name: Run linter
73-
run: |
74-
bash ./tools/scripts/code_checker.sh
80+
working-directory: ./
81+
run: ./tools/scripts/code_checker.sh

0 commit comments

Comments
 (0)