Skip to content

Commit

Permalink
Fix release script
Browse files Browse the repository at this point in the history
  • Loading branch information
krashish8 committed Jul 24, 2024
1 parent 034bf54 commit b1a50dc
Showing 1 changed file with 27 additions and 20 deletions.
47 changes: 27 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name: Release
on:
workflow_dispatch:

env:
postgis: 3
vroom: 1.12.0

jobs:
release:
Expand All @@ -14,20 +17,18 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Get postgres version
run: |
sudo service postgresql start
PGVER=$(psql --version | grep -Po '(?<=psql \(PostgreSQL\) )[^;]+(?=\.\d \()')
pgver=$(psql --version | grep -Po '(?<=psql \(PostgreSQL\) )[^;]+(?=\.\d+ \()')
PROJECT_VERSION=$(grep -Po '(?<=project\(VRPROUTING VERSION )[^;]+' CMakeLists.txt)
echo "PGVER=${PGVER}" >> $GITHUB_ENV
echo "PGPORT=5432" >> $GITHUB_ENV
echo "PGIS=3" >> $GITHUB_ENV
echo "PROJECT_VERSION=${PROJECT_VERSION}" >> $GITHUB_ENV
echo "VROOMVER=1.12.0" >> $GITHUB_ENV
- name: Verify Tag Name
run: |
Expand All @@ -54,7 +55,7 @@ jobs:
$(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
- name: Install python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: '3.x'

Expand All @@ -63,8 +64,8 @@ jobs:
sudo apt-get update
sudo apt-get install -y \
postgresql-${PGVER} \
postgresql-${PGVER}-postgis-${PGIS} \
postgresql-${PGVER}-postgis-${PGIS}-scripts \
postgresql-${PGVER}-postgis-${{ env.postgis }} \
postgresql-${PGVER}-postgis-${{ env.postgis }}-scripts \
postgresql-server-dev-${PGVER} \
graphviz \
doxygen
Expand All @@ -76,35 +77,41 @@ jobs:
run: |
sudo apt-get install libssl-dev libasio-dev libglpk-dev
- name: Install Google OR-Tools dependencies
run: |
sudo pip install --root=/ ortools
- name: Cache VROOM
id: cache-vroom
uses: actions/cache@v2
uses: actions/cache@v4
env:
cache-name: vroom
with:
path: |
~/vroom-${{ env.VROOMVER }}
key: ${{ runner.os }}-${{ env.cache-name }}-${{ env.VROOMVER }}
path: vroom-${{ env.vroom }}
key: ${{ matrix.os }}-${{ env.cache-name }}-${{ env.vroom }}

- name: Checkout VROOM
if: steps.cache-vroom.outputs.cache-hit != 'true'
uses: actions/checkout@v4
with:
path: vroom-${{ env.vroom }}
repository: VROOM-Project/vroom
ref: "v${{ env.vroom }}"
submodules: true

- name: Build VROOM
if: steps.cache-vroom.outputs.cache-hit != 'true'
run: |
git clone --depth 1 --branch v${{ env.VROOMVER }} https://github.com/VROOM-Project/vroom ~/vroom-${{ env.VROOMVER }}
# init the required submodules
cd ~/vroom-${{ env.VROOMVER }}/
git submodule update --init
# Using "shared" target for creating Position Independent Code, disabling use of routing
cd ~/vroom-${{ env.VROOMVER }}/src
cd vroom-${{ env.vroom }}/src
USE_ROUTING=false make shared
- name: Configure
run: |
export PATH=/usr/lib/postgresql/${PGVER}/bin:$PATH
VROOM=$(pwd)/vroom-${{ env.vroom }}
mkdir build
cd build
cmake -DPOSTGRESQL_VERSION=${PGVER} -DDOC_USE_BOOTSTRAP=ON -DWITH_DOC=ON -DBUILD_DOXY=ON -DCMAKE_BUILD_TYPE=Release -DES=ON -DVROOM_INSTALL_PATH=$HOME/vroom-${{ env.VROOMVER }} ..
cmake -DPOSTGRESQL_VERSION=${PGVER} -DDOC_USE_BOOTSTRAP=ON -DWITH_DOC=ON -DBUILD_DOXY=ON -DCMAKE_BUILD_TYPE=Release -DES=ON -DVROOM_INSTALL_PATH=${VROOM} ..
- name: Build
run: |
Expand Down

0 comments on commit b1a50dc

Please sign in to comment.