|
59 | 59 | is_release: ${{ steps.analyze_tag.outputs.is_release }} |
60 | 60 | is_prerelease: ${{ steps.analyze_tag.outputs.is_prerelease }} |
61 | 61 |
|
| 62 | + # Installing PostGIS on Windows is complicated/unreliable, so we don't test on it. |
| 63 | + # The NPGSQL_TEST_POSTGIS environment variable ensures that if PostGIS isn't installed, |
| 64 | + # the PostGIS tests fail and therefore fail the build. |
| 65 | + env: |
| 66 | + NPGSQL_TEST_POSTGIS: ${{ startsWith(matrix.os, 'windows') ? 'false' : 'true' }} |
| 67 | + |
62 | 68 | steps: |
63 | 69 | - name: Checkout |
64 | 70 | uses: actions/checkout@v5 |
@@ -165,28 +171,6 @@ jobs: |
165 | 171 | # Match Npgsql CI Docker image and stash one level up |
166 | 172 | cp $GITHUB_WORKSPACE/.build/{server.crt,server.key,ca.crt} pgsql |
167 | 173 |
|
168 | | - # Find OSGEO version number |
169 | | - OSGEO_VERSION=$(\ |
170 | | - curl -Ls https://download.osgeo.org/postgis/windows/pg${{ matrix.pg_major }} | |
171 | | - sed -n 's/.*>postgis-bundle-pg${{ matrix.pg_major }}-\(${{ env.postgis_version }}.[0-9]*.[0-9]*\)x64.zip<.*/\1/p' | |
172 | | - tail -n 1) |
173 | | - if [ -z "$OSGEO_VERSION" ]; then |
174 | | - OSGEO_VERSION=$(\ |
175 | | - curl -Ls https://download.osgeo.org/postgis/windows/pg${{ matrix.pg_major }}/archive | |
176 | | - sed -n 's/.*>postgis-bundle-pg${{ matrix.pg_major }}-\(${{ env.postgis_version }}.[0-9]*.[0-9]*\)x64.zip<.*/\1/p' | |
177 | | - tail -n 1) |
178 | | - POSTGIS_PATH="archive/" |
179 | | - else |
180 | | - POSTGIS_PATH="" |
181 | | - fi |
182 | | -
|
183 | | - # Install PostGIS |
184 | | - echo "Installing PostGIS (version: ${OSGEO_VERSION})" |
185 | | - POSTGIS_FILE="postgis-bundle-pg${{ matrix.pg_major }}-${OSGEO_VERSION}x64" |
186 | | - curl -o postgis.zip -L https://download.osgeo.org/postgis/windows/pg${{ matrix.pg_major }}/${POSTGIS_PATH}${POSTGIS_FILE}.zip |
187 | | - unzip postgis.zip -d postgis |
188 | | - cp -a postgis/$POSTGIS_FILE/. pgsql/ |
189 | | -
|
190 | 174 | # Start PostgreSQL |
191 | 175 | pgsql/bin/initdb -D pgsql/PGDATA -E UTF8 -U postgres |
192 | 176 | SOCKET_DIR=$(echo "$LOCALAPPDATA\Temp" | sed 's|\\|/|g') |
|
0 commit comments