File: action.yml

package info (click to toggle)
osm2pgsql 1.8.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 5,536 kB
  • sloc: cpp: 46,707; ansic: 1,804; python: 797; sh: 25; makefile: 14
file content (29 lines) | stat: -rw-r--r-- 977 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
name: Set up PostgreSQL on Windows

runs:
  using: composite
  steps:
    - name: Download postgis
      run: |
        if (!(Test-Path "C:\postgis.zip")){(new-object net.webclient).DownloadFile("https://osm2pgsql.org/ci/winbuild/postgis-bundle-pg14-3.2.0x64.zip", "c:\postgis.zip")}
        7z x c:\postgis.zip -oc:\postgis_archive
      shell: pwsh

    - name: Install postgis
      run: |
        echo "Root: $PGROOT, Bin: $PGBIN"
        cp -r c:/postgis_archive/postgis-bundle-*/* "$PGROOT"
      shell: bash

    - name: Start PostgreSQL on Windows
      run: |
        $pgService = Get-Service -Name postgresql*
        Set-Service -InputObject $pgService -Status running -StartupType automatic
        Start-Process -FilePath "$env:PGBIN\pg_isready" -Wait -PassThru
      shell: pwsh

    - name: Create test tablespace
      run: |
        mkdir c:\tablespace
        & $env:PGBIN\psql -c "CREATE TABLESPACE tablespacetest LOCATION 'c:/tablespace'"
      shell: pwsh