Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ jobs:

- name: Create packages
run: |
make -f publish-makefile pack BUILD_ARCH=${{ matrix.arch }} BUILD_NUMBER_TAIL=${{ github.run_number }}
make -f publish-makefile pack BUILD_ARCH=${{ matrix.arch }} BUILD_NUMBER_TAIL=${{ github.run_number }} PRERELEASE=${{ inputs.is-pre-release }}

- name: Store metadata as artifact
uses: actions/upload-artifact@v5.0.0
Expand Down Expand Up @@ -229,7 +229,7 @@ jobs:

- name: Test packages
run: |
make -f test-makefile BUILD_ARCH=${{ matrix.arch }} BUILD_NUMBER_TAIL=${{ github.run_number }}
make -f test-makefile BUILD_ARCH=${{ matrix.arch }} BUILD_NUMBER_TAIL=${{ github.run_number }} PRERELEASE=${{ inputs.is-pre-release }}

PushPackages-Macos:
needs: TestPackages-MacOS
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,17 +163,21 @@ jobs:

- name: Build bundle
run: |
make -f generate-projects-makefile generate-final-bundle BUILD_NUMBER_TAIL=${{ github.run_number }}
make -f generate-projects-makefile generate-final-bundle PRERELEASE=${{ env.IS_PRE_RELEASE }} BUILD_NUMBER_TAIL=${{ github.run_number }}
make -f publish-makefile pack-bundle-final PRERELEASE=${{ env.IS_PRE_RELEASE }} BUILD_NUMBER_TAIL=${{ github.run_number }}
echo "GDAL_VERSION=$(make -f publish-makefile get-gdal-version)" >> $GITHUB_ENV
echo "PACKAGES_VERSION=$(make -f publish-makefile get-package-version BUILD_NUMBER_TAIL=${{ github.run_number }})" >> $GITHUB_ENV
echo "PACKAGES_VERSION=$(make -f publish-makefile get-package-version PRERELEASE=${{ env.IS_PRE_RELEASE }} BUILD_NUMBER_TAIL=${{ github.run_number }})" >> $GITHUB_ENV

- name: Run tests from nuget packages
env:
TEST_PROJECT: ${{ github.workspace }}/tests/MaxRev.Gdal.Core.Tests.XUnit/MaxRev.Gdal.Core.Tests.XUnit.csproj
run: |
dotnet add ${{ env.TEST_PROJECT }} package MaxRev.Gdal.Universal --source local.ci --no-restore
dotnet remove ${{ env.TEST_PROJECT }} package MaxRev.Gdal.Core || echo "no packages to remove"
for project in \
"${{ github.workspace }}/tests/MaxRev.Gdal.Core.Tests.XUnit/MaxRev.Gdal.Core.Tests.XUnit.csproj" \
"${{ github.workspace }}/tests/MaxRev.Gdal.Core.Tests/MaxRev.Gdal.Core.Tests.csproj" \
"${{ github.workspace }}/tests/MaxRev.Gdal.Core.Tests.AzureFunctions/MaxRev.Gdal.Core.Tests.AzureFunctions.csproj"; do
dotnet add "$project" package MaxRev.Gdal.Universal --version ${{ env.PACKAGES_VERSION }} --source local.ci --no-restore
done
dotnet restore --ignore-failed-sources ${{ env.TEST_PROJECT }}
dotnet test --no-restore ${{ env.TEST_PROJECT }}

Expand Down
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,14 @@ The package configuration is marked as **minimal**. That means you don't have to

Drivers included PROJ, GEOS, and more than 200 other drivers.

The native dependency definition is shared across platforms through the manifest bundle in `shared/`:

- `shared/vcpkg.json`
- `shared/vcpkg-configuration.json`
- `shared/vcpkg-lock.json`

Unix, macOS, and Windows build wrappers all consume that same manifest authority instead of keeping separate package lists per platform. That keeps driver selection and dependency versions aligned between local builds and CI.

To view the complete list of drivers, see: [tests/gdal-formats/supported_drivers.md](tests/gdal-formats/supported_drivers.md).


Expand All @@ -259,6 +267,12 @@ Each runtime has to be build separately, but this can be done concurrently as th

To make everything work smoothly, each configuration targets the same drivers and their versions, respectively.

CI now layers cache reuse on top of those per-platform build contexts:

- Linux reuses Docker Buildx cache scopes per architecture.
- macOS restores both VCPKG archives and build outputs, then reuses build-state markers on cache-warm runs.
- Windows restores VCPKG archives separately from build outputs so cache-warm runs can reuse VCPKG, PROJ, and GDAL artifacts without recompiling from scratch.

To start building for a specific runtime, see the **README.md** in a respective directory.

## FAQ
Expand Down Expand Up @@ -331,4 +345,4 @@ As the maintainer of this repository, I would like to express my heartfelt thank

[<img height="50" alt="Verge Agriculture Inc." src="https://github.com/user-attachments/assets/c5fe571e-b920-48c5-af31-840b9cc48c4a" />](https://vergeag.com/)
&nbsp;&nbsp;&nbsp;
[<img height="50" alt="StatMap Ltd" src="https://github.com/user-attachments/assets/85701812-9f7b-46f7-849b-11d1edcc2bf8" />](https://www.evo.statmap.co.uk/)
[<img height="50" alt="StatMap Ltd" src="https://github.com/user-attachments/assets/85701812-9f7b-46f7-849b-11d1edcc2bf8" />](https://www.evo.statmap.co.uk/)
12 changes: 10 additions & 2 deletions osx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@ There two types of builds **arm64** (Apple Silicon M1 & M2 chipsets) and **x86_6
This build was compiled using a `ubuntu-24.04-arm` runner (arm64).

### **2. Check for required libraries**
**VPKG** will install all requirements defined in `shared/GdalCore.opt` file. Latest versions, no collisions with other dynamic libraries.
**VCPKG** will install all requirements defined in the shared manifest bundle and `../shared/GdalCore.opt`. Latest versions, no collisions with other dynamic libraries.

The macOS build consumes the same manifest authority as the other platforms:

- `../shared/vcpkg.json`
- `../shared/vcpkg-configuration.json`
- `../shared/vcpkg-lock.json`

### **3. Compiling**

Expand All @@ -45,6 +51,8 @@ make -f publish-makefile pack BUILD_ARCH=arm64
make -f test-makefile test BUILD_ARCH=arm64
```

CI cache-warm runs restore the macOS VCPKG archive cache and build outputs per runner/architecture, then reuse build-state markers when the manifest inputs still match.

### **How to check dependencies:**
Run tests from the latest step. If everything loads correctly - you're good.

Expand Down Expand Up @@ -87,4 +95,4 @@ Usage of this library in newer macOS versions with enabled Gatekeeper requires a
- You can build the library and sign it with your own Apple Developer ID. This way, you can ensure that the libraries are trusted by macOS.
- To do this, clone the repository and follow the build instructions. After building, but before creating a nuget package, use the `codesign` command to sign the libraries with your Developer ID.

Note: The manual approach in your build script is generally safer than advising end users to bypass security measures.
Note: The manual approach in your build script is generally safer than advising end users to bypass security measures.
4 changes: 2 additions & 2 deletions shared/GdalCore.opt
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ BUILD_NUMBER_TAIL=100
### build (drivers) root
BUILD_ROOT=$(ROOT_DIR)/build-$(BASE_RID)

# May 4, 2026
GDAL_VERSION=3.12.4
# May 8, 2026
GDAL_VERSION=3.13.0
GDAL_ROOT=$(BUILD_ROOT)/gdal-source
GDAL_REPO=https://github.com/OSGeo/gdal.git
GDAL_COMMIT_VER=v$(GDAL_VERSION)
Expand Down
16 changes: 13 additions & 3 deletions unix/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,16 @@ https://learn.microsoft.com/en-us/dotnet/core/install/linux-debian#debian-11.
### 4. **Installing libraries**.
Libraries can be installed in two ways.

1. **VPKG** - recommended. Latest versions, no collisions with other dynamic libraries.
2. **APT package manager** - if vcpkg does not provide any. Can create conficts with other library dependencies.
1. **VCPKG** - recommended. Latest versions, no collisions with other dynamic libraries.
2. **APT package manager** - if vcpkg does not provide any. Can create conflicts with other library dependencies.

The Unix build uses the shared manifest bundle in `../shared/`:

- `../shared/vcpkg.json`
- `../shared/vcpkg-configuration.json`
- `../shared/vcpkg-lock.json`

That same bundle is also used by macOS and Windows so the dependency graph stays aligned across all runtimes.

Each library enables one driver
```bash
Expand Down Expand Up @@ -68,6 +76,8 @@ make -f publish-makefile pack BUILD_ARCH=arm64
make -f test-makefile test BUILD_ARCH=arm64
```

On CI, cache-warm runs reuse both the VCPKG binary cache and the Docker Buildx layer cache for the selected architecture.

### 6. **How to check dependencies:**
Run tests. If everything loads correctly - you're good.

Expand All @@ -80,4 +90,4 @@ readelf -d "/root/gdal.netcore/build-unix/gdal-build/lib/libgdal.so" | grep NEED
Or using **ldd**:
```bash
ldd "/root/gdal.netcore/build-unix/gdal-build/lib/libgdal.so"
```
```
18 changes: 10 additions & 8 deletions unix/publish-makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ all: pack
generate-projects:
$(MAKE) -f ../unix/generate-projects-makefile RUNTIME_PACKAGE_PARTIAL=${RUNTIME_PACKAGE_PARTIAL} CAT_NAME=$(CAT_NAME) GEOS_VERSION=$(GEOS_VERSION) PACKAGE_BUILD_NUMBER=$(PACKAGE_BUILD_NUMBER)

update-targets-no-ver:
update-targets-bundle-final:
cd $(PACKAGE_BUILD_ROOT) && \
dotnet add $(RUNTIME_PROJECT_BUNDLE_FINAL) package MaxRev.Gdal.$(RUNTIME_PACKAGE_PARTIAL).Minimal$(BUILD_ARCH_SUFFIX) -s $(NUGET_DIR) --no-restore
dotnet add $(RUNTIME_PROJECT_BUNDLE_FINAL) package MaxRev.Gdal.$(RUNTIME_PACKAGE_PARTIAL).Minimal$(BUILD_ARCH_SUFFIX) \
--no-restore -v "$(GDAL_VERSION)$(VERSION_SEP)$(PACKAGE_BUILD_NUMBER)" -s $(NUGET_DIR)


update-targets:
Expand All @@ -51,14 +52,15 @@ pack-bundle-only: update-targets
dotnet pack -c Release -o $(NUGET_DIR) --ignore-failed-sources $(RUNTIME_PROJECT_BUNDLE_$(CAT_NAME_UP)_FINAL)

pack-bundle-final:
$(MAKE) -f $(THIS_FILE) update-targets-no-ver CAT_NAME=unix RUNTIME_PACKAGE_PARTIAL=LinuxRuntime BUILD_ARCH=x64
$(MAKE) -f $(THIS_FILE) update-targets-no-ver CAT_NAME=unix RUNTIME_PACKAGE_PARTIAL=LinuxRuntime BUILD_ARCH=arm64
$(MAKE) -f $(THIS_FILE) update-targets-no-ver CAT_NAME=osx RUNTIME_PACKAGE_PARTIAL=MacosRuntime BUILD_ARCH=x64
$(MAKE) -f $(THIS_FILE) update-targets-no-ver CAT_NAME=osx RUNTIME_PACKAGE_PARTIAL=MacosRuntime BUILD_ARCH=arm64
$(MAKE) -f $(THIS_FILE) update-targets-no-ver CAT_NAME=win BUILD_ARCH_SUFFIX= RUNTIME_PACKAGE_PARTIAL=WindowsRuntime
$(MAKE) -f $(THIS_FILE) update-targets-bundle-final CAT_NAME=unix RUNTIME_PACKAGE_PARTIAL=LinuxRuntime BUILD_ARCH=x64
$(MAKE) -f $(THIS_FILE) update-targets-bundle-final CAT_NAME=unix RUNTIME_PACKAGE_PARTIAL=LinuxRuntime BUILD_ARCH=arm64
$(MAKE) -f $(THIS_FILE) update-targets-bundle-final CAT_NAME=osx RUNTIME_PACKAGE_PARTIAL=MacosRuntime BUILD_ARCH=x64
$(MAKE) -f $(THIS_FILE) update-targets-bundle-final CAT_NAME=osx RUNTIME_PACKAGE_PARTIAL=MacosRuntime BUILD_ARCH=arm64
$(MAKE) -f $(THIS_FILE) update-targets-bundle-final CAT_NAME=win BUILD_ARCH_SUFFIX= RUNTIME_PACKAGE_PARTIAL=WindowsRuntime

cd $(PACKAGE_BUILD_ROOT) && \
dotnet add $(RUNTIME_PROJECT_BUNDLE_FINAL) package MaxRev.Gdal.Core -s $(NUGET_DIR) --no-restore
dotnet add $(RUNTIME_PROJECT_BUNDLE_FINAL) package MaxRev.Gdal.Core \
--no-restore -v "$(GDAL_VERSION)$(VERSION_SEP)$(PACKAGE_BUILD_NUMBER)" -s $(NUGET_DIR)

dotnet pack -c Release -o $(NUGET_DIR) --ignore-failed-sources $(RUNTIME_PROJECT_BUNDLE_FINAL)

Expand Down
10 changes: 9 additions & 1 deletion win/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ In this folder contains Powershell and NMake scripts for building Windows runtim

2. [.NET Core SDK](https://dotnet.microsoft.com/en-us/download/dotnet/7.0) and [Nuget.exe](https://docs.microsoft.com/en-us/nuget/install-nuget-client-tools) - for building and publishing packages respectively.

The Windows build uses the same shared VCPKG manifest authority as Unix and macOS:

- `../shared/vcpkg.json`
- `../shared/vcpkg-configuration.json`
- `../shared/vcpkg-lock.json`

### Building: (in PowerShell)

1. Call `./install.ps1` to install all required packages and tools. <br/>
Expand All @@ -36,6 +42,8 @@ Possible options:
```
This will install all required VCPKG packages and tools, build GDAL and PROJ, and build runtime and core packages.

On CI, cache-warm runs restore the VCPKG archive cache separately from the Windows build-output cache. When the manifest/build inputs match, the build-state stamps allow the workflow to reuse cached VCPKG, PROJ, and GDAL outputs instead of recompiling them from scratch.

2. Call `./test.ps1` to test runtime and core packages. <br/>
If everything runs smoothly, you can use a local nuget feed to include packages in your project.

Expand All @@ -44,4 +52,4 @@ Use **dumpbin** or [**dependency walker**](https://www.dependencywalker.com/) to

Have fun)

Contact me: [Telegram - MaxRev](http://t.me/maxrev)
Contact me: [Telegram - MaxRev](http://t.me/maxrev)
Loading