Skip to content

Bump actions/checkout from 3 to 4 #1014

Bump actions/checkout from 3 to 4

Bump actions/checkout from 3 to 4 #1014

Workflow file for this run

name: Build for Windows
# This action runs:
# - When this file changes
# - When changes on code (src, include)
# - When changes on data or testing scripts (tools/testers)
# - When the way the build changes (CMakeLists.txt)
#
# Test is done on:
# - the preinstalled postgres version
# - postgis 3
#
# The boost version tested are when changes that affect pgRouting on
# - boost::graph
# - boost::geometry
# See https://www.boost.org/users/history/
# Currently
# - boost::geometry has not changed anything we use
# - boost::graph changed on 1.68 and 1.75 requires C++14
# - 1.56 is the minimum version we ask
on:
push:
paths:
- '.github/workflows/windows.yml'
- 'src/**'
- 'include/**'
- 'pgtap/**'
- 'tools/testers/**'
- 'CMakeLists.txt'
branches-ignore:
- 'gh-pages'
tags: []
pull_request:
paths:
- '.github/workflows/windows.yml'
- 'src/**'
- 'include/**'
- 'pgtap/**'
- 'tools/testers/**'
- 'CMakeLists.txt'
branches-ignore:
- 'gh-pages'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
env:
postgis_version: 3
jobs:
build:
name: windows
runs-on: windows-latest
strategy:
matrix:
pg_major: [11.13, 12.8, 13.4]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install boost
uses: MarkusJx/[email protected]
id: install-boost
with:
# REQUIRED: Specify the required boost version
boost_version: 1.73.0
- name: Add msbuild to PATH
uses: microsoft/[email protected]
- name: Install PostgreSQL
run: |
curl https://get.enterprisedb.com/postgresql/postgresql-${{ matrix.pg_major }}-1-windows-x64-binaries.zip --output pgsql.zip
Expand-Archive 'pgsql.zip' -Force
$env:path += ";$(Get-Location)\pgsql\pgsql\bin\"
$env:path -split ";"
initdb -D pgsql\data -U postgres
pg_ctl -D pgsql\data start
echo "POSTGRESQL_DIR=$pwd\pgsql\pgsql" >> $env:GITHUB_ENV
- name: Check Postgres running
run: |
${{ env.POSTGRESQL_DIR }}\bin\psql -U postgres -d postgres -c "SELECT version()"
- name: Configure
run: |
mkdir build
cd build
cmake -DPOSTGRESQL_BIN=${{ env.POSTGRESQL_DIR }}\bin -DPOSTGRESQL_INCLUDE_DIR="${{ env.POSTGRESQL_DIR }}\include;${{ env.POSTGRESQL_DIR }}\include\server" -G"Visual Studio 17 2022" -DCMAKE_BUILD_TYPE=Release -DWITH_DOC=OFF ..
env:
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }}
- name: build
run: |
cd build
msbuild PGROUTING.sln /target:Build /property:Configuration=Release