Skip to content

Commit 7975ef0

Browse files
committed
(CI) Adjusting workflows
1 parent 5e7db35 commit 7975ef0

6 files changed

Lines changed: 41 additions & 58 deletions

File tree

.github/scripts/update_locale.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,13 @@
2020
# ------------------------------------------------------------------------------
2121

2222

23-
2423
DIR=$(git rev-parse --show-toplevel)
2524

2625
pushd "${DIR}" > /dev/null || exit 1
2726

2827
mkdir -p build
2928
pushd build > /dev/null || exit 1
30-
cmake -DWITH_DOC=ON -DCMAKE_BUILD_TYPE=Release -DLOCALE=ON ..
29+
cmake -DBUILD_LOCALE=ON ..
3130

3231
make locale
3332
popd > /dev/null || exit 1
@@ -39,7 +38,12 @@ perl -ne '/\/en\// && print' build/doc/locale_changes_po.txt | \
3938
perl -pe 's/(.*)en\/LC_MESSAGES(.*)/$1pot$2t/' >> build/doc/locale_changes_po_pot.txt # .pot files
4039

4140
# Remove obsolete entries #~ from .po files
42-
bash tools/transifex/remove_obsolete_entries.sh
41+
find locale -type f -name '*.po' -exec sh -c '
42+
if grep -q "#~" "$1"; then
43+
perl -pi -0777 -e "s/#~.*//s" "$1"
44+
git add "$1"
45+
fi
46+
' sh {} \;
4347

4448
while read -r f; do git add "$f"; done < build/doc/locale_changes_po_pot.txt
4549

.github/workflows/check-queries.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,4 +127,6 @@ jobs:
127127
run: |
128128
cd build
129129
make doxy
130-
[ ! -s DOXYLOG ] || echo "There are Doxygen warnings" && exit 1
130+
more DOXYLOG
131+
[ ! -s DOXYLOG ] || echo "There are Doxygen warnings"
132+
[ ! -s DOXYLOG ] || exit 1

.github/workflows/doc-check.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -103,23 +103,20 @@ jobs:
103103
sudo apt-get update
104104
sudo apt-get install -y \
105105
libboost-graph-dev \
106+
python3-sphinx \
107+
python3-sphinx-bootstrap-theme \
106108
postgresql-${PGVER} \
107109
postgresql-server-dev-${PGVER} \
108110
graphviz
109-
python -m pip install --upgrade pip
110-
pip install -r requirements.txt
111-
pip list
112-
113111
114112
- name: Configure
115113
if: env.PROCESS == 'true'
116114
run: |
117115
export PATH=/usr/lib/postgresql/${PGVER}/bin:$PATH
118116
mkdir build
119117
cd build
120-
cmake -DLINKCHECK=ON -DWITH_DOC=ON \
121-
-DES=ON -DZH_HANS=ON \
122-
-DPOSTGRESQL_VERSION=${PGVER} -DCMAKE_BUILD_TYPE=Release ..
118+
cmake -DBUILD_LINKCHECK=ON \
119+
-DPOSTGRESQL_VERSION=${PGVER} ..
123120
124121
- name: Check Documentation
125122
if: env.PROCESS == 'true'

.github/workflows/release.yml

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -70,41 +70,34 @@ jobs:
7070
sudo apt-get update
7171
sudo apt-get install -y \
7272
libboost-graph-dev \
73+
python3-sphinx \
74+
python3-sphinx-bootstrap-theme \
7375
postgresql-${PGVER} \
7476
postgresql-${PGVER}-postgis-${PGIS} \
7577
postgresql-${PGVER}-postgis-${PGIS}-scripts \
7678
postgresql-server-dev-${PGVER} \
7779
graphviz \
7880
doxygen
79-
python -m pip install --upgrade pip
80-
pip install Sphinx
81-
pip install sphinx-bootstrap-theme
82-
pip install sphinx-collapse
83-
pip list
8481
85-
- name: Configure
82+
- name: Configure and build
8683
run: |
8784
export PATH=/usr/lib/postgresql/${PGVER}/bin:$PATH
8885
mkdir build
8986
cd build
90-
cmake -DPOSTGRESQL_VERSION=${PGVER} -DDOC_USE_BOOTSTRAP=ON -DWITH_DOC=ON -DBUILD_DOXY=ON -DCMAKE_BUILD_TYPE=Release \
91-
-DES=ON -DZH_HANS=ON ..
92-
93-
- name: Build
94-
run: |
95-
cd build
87+
cmake -DPOSTGRESQL_VERSION=${PGVER} \
88+
-DDOC_USE_BOOTSTRAP=ON \
89+
-DCMAKE_BUILD_TYPE=Release ..
9690
make doc
97-
make -j 4
98-
sudo make install
9991
make doxy
92+
sudo make -j 4 install
10093
10194
- name: Update Users Documentation
10295
run: |
10396
git checkout origin/gh-pages
10497
git checkout -b gh-pages
10598
PGROUTING_MAJOR_MINOR="${PGROUTING_VERSION%.*}"
10699
rm -rf ${PGROUTING_MAJOR_MINOR}
107-
cp -r build/doc/html ${PGROUTING_MAJOR_MINOR}
100+
cp -r build/doc/_build/html ${PGROUTING_MAJOR_MINOR}
108101
git add ${PGROUTING_MAJOR_MINOR}
109102
git diff-index --quiet HEAD || git commit -m "Update users documentation for ${PGROUTING_VERSION}: commit ${{ env.GIT_HASH }}"
110103
git fetch origin
@@ -136,7 +129,7 @@ jobs:
136129
run: |
137130
cd build/doc
138131
139-
cp -r html doc-v${PGROUTING_VERSION}
132+
cp -r _build/html doc-v${PGROUTING_VERSION}
140133
tar -zcvf doc-v${PGROUTING_VERSION}.tar.gz doc-v${PGROUTING_VERSION}
141134
142135
cd ../..

.github/workflows/update-locale.yml

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -34,22 +34,18 @@ jobs:
3434
with:
3535
fetch-depth: 0
3636

37-
- name: Get postgres version
38-
run: |
39-
sudo service postgresql start
40-
PGVER=$(psql --version | grep -Po '(?<=psql \(PostgreSQL\) )[^;]+(?=\.\d+ \()')
41-
PROJECT_VERSION=$(grep -Po '(?<=project\(PGROUTING VERSION )[^;]+' CMakeLists.txt)
42-
echo "PGVER=${PGVER}" >> $GITHUB_ENV
43-
echo "PGPORT=5432" >> $GITHUB_ENV
44-
echo "PGIS=3" >> $GITHUB_ENV
45-
echo "PROJECT_VERSION=${PROJECT_VERSION}" >> $GITHUB_ENV
46-
4737
- name: Extract branch name and commit hash
4838
run: |
4939
branch=${GITHUB_REF#refs/heads/}
5040
git_hash=$(git rev-parse --short "$GITHUB_SHA")
5141
echo "GIT_HASH=$git_hash" >> $GITHUB_ENV
5242
43+
- name: Get postgres version
44+
run: |
45+
sudo service postgresql start
46+
pgver=$(psql --version | grep -Po '(?<=psql \(PostgreSQL\) )[^;]+(?=\.\d+ \()')
47+
echo "PGVER=${pgver}" >> $GITHUB_ENV
48+
5349
- name: Add PostgreSQL APT repository
5450
run: |
5551
sudo apt-get install curl ca-certificates gnupg
@@ -67,18 +63,12 @@ jobs:
6763
sudo apt-get update
6864
sudo apt-get install -y \
6965
libboost-graph-dev \
66+
python3-sphinx \
67+
python3-sphinx-bootstrap-theme \
68+
sphinx-intl \
7069
postgresql-${PGVER} \
71-
postgresql-${PGVER}-postgis-${PGIS} \
72-
postgresql-${PGVER}-postgis-${PGIS}-scripts \
7370
postgresql-server-dev-${PGVER} \
74-
graphviz \
75-
doxygen
76-
python -m pip install --upgrade pip
77-
pip install Sphinx
78-
pip install sphinx-bootstrap-theme
79-
pip install sphinx-intl[transifex]
80-
pip install sphinx-collapse
81-
pip list
71+
graphviz
8272
8373
- name: Initialize mandatory git config
8474
run: |
@@ -87,7 +77,7 @@ jobs:
8777
8878
- name: Update locale
8979
run: |
90-
bash tools/transifex/update_locale.sh
80+
bash .github/scripts/update_locale.sh
9181
9282
# Add the files, commit and push
9383
git diff --staged --quiet || git commit -m "Update locale: commit ${{ env.GIT_HASH }}"

.github/workflows/website.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -66,26 +66,23 @@ jobs:
6666
sudo apt-get update
6767
sudo apt-get install -y \
6868
libboost-graph-dev \
69+
python3-sphinx \
70+
python3-sphinx-bootstrap-theme \
6971
postgresql-${PGVER} \
7072
postgresql-${PGVER}-postgis-${PGIS} \
7173
postgresql-${PGVER}-postgis-${PGIS}-scripts \
7274
postgresql-server-dev-${PGVER} \
7375
graphviz \
7476
doxygen
75-
python -m pip install --upgrade pip
76-
pip install Sphinx
77-
pip install sphinx-bootstrap-theme
78-
pip install sphinx-intl[transifex]
79-
pip install sphinx-collapse
80-
pip list
8177
8278
- name: Configure and build documentation
8379
run: |
8480
export PATH=/usr/lib/postgresql/${PGVER}/bin:$PATH
8581
mkdir build
8682
cd build
87-
cmake -DPOSTGRESQL_VERSION=${PGVER} -DDOC_USE_BOOTSTRAP=ON -DWITH_DOC=ON -DBUILD_DOXY=ON \
88-
-DCMAKE_BUILD_TYPE=Release -DES=ON -DZH_HANS=ON ..
83+
cmake -DPOSTGRESQL_VERSION=${PGVER} \
84+
-DDOC_USE_BOOTSTRAP=ON \
85+
-DCMAKE_BUILD_TYPE=Release ..
8986
make doc
9087
9188
- name: Initialize mandatory git config
@@ -102,7 +99,7 @@ jobs:
10299
git checkout -b gh-pages
103100
DIRECTORY="${PROJECT_VERSION%.*}"
104101
rm -rf ${DIRECTORY}
105-
cp -r build/doc/html ${DIRECTORY}
102+
cp -r build/doc/_build/html ${DIRECTORY}
106103
git add ${DIRECTORY}
107104
git diff-index --quiet HEAD || git commit -m "Update users documentation for ${PROJECT_VERSION} for develop branch: commit ${{ env.GIT_HASH }}"
108105
git fetch origin
@@ -120,7 +117,7 @@ jobs:
120117
git checkout -b gh-pages
121118
DIRECTORY="main"
122119
rm -rf ${DIRECTORY}
123-
cp -r build/doc/html ${DIRECTORY}
120+
cp -r build/doc/_build/html ${DIRECTORY}
124121
git add ${DIRECTORY}
125122
git diff-index --quiet HEAD || git commit -m "Update users documentation for ${PROJECT_VERSION} for main branch: commit ${{ env.GIT_HASH }}"
126123
git fetch origin

0 commit comments

Comments
 (0)