Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
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
13 changes: 8 additions & 5 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,14 @@ jobs:
if: ${{ ! inputs.skip }}
strategy:
matrix:
os: [macos-14, macos-13]
os: [macos-14, macos-15-intel]
include:
- os: macos-14
arch: arm64
- os: macos-13
xcode-version: 15.2
- os: macos-15-intel
arch: x64
xcode-version: 16.0

runs-on: ${{ matrix.os }}
defaults:
Expand All @@ -49,8 +51,9 @@ jobs:
api-user-github: ${{ secrets.API_USER_GITHUB }}
api-user-nuget: ${{ secrets.API_USER_NUGET }}

# https://github.com/actions/runner-images/blob/main/images/macos/macos-15-Readme.md#xcode
- name: Select Xcode version
run: sudo xcode-select -s '/Applications/Xcode_15.2.app/Contents/Developer'
run: sudo xcode-select -s '/Applications/Xcode_${{ matrix.xcode-version }}.app'

- name: Restore cached packages
id: build-packages-cache-restore
Expand Down Expand Up @@ -132,11 +135,11 @@ jobs:
TestPackages-MacOS:
strategy:
matrix:
os: [macos-14, macos-13]
os: [macos-14, macos-15-intel]
include:
- os: macos-14
arch: arm64
- os: macos-13
- os: macos-15-intel
arch: x64

needs: BuildNugetPackages-MacOS
Expand Down
62 changes: 54 additions & 8 deletions .github/workflows/unix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,23 +54,26 @@ jobs:
api-user-nuget: ${{ secrets.API_USER_NUGET }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
uses: docker/setup-qemu-action@v3.6.0

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v3.11.1

- name: Cache restore
uses: actions/cache@v4
with:
path: |
.dotnet/
ci/cache/
${{ github.workspace }}/.dotnet/
${{ github.workspace }}/ci/cache/
key: ${{ matrix.os }}-buildx-${{ matrix.arch }}-${{ github.run_id }}
restore-keys: |
${{ matrix.os }}-buildx-${{ matrix.arch }}-
- name: Ensure cache directories
run: |
mkdir -p ${{ github.workspace }}/ci/cache/

- name: Log in to the Container registry
uses: docker/login-action@v3
uses: docker/login-action@v3.5.0
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand All @@ -90,11 +93,13 @@ jobs:
latest

- name: Build and push on GH runner
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6.18.0
if: ${{ !contains(matrix.actions-runner, 'self-hosted') }}
continue-on-error: true
id: build-gh
with:
push: true
context: .
context: ${{ github.workspace }}
file: ci/Dockerfile.unix
platforms: ${{ matrix.os }}
build-args: |
Expand All @@ -104,8 +109,10 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}

- name: Build and push on local runner
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6.18.0
if: ${{ contains(matrix.actions-runner, 'self-hosted') }}
continue-on-error: true
id: build-local
with:
load: true
push: false
Expand All @@ -119,6 +126,45 @@ jobs:
DOTNET_INSTALL_DIR=/build/ci/cache/.dotnet
VCPKG_DEFAULT_BINARY_CACHE=/build/ci/cache/vcpkg-archives/

- name: Extract logs on build failure
if: ${{ (steps.build-gh.outcome == 'failure') || (steps.build-local.outcome == 'failure') }}
run: |
echo "Build failed, extracting vcpkg logs..."

# Extract logs using logsonly stage
docker buildx build \
--platform=${{ matrix.os }} \
--file=${{ github.workspace }}/ci/Dockerfile.unix \
--target=logsonly \
--output=type=local,dest=./build-output \
--build-arg BUILD_NUMBER_TAIL=${{ github.run_number }} \
--build-arg PRERELEASE=${{ inputs.is-pre-release }} \
--build-arg DOTNET_INSTALL_DIR=/build/ci/cache/.dotnet \
--build-arg VCPKG_DEFAULT_BINARY_CACHE=/build/ci/cache/vcpkg-archives/ \
${{ github.workspace }} || echo "Unable to extract logs"

# Package logs for upload
if [ -d "./build-output/logs" ]; then
tar -czf ${{ github.workspace }}/vcpkg-buildtrees-${{ matrix.arch }}.tar.gz -C ./build-output/logs .
else
mkdir -p empty && echo "No vcpkg logs extracted" > empty/README.txt
tar -czf ${{ github.workspace }}/vcpkg-buildtrees-${{ matrix.arch }}.tar.gz -C empty .
fi

- name: Fail job if build failed
if: ${{ (steps.build-gh.outcome == 'failure') || (steps.build-local.outcome == 'failure') }}
run: |
echo "Docker build failed"
exit 1

- name: Upload vcpkg logs on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: vcpkg-logs-${{ matrix.arch }}
path: ${{ github.workspace }}/vcpkg-buildtrees-${{ matrix.arch }}.tar.gz
retention-days: 3

- name: Extract artifacts
run: |
chmod +x '${{ github.workspace }}/ci/extract-container-artifacts.sh'
Expand Down
21 changes: 17 additions & 4 deletions ci/Dockerfile.unix
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ RUN apt-get update && apt-get install -y \
# install cmake latest
RUN pip install cmake --upgrade

# load cache from previous build
COPY ci/cache*/dotnet* /usr/share/dotnet/

ARG DOTNET_VERSION=9.0
ARG DOTNET_INSTALL_DIR=/build/ci/cache/.dotnet

Expand Down Expand Up @@ -77,8 +74,24 @@ RUN set -a && . /tmp/gdal-netcore-env && set +a; \
make -f vcpkg-makefile $(cat /tmp/gdal-netcore-arch) install_vcpkg
COPY shared /build/shared
COPY unix /build/unix

RUN set -a && . /tmp/gdal-netcore-env && set +a; \
make -f vcpkg-makefile $(cat /tmp/gdal-netcore-arch)
make -f vcpkg-makefile $(cat /tmp/gdal-netcore-arch) || { \
mkdir -p /logs; \
# Copy vcpkg issue body if it exists, otherwise create a basic error log
if [ -f /build/build-unix/vcpkg/installed/vcpkg/issue_body.md ]; then \
cp /build/build-unix/vcpkg/installed/vcpkg/issue_body.md /logs/vcpkg-issue-body.md; \
else \
echo "vcpkg build failed but no issue_body.md found" > /logs/vcpkg-build-failed.txt; \
find /build/build-unix/vcpkg -name "issue_body.md" > /logs/issue-body-search.txt 2>/dev/null || true; \
fi; \
exit 1; \
}

# Create minimal stage with only logs for extraction
FROM alpine:latest AS logsonly
COPY --from=gdalbuild /logs /logs

RUN set -a && . /tmp/gdal-netcore-env && set +a; \
make -f gdal-makefile proj $(cat /tmp/gdal-netcore-arch)
RUN set -a && . /tmp/gdal-netcore-env && set +a; \
Expand Down
4 changes: 2 additions & 2 deletions ci/Dockerfile.vcpkg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# GDAL.NETCORE Builder - A lightweight test image for vcpkg package installations

FROM --platform=$TARGETPLATFORM debian:11 as base
FROM --platform=$TARGETPLATFORM debian:11 AS base

RUN apt-get update && apt-get install -y \
build-essential gnupg \
Expand Down Expand Up @@ -41,4 +41,4 @@ set(VCPKG_CMAKE_SYSTEM_NAME Linux)" > custom-triplets/${BUILD_ARCH}-linux.cmake

RUN cat custom-triplets/${BUILD_ARCH}-linux.cmake

RUN ./vcpkg install hdf5:${BUILD_ARCH}-linux --overlay-triplets=./custom-triplets --editable
RUN ./vcpkg install "tiff[core,cxx,jpeg,lzma,tools,webp,zip,zstd]:${BUILD_ARCH}-linux-dynamic" --overlay-triplets=./custom-triplets --editable
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=$(ROOTDIR_)/build-$(BASE_RID)

# Jul 12, 2025
GDAL_VERSION=3.11.3
# Sep 11, 2025
GDAL_VERSION=3.11.4
GDAL_ROOT=$(BUILD_ROOT)/gdal-source
GDAL_REPO=https://github.com/OSGeo/gdal.git
GDAL_COMMIT_VER=v$(GDAL_VERSION)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<_FunctionsSkipCleanOutput>true</_FunctionsSkipCleanOutput>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MaxRev.Gdal.Universal" Version="3.10.1.*" />
<PackageReference Include="MaxRev.Gdal.Universal" Version="3.11.*" />
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="4.1.3" />
</ItemGroup>
<ItemGroup>
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.Universal" Version="3.10.1.*" />
<PackageReference Include="MaxRev.Gdal.Universal" Version="3.11.*" />
<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
2 changes: 1 addition & 1 deletion tests/MaxRev.Gdal.Core.Tests/MaxRev.Gdal.Core.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<RootNamespace>MaxRev.Gdal.Core.Tests</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MaxRev.Gdal.Universal" Version="3.10.1.*" />
<PackageReference Include="MaxRev.Gdal.Universal" Version="3.11.*" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.17.0" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion win/partials.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ function Build-Gdal {
# -DOpenEXR_LIBRARY="$env:VCPKG_INSTALLED\lib\OpenEXR-3_2.lib" `
# -DOpenEXR_INCLUDE_DIR="$env:VCPKG_INSTALLED\include\OpenEXR" `
# -DOpenEXR_UTIL_LIBRARY="$env:VCPKG_INSTALLED\lib\OpenEXRUtil-3_2.lib" `
# -DOpenEXR_HALF_LIBRARY="$env:VCPKG_INSTALLED\lib\Imath-3_1.lib" `
# -DOpenEXR_HALF_LIBRARY="$env:VCPKG_INSTALLED\lib\Imath-3_2.lib" `
# -DOpenEXR_IEX_LIBRARY="$env:VCPKG_INSTALLED\lib\Iex-3_2.lib" `
cmake -G $env:VS_VERSION -A $env:CMAKE_ARCHITECTURE "$env:GDAL_SOURCE" `
$env:CMAKE_INSTALL_PREFIX -DCMAKE_BUILD_TYPE=Release -Wno-dev `
Expand Down
Loading