Added handling of M values in OgrConverter #204
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build MapWinGIS -Develop branch | |
on: | |
push: | |
branches: | |
- develop | |
paths-ignore: | |
- '**.md' | |
#- '**.yml' | |
- 'docs/**' | |
pull_request: | |
paths-ignore: | |
- '**.md' | |
- '**.yml' | |
- 'docs/**' | |
env: | |
# Path to the solution files relative to the root of the project. | |
SUPPORTLIBS_SOLUTION_FILE_PATH: ./Support/SupportLibs.sln | |
MAPWINGIS_SOLUTION_FILE_PATH: ./src/MapWinGIS.sln | |
UNITTESTS_SOLUTION_FILE_PATH: ./MapWinGisTests-net6/MapWinGisTests-net6.sln | |
# Configuration type to build. | |
BUILD_CONFIGURATION: Debug | |
jobs: | |
build: | |
name: Build MapWinGIS | |
runs-on: windows-2019 | |
strategy: | |
matrix: | |
platform: ['Win32', 'x64'] | |
# platform: ['Win32'] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
# Setup MSBuild | |
- name: setup-msbuild | |
uses: microsoft/[email protected] | |
if: ${{matrix.platform == 'x64' }} | |
with: | |
msbuild-architecture: x64 | |
- name: setup-msbuild | |
uses: microsoft/[email protected] | |
if: ${{matrix.platform == 'Win32' }} | |
with: | |
msbuild-architecture: x86 | |
- name: Set VcpkgTriplet-x86 | |
if: ${{matrix.platform == 'Win32' }} | |
run: | | |
chcp 65001 #set code page to utf-8 | |
echo ("VcpkgTriplet=x86-windows") >> $env:GITHUB_ENV | |
echo ("VCPKG_INSTALLED_DIR=${{ github.workspace }}/src/vcpkg_installed/x86-windows/") >> $env:GITHUB_ENV | |
mkdir $[env.VCPKG_INSTALLED_DIR] | |
- name: Set VcpkgTriplet-x64 | |
if: ${{matrix.platform == 'x64' }} | |
run: | | |
chcp 65001 #set code page to utf-8 | |
echo ("VcpkgTriplet=x64-windows") >> $env:GITHUB_ENV | |
echo ("VCPKG_INSTALLED_DIR=${{ github.workspace }}/src/vcpkg_installed/x64-windows/") >> $env:GITHUB_ENV | |
mkdir $[env.VCPKG_INSTALLED_DIR] | |
# Install VCPCK | |
- name: run-vcpkg | |
# You may pin to the exact commit or the version. | |
# uses: lukka/run-vcpkg@c5ce6a7de6e5ce834a25f7d55b6c250a275a6732 | |
uses: lukka/run-vcpkg@v10 | |
with: | |
runVcpkgInstall: true | |
vcpkgDirectory: ${{ github.workspace }}\src\vcpkg\ | |
runVcpkgFormatString: "[`install`, `--recurse`, `--clean-after-build`, `--x-install-root`, `$[env.VCPKG_INSTALLED_DIR]`, `--triplet`, `${{env.VcpkgTriplet}}`]" | |
- name: List downloaded VCPCK files | |
uses: Azure/powershell@v1 | |
with: | |
# Specify the Az PowerShell script here. | |
inlineScript: | | |
Write-Host "Test:" | |
Write-Host "VCPKG_INSTALLED_DIR: " ${{env.VCPKG_INSTALLED_DIR}} | |
Write-Host "VcpkgTriplet: " ${{env.VcpkgTriplet}} | |
ls -R ${{env.VCPKG_INSTALLED_DIR}} | |
# Azure PS version to be used to execute the script, example: 1.8.0, 2.8.0, 3.4.0. To use the latest version, specify "latest". | |
azPSVersion: "latest" | |
# Select the value of the ErrorActionPreference variable for executing the script. Options: stop, continue, silentlyContinue. Default is Stop. | |
errorActionPreference: Stop | |
# If this is true, this task will fail if any errors are written to the error pipeline, or if any data is written to the Standard Error stream. | |
failOnStandardError: true | |
# Download GisInternals zips | |
- name: Download GisInternals zips | |
uses: Azure/powershell@v1 | |
with: | |
# Specify the Az PowerShell script here. | |
inlineScript: | | |
Invoke-WebRequest -Uri "https://github.com/MapWindow/Dependencies/raw/main/GisInternals/release-1928-gdal-3-5-mapserver-8-0.zip" -MaximumRetryCount 3 -Resume -RetryIntervalSec 30 -OutFile ".\Support\release-1928-gdal-3-5-mapserver-8-0.zip" | |
Invoke-WebRequest -Uri "https://github.com/MapWindow/Dependencies/raw/main/GisInternals/release-1928-gdal-3-5-mapserver-8-0-libs.zip" -MaximumRetryCount 3 -Resume -RetryIntervalSec 30 -OutFile ".\Support\release-1928-gdal-3-5-mapserver-8-0-libs.zip" | |
Invoke-WebRequest -Uri "https://github.com/MapWindow/Dependencies/raw/main/GisInternals/release-1928-x64-gdal-3-5-mapserver-8-0.zip" -MaximumRetryCount 3 -Resume -RetryIntervalSec 30 -OutFile ".\Support\release-1928-x64-gdal-3-5-mapserver-8-0.zip" | |
Invoke-WebRequest -Uri "https://github.com/MapWindow/Dependencies/raw/main/GisInternals/release-1928-x64-gdal-3-5-mapserver-8-0-libs.zip" -MaximumRetryCount 3 -Resume -RetryIntervalSec 30 -OutFile ".\Support\release-1928-x64-gdal-3-5-mapserver-8-0-libs.zip" | |
ls .\Support\ | |
# Azure PS version to be used to execute the script, example: 1.8.0, 2.8.0, 3.4.0. To use the latest version, specify "latest". | |
azPSVersion: "latest" | |
# Select the value of the ErrorActionPreference variable for executing the script. Options: stop, continue, silentlyContinue. Default is Stop. | |
errorActionPreference: Stop | |
# If this is true, this task will fail if any errors are written to the error pipeline, or if any data is written to the Standard Error stream. | |
failOnStandardError: true | |
# Unzip zips by calling powershell script | |
- name: Unzip | |
working-directory: ./Support/ | |
shell: pwsh | |
run: .\unpackGdal3-Toolset142-GISInternals.ps1 | |
# Build support libs | |
- name: Build SupportLibs ${{matrix.platform}} | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
# Add additional options to the MSBuild command line here (like platform or verbosity level). | |
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference | |
# MSBuild SupportLibs.sln /t:Rebuild /p:Configuration=Release /p:Platform="Win32" | |
run: msbuild /m /p:Configuration=Release /p:Platform=${{matrix.platform}} ${{env.SUPPORTLIBS_SOLUTION_FILE_PATH}} | |
# Build MapWinGIS | |
- name: Build MapWinGIS ${{matrix.platform}} | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
# Add additional options to the MSBuild command line here (like platform or verbosity level). | |
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference | |
# MSBuild SupportLibs.sln /t:Rebuild /p:Configuration=Release /p:Platform="Win32" | |
run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform=${{matrix.platform}} /p:VcpkgEnabled=true /p:VcpkgEnableManifest=true /p:VcpkgTriplet=${{env.VcpkgTriplet}} /p:VcpkgHostTriplet=${{env.VcpkgTriplet}} ${{env.MAPWINGIS_SOLUTION_FILE_PATH}} | |
# Save artifacts: | |
- name: Archive production artifacts | |
uses: actions/[email protected] | |
with: | |
name: binaries-${{matrix.platform}} | |
path: .\src\bin\${{env.BUILD_CONFIGURATION}}\${{matrix.platform}}\**\* | |
unit-tests: | |
name: Unit Testing | |
needs: build | |
runs-on: windows-2022 | |
strategy: | |
max-parallel: 1 | |
matrix: | |
platform: ['x64', 'Win32'] | |
# platform: ['Win32'] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup dotnet 6 | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: '6.x' | |
- name: Setup dotnet 7 | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: '6.x' | |
- name: Download MapWinGIS (${{matrix.platform}}) binaries | |
uses: actions/download-artifact@v2 | |
with: | |
name: binaries-${{matrix.platform}} | |
path: .\src\bin\${{env.BUILD_CONFIGURATION}}\${{matrix.platform}}\ | |
- name: Register MapWinGIS.ocx (${{matrix.platform}}) | |
uses: Azure/powershell@v1 | |
with: | |
# Specify the Az PowerShell script here. | |
inlineScript: | | |
$ExitCodes = @{ | |
0 = "SUCCESS"; | |
1 = "FAIL_ARGS - Invalid Argument"; | |
2 = "FAIL_OLE - OleInitialize Failed"; | |
3 = "FAIL_LOAD - LoadLibrary Failed"; | |
4 = "FAIL_ENTRY - GetProcAddress failed"; | |
5 = "FAIL_REG - DllRegisterServer or DllUnregisterServer failed."; | |
} | |
$regsvrp = Start-Process C:\Windows\SysWOW64\regsvr32.exe -ArgumentList "/s ${{ github.workspace }}\src\bin\${{env.BUILD_CONFIGURATION}}\${{matrix.platform}}\MapWinGIS.ocx" -PassThru | |
$regsvrp.WaitForExit(5000) # Wait (up to) 5 seconds | |
if($regsvrp.ExitCode -ne 0) | |
{ | |
Write-Host "RegSrv32 for ${{matrix.platform}} failed" | |
Write-Error $ExitCodes[$regsvrp.ExitCode] | |
} | |
# Azure PS version to be used to execute the script, example: 1.8.0, 2.8.0, 3.4.0. To use the latest version, specify "latest". | |
azPSVersion: "latest" | |
# Select the value of the ErrorActionPreference variable for executing the script. Options: stop, continue, silentlyContinue. Default is Stop. | |
errorActionPreference: Stop | |
# If this is true, this task will fail if any errors are written to the error pipeline, or if any data is written to the Standard Error stream. | |
failOnStandardError: true | |
# Build test solution | |
- name: setup-msbuild | |
uses: microsoft/[email protected] | |
if: ${{matrix.platform == 'x64' }} | |
with: | |
msbuild-architecture: x64 | |
- name: setup-msbuild | |
uses: microsoft/[email protected] | |
if: ${{matrix.platform == 'Win32' }} | |
with: | |
msbuild-architecture: x86 | |
- name: Build test solution ${{matrix.platform}} | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
# Add additional options to the MSBuild command line here (like platform or verbosity level). | |
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference | |
# MSBuild SupportLibs.sln /t:Rebuild /p:Configuration=Release /p:Platform="Win32" | |
run: msbuild /m:2 /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform=${{matrix.platform}} -restore /v:m ${{env.UNITTESTS_SOLUTION_FILE_PATH}} | |
# Run unit tests | |
- name: Setup VSTest.console.exe | |
uses: darenm/Setup-VSTest@v1 | |
- name: Unit Testing x86 | |
if: ${{matrix.platform == 'Win32' }} | |
run: vstest.console.exe /Blame /Diag:logs\log.txt /Platform:x86 -e:PROJ_LIB="${{ github.workspace }}\src\bin\${{env.BUILD_CONFIGURATION}}\Win32\proj7\share\" .\MapWinGisTests-net6\MapWinGisTests\bin\x86\${{env.BUILD_CONFIGURATION}}\net6.0-windows8.0\MapWinGisTests.dll | |
- name: Unit Testing x64 | |
if: ${{matrix.platform == 'x64' }} | |
run: vstest.console.exe /Blame /Diag:logs\log.txt /Platform:x64 -e:PROJ_LIB="${{ github.workspace }}\src\bin\${{env.BUILD_CONFIGURATION}}\x64\proj7\share\" .\MapWinGisTests-net6\MapWinGisTests\bin\x64\${{env.BUILD_CONFIGURATION}}\net6.0-windows8.0\MapWinGisTests.dll | |
# TODO: Create installer using innosetup | |
# TODO: Publish installer to GitHub Releases |