Skip to content

Types fixes from QGIS #558

Types fixes from QGIS

Types fixes from QGIS #558

Workflow file for this run

name: Windows Tests
on: [push, pull_request]
jobs:
windows_tests:
runs-on: windows-latest
steps:
- name: Checkout MDAL
uses: actions/checkout@v3
- name: config env variables
run: echo "OSGEO4W_ROOT=${{github.workspace}}\OSGEO4W" >> $env:GITHUB_ENV
- name: load OSGEO dependencies
run: ${{github.workspace}}/scripts/load_osgeo.ps1
- name: Set compiler environment
shell: cmd
run: |
CALL "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=x86
- name: Build
shell: pwsh
run: |
$ErrorActionPreference = 'continue'
function exec
{
param ( [ScriptBlock] $ScriptBlock )
& $ScriptBlock 2>&1 | ForEach-Object -Process { "$_" }
if ($LastExitCode -ne 0) { exit $LastExitCode }
}
cd $env:GITHUB_WORKSPACE
mkdir build
cd build
exec { cmake -G "Visual Studio 17 2022" -DCMAKE_BUILD_TYPE=Rel -DENABLE_TESTS=ON -DEXTERNAL_DRIVER_DHI_DFS=OFF -DNETCDF_PREFIX=${{env.OSGEO4W_ROOT}} -DHDF5_ROOT=${{env.OSGEO4W_ROOT}} -DGDAL_DIR=${{env.OSGEO4W_ROOT}} -DGDAL_LIBRARY="${{env.OSGEO4W_ROOT}}\lib\gdal_i.lib" -DGDAL_INCLUDE_DIR="${{env.OSGEO4W_ROOT}}\include" -DLIBXML2_LIBRARIES="${{env.OSGEO4W_ROOT}}\lib\libxml2.lib" -DLIBXML2_INCLUDE_DIR="${{env.OSGEO4W_ROOT}}\include\libxml2" .. }
exec { cmake --build . }
- name: Run tests
shell: pwsh
run: |
$ErrorActionPreference = 'continue'
function exec
{
param ( [ScriptBlock] $ScriptBlock )
& $ScriptBlock 2>&1 | ForEach-Object -Process { "$_" }
if ($LastExitCode -ne 0) { exit $LastExitCode }
}
$env:PATH="${{env.OSGEO4W_ROOT}}\bin;$env:GITHUB_WORKSPACE\build\tool\Debug\;$env:GITHUB_WORKSPACE\build\mdal\Debug;$env:PATH"
$env:MDAL_DRIVER_PATH="$env:GITHUB_WORKSPACE\build\external_drivers\minimal_example\Debug"
cd $env:GITHUB_WORKSPACE\build
exec { ctest -VV --exclude-regex "mdalinfo_test" }