diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 46321924..3ecf7e80 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -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 @@ -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 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1494e1a7..9024f294 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 }} diff --git a/README.md b/README.md index 6089357e..b607b962 100644 --- a/README.md +++ b/README.md @@ -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). @@ -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 @@ -331,4 +345,4 @@ As the maintainer of this repository, I would like to express my heartfelt thank [Verge Agriculture Inc.](https://vergeag.com/)     -[StatMap Ltd](https://www.evo.statmap.co.uk/) \ No newline at end of file +[StatMap Ltd](https://www.evo.statmap.co.uk/) diff --git a/osx/README.md b/osx/README.md index 60934d96..1cd4a714 100644 --- a/osx/README.md +++ b/osx/README.md @@ -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** @@ -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. @@ -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. \ No newline at end of file +Note: The manual approach in your build script is generally safer than advising end users to bypass security measures. diff --git a/shared/GdalCore.opt b/shared/GdalCore.opt index 908c40b3..c857bd28 100644 --- a/shared/GdalCore.opt +++ b/shared/GdalCore.opt @@ -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) diff --git a/unix/README.md b/unix/README.md index 70b90b52..81f05e7b 100644 --- a/unix/README.md +++ b/unix/README.md @@ -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 @@ -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. @@ -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" -``` \ No newline at end of file +``` diff --git a/unix/publish-makefile b/unix/publish-makefile index ab10c7b6..b59f0240 100644 --- a/unix/publish-makefile +++ b/unix/publish-makefile @@ -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: @@ -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) diff --git a/win/README.md b/win/README.md index bc691356..fc384e08 100644 --- a/win/README.md +++ b/win/README.md @@ -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.
@@ -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.
If everything runs smoothly, you can use a local nuget feed to include packages in your project. @@ -44,4 +52,4 @@ Use **dumpbin** or [**dependency walker**](https://www.dependencywalker.com/) to Have fun) -Contact me: [Telegram - MaxRev](http://t.me/maxrev) \ No newline at end of file +Contact me: [Telegram - MaxRev](http://t.me/maxrev)