Skip to content

Commit

Permalink
GDAL v3.9.2 (#159)
Browse files Browse the repository at this point in the history
* Use hdf4 from github

* Update makefile for tests

* Use VC runtime in path for deps

* Bump versions

* Update workflow

* Update deps for linux

* Fix build issues

* Update readme

* Remove docker testing container
  • Loading branch information
MaxRev-Dev authored Nov 5, 2024
1 parent 9be67b6 commit 3144978
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 28 deletions.
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ concurrency:
env:
DOTNET_INSTALL_DIR: ${{ github.workspace }}/.dotnet
DOTNET_VERSION: '8.0.x'
IS_PRE_RELEASE: ${{ !contains(github.ref, 'main') || contains(github.event.head_commit.message, '[prerelease]') }}

jobs:
LinuxBuild:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ jobs:
- name: Test packages
run: |
docker run \
docker run --rm \
--env BUILD_NUMBER_TAIL=${{ github.run_number }} \
--env BUILD_ARCH=${{ matrix.arch }} \
--env PRERELEASE=${{ env.IS_PRE_RELEASE }} \
Expand Down
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# gdal.netcore [![Mentioned in Awesome Geospatial](https://raw.githubusercontent.com/sindresorhus/awesome/main/media/mentioned-badge.svg)](https://github.com/sacridini/Awesome-Geospatial) [![Made in Ukraine](https://img.shields.io/badge/made_in-Ukraine-ffd700.svg?labelColor=0057b7)](https://stand-with-ukraine.pp.ua)
# gdal.netcore [![Mentioned in Awesome Geospatial](https://raw.githubusercontent.com/sindresorhus/awesome/main/media/mentioned-badge.svg)](https://github.com/sacridini/Awesome-Geospatial) [![Made in Ukraine](https://img.shields.io/badge/made_in-Ukraine-ffd700.svg?labelColor=0057b7)](https://stand-with-ukraine.pp.ua) ![Build](https://img.shields.io/github/actions/workflow/status/MaxRev-Dev/gdal.netcore/main.yml?branch=main&link=https%3A%2F%2Fgithub.com%2FMaxRev-Dev%2Fgdal.netcore%2Factions%2Fworkflows%2Fmain.yml)

[![Linux Build](https://img.shields.io/github/actions/workflow/status/MaxRev-Dev/gdal.netcore/unix.yml?label=Linux%20Build)](https://github.com/MaxRev-Dev/gdal.netcore/actions/workflows/unix.yml)
[![MacOS Build](https://img.shields.io/github/actions/workflow/status/MaxRev-Dev/gdal.netcore/macos.yml?label=MacOS%20Build)](https://github.com/MaxRev-Dev/gdal.netcore/actions/workflows/macos.yml)
[![Windows Build](https://img.shields.io/github/actions/workflow/status/MaxRev-Dev/gdal.netcore/windows.yml?label=Windows%20Build)](https://github.com/MaxRev-Dev/gdal.netcore/actions/workflows/windows.yml)

A simple (as is) build engine of [GDAL](https://gdal.org/) library for [.NET](https://dotnet.microsoft.com/download).

Expand Down
2 changes: 1 addition & 1 deletion ci/Dockerfile.unix
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN apt-get update && apt-get install -y \
python3 python3-pip \
linux-libc-dev \
libhdf4-dev libnetcdf-dev linux-libc-dev \
swig patchelf gettext \
swig patchelf gettext bison flex \
# required for gdal
default-libmysqlclient-dev

Expand Down
10 changes: 5 additions & 5 deletions osx/gdal-makefile
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ reset_%:
init_hdf: check_hdf_sources
@echo "$(TO) HDF sources restore complete"

HDF_zip=CMake-hdf-$(HDF_VERSION).zip
HDF_SOURCE=$(BUILD_ROOT)/CMake-hdf-$(HDF_VERSION)/hdf-$(HDF_VERSION)
HDF_zip=hdf$(HDF_VERSION).zip
HDF_SOURCE=$(BUILD_ROOT)/hdf-$(HDF_VERSION)/hdfsrc

download_hdf:
curl -o "$(BUILD_ROOT)/$(HDF_zip)" "https://hdf-wordpress-1.s3.amazonaws.com/wp-content/uploads/manual/HDF4/HDF$(HDF_VERSION)/src/$(HDF_zip)"
cd "$(BUILD_ROOT)"; unzip -q "$(BUILD_ROOT)/$(HDF_zip)" -d .
curl -L -o "$(BUILD_ROOT)/$(HDF_zip)" "https://github.com/HDFGroup/hdf4/releases/download/hdf$(HDF_VERSION)/$(HDF_zip)"
cd "$(BUILD_ROOT)"; unzip -q "$(BUILD_ROOT)/$(HDF_zip)" -d "$(BUILD_ROOT)/hdf-$(HDF_VERSION)"

check_hdf_sources:
@if [[ ! -f "$(BUILD_ROOT)/$(HDF_zip)" ]] || [[ ! -d "$(HDF_SOURCE)" ]]; then \
Expand Down Expand Up @@ -143,7 +143,7 @@ configure_gdal:
-DHDF4_INCLUDE_DIR=$(BUILD_ROOT)/hdf-build/include \
-DHDF4_df_LIBRARY_RELEASE=$(BUILD_ROOT)/hdf-build/lib/libhdf.dylib \
-DHDF4_mfhdf_LIBRARY_RELEASE=$(BUILD_ROOT)/hdf-build/lib/libmfhdf.dylib \
-DHDF4_xdr_LIBRARY_RELEASE=$(BUILD_ROOT)/hdf-build/lib/libxdr.dylib \
-DHDF4_COMPONENTS="df;mfhdf;szip" \
-DOpenEXR_HALF_LIBRARY=$(VCPKG_INSTALLED_DYNAMIC)/lib/libImath-3_1.dylib \
-DPROJ_INCLUDE_DIR=$(PROJ_BUILD)/include \
-DPROJ_LIBRARY_RELEASE=$(PROJ_BUILD)/lib/libproj.dylib \
Expand Down
8 changes: 4 additions & 4 deletions osx/test-makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ TEST_TARGET=$(TEST_DIR_APP)
CMD_TYPE=dotnet run
endif

MISSING_PACKAGES=MaxRev.Gdal.LinuxRuntime.Minimal MaxRev.Gdal.WindowsRuntime.Minimal
MISSING_PACKAGES=MaxRev.Gdal.LinuxRuntime.Minimal MaxRev.Gdal.WindowsRuntime.Minimal MaxRev.Gdal.Universal

any: test

Expand All @@ -20,13 +20,13 @@ test-restore:
cd "$(TEST_DIR)/../MaxRev.Gdal.Core.Tests.AzureFunctions" && dotnet remove package $$v &> /dev/null; \
cd "$(TEST_DIR)/../MaxRev.Gdal.Core.Tests" && dotnet remove package $$v &> /dev/null; \
done;
cd $(TEST_TARGET) && \
-cd $(TEST_TARGET) && \
dotnet restore --ignore-failed-sources

test-update:
cd $(TEST_TARGET) && \
-cd $(TEST_TARGET) && \
dotnet add package MaxRev.Gdal.MacosRuntime.Minimal.$(BUILD_ARCH) --no-restore -v "$(GDAL_VERSION).$(PACKAGE_BUILD_NUMBER_OSX)" -s $(NUGET_)
cd $(TEST_TARGET) && \
-cd $(TEST_TARGET) && \
dotnet add package MaxRev.Gdal.Core --no-restore -v "$(GDAL_VERSION).$(PACKAGE_BUILD_NUMBER_OSX)" -s $(NUGET_)

test-only: test-restore
Expand Down
14 changes: 7 additions & 7 deletions shared/GdalCore.opt
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ BUILD_NUMBER_TAIL=100
### build (drivers) root
BUILD_ROOT=$(ROOTDIR_)/build-$(BASE_RID)

# Jun 19, 2024
GDAL_VERSION=3.9.1
# Aug 13, 2024
GDAL_VERSION=3.9.2
GDAL_ROOT=$(BUILD_ROOT)/gdal-source
GDAL_REPO=https://github.com/OSGeo/gdal.git
GDAL_COMMIT_VER=v$(GDAL_VERSION)RC1
GDAL_COMMIT_VER=v$(GDAL_VERSION)

# Jun 1, 2024
PROJ_VERSION=9.4.1
# Sep 15, 2024
PROJ_VERSION=9.5.0
PROJ_ROOT=$(BUILD_ROOT)/proj-source
PROJ_REPO=https://github.com/OSGeo/PROJ.git
PROJ_COMMIT_VER=$(PROJ_VERSION)
Expand All @@ -25,7 +25,7 @@ PROJ_COMMIT_VER=$(PROJ_VERSION)

VCPKG_ROOT=$(BUILD_ROOT)/vcpkg
VCPKG_REPO=https://github.com/microsoft/vcpkg.git
VCPKG_COMMIT_VER=2024.07.12
VCPKG_COMMIT_VER=2024.10.21

# base requirements for both runtimes
VCPKG_REQUIRE=geos "tiff[zstd,zip,jpeg,tools,lzma,cxx,webp]" curl
Expand Down Expand Up @@ -81,7 +81,7 @@ SWIG_INCLUDE_=$(BASE_SWIG_)/include
##### HDF build location (only for osx)
HDF_BUILD=$(BUILD_ROOT)/hdf-build
HDF_CMAKE_TMP=$(BUILD_ROOT)/hdf-cmake-temp
HDF_VERSION=4.2.16-2
HDF_VERSION=4.3.0

##### PROJ build location
PROJ_BUILD=$(BUILD_ROOT)/proj-build
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<Platforms>x64;arm64</Platforms>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MaxRev.Gdal.Core" Version="3.9.0.*" />
<PackageReference Include="MaxRev.Gdal.Core" Version="3.9.2.*" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.3" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
Expand Down
12 changes: 8 additions & 4 deletions unix/test-makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,23 @@ TEST_TARGET=$(TEST_DIR_APP)
CMD_TYPE=dotnet run
endif

MISSING_PACKAGES=MaxRev.Gdal.MacosRuntime.Minimal MaxRev.Gdal.WindowsRuntime.Minimal
MISSING_PACKAGES=MaxRev.Gdal.MacosRuntime.Minimal MaxRev.Gdal.WindowsRuntime.Minimal MaxRev.Gdal.Universal

all: test

### Testing linux libraries (from nuget build output)
test-restore:
cd $(TEST_TARGET) && \
-@for v in $(MISSING_PACKAGES); do \
cd "$(TEST_DIR)/../MaxRev.Gdal.Core.Tests.AzureFunctions" && dotnet remove package $$v &> /dev/null; \
cd "$(TEST_DIR)/../MaxRev.Gdal.Core.Tests" && dotnet remove package $$v &> /dev/null; \
done;
-cd $(TEST_TARGET) && \
dotnet restore --ignore-failed-sources

test-update:
cd $(TEST_TARGET) && \
-cd $(TEST_TARGET) && \
dotnet add package MaxRev.Gdal.LinuxRuntime.Minimal.$(BUILD_ARCH) -v "$(GDAL_VERSION).$(PACKAGE_BUILD_NUMBER)" -s $(NUGET_)
cd $(TEST_TARGET) && \
-cd $(TEST_TARGET) && \
dotnet add package MaxRev.Gdal.Core -v "$(GDAL_VERSION).$(PACKAGE_BUILD_NUMBER)" -s $(NUGET_)

test-only: test-restore
Expand Down
2 changes: 1 addition & 1 deletion win/partials.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ function Get-CollectDeps {
$env:GDAL_DRIVER_PATH = "$env:GDAL_INSTALL_DIR\share\gdal"
$env:PROJ_LIB = "$env:PROJ_INSTALL_DIR\share\proj"

$dllDirectories = @("$env:GDAL_INSTALL_DIR\bin", "$env:PROJ_INSTALL_DIR\bin", "$env:VCPKG_INSTALLED\bin", "$env:SDK_PREFIX\bin")
$dllDirectories = @("$env:GDAL_INSTALL_DIR\bin", "$env:PROJ_INSTALL_DIR\bin", "$env:VCPKG_INSTALLED\bin", "$env:SDK_PREFIX\bin", $env:VCToolsRedistDir + "x64\")
Write-BuildInfo "Using DLL directories: $dllDirectories"

Write-BuildInfo "Collecting dependent DLLs for $dllFile"
Expand Down

0 comments on commit 3144978

Please sign in to comment.