Skip to content

Commit b71ef94

Browse files
authored
GDAL 3.9.1 (#136)
* Bump versions * GDAL tag changed * CI fixes * Ensure vcpkg installs package. Debugging cache * Adjust cache for CI * Set cache restore keys for CI * Fix warnings in Dockerfile * Collect deps for windows * Fixed DLL packaging inconsistency
1 parent 4428f2c commit b71ef94

16 files changed

+210
-50
lines changed

.github/workflows/macos.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ jobs:
5353
path: |
5454
.dotnet/
5555
vcpkg-archives/
56-
key: ${{ matrix.os }}-packages-${{ matrix.arch }}
56+
key: ${{ matrix.os }}-packages-${{ matrix.arch }}-${{ github.run_id }}
57+
restore-keys: |
58+
${{ matrix.os }}-packages-${{ matrix.arch }}-
5759
5860
- name: Set up Homebrew
5961
id: set-up-homebrew

.github/workflows/unix.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,11 @@ jobs:
5757
uses: actions/cache@v4
5858
with:
5959
path: |
60-
.dotnet
60+
.dotnet/
6161
ci/cache/
62-
key: ${{ matrix.os }}-buildx-${{ matrix.arch }}
62+
key: ${{ matrix.os }}-buildx-${{ matrix.arch }}-${{ github.run_id }}
63+
restore-keys: |
64+
${{ matrix.os }}-buildx-${{ matrix.arch }}-
6365
6466
- name: Log in to the Container registry
6567
uses: docker/login-action@v3

.github/workflows/windows.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ jobs:
4343
uses: actions/cache@v4
4444
with:
4545
path: |
46-
.dotnet
46+
.dotnet/
4747
vcpkg-archives/
48-
key: ${{ runner.os }}-buildx-${{ matrix.os }}
48+
key: ${{ runner.os }}-buildx-${{ matrix.os }}-${{ github.run_id }}
4949
restore-keys: |
5050
${{ runner.os }}-buildx-
5151
@@ -75,7 +75,7 @@ jobs:
7575
with:
7676
name: formats-win
7777
path: |
78-
tests/gdal-formats/*.txt
78+
tests/gdal-formats/formats-win/*.txt
7979
overwrite: true
8080

8181
- name: Store packages as artifact

ci/Dockerfile.unix

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Builds GDAL.NETCORE on Linux
2-
FROM --platform=$TARGETPLATFORM debian:11 as base
2+
FROM --platform=$TARGETPLATFORM debian:11 AS base
33
LABEL org.opencontainers.image.source=https://github.com/MaxRev-Dev/gdal.netcore
44
LABEL org.opencontainers.image.description="GDAL.NETCORE unix build image"
55
LABEL org.opencontainers.image.licenses=MIT
@@ -55,7 +55,7 @@ RUN if [ $BUILDPLATFORM = "linux/arm64" ]; \
5555

5656
RUN echo "DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1" >> /tmp/gdal-netcore-env;
5757

58-
FROM --platform=$TARGETPLATFORM base as gdalbuild
58+
FROM --platform=$TARGETPLATFORM base AS gdalbuild
5959
WORKDIR /build/unix
6060
ARG VCPKG_DEFAULT_BINARY_CACHE=/build/ci/cache/vcpkg-archives/
6161
RUN mkdir -p $VCPKG_DEFAULT_BINARY_CACHE
@@ -69,6 +69,8 @@ COPY unix/gdal-makefile /build/unix/
6969
COPY ci/cache*/vcpkg* /build/ci/cache/vcpkg-archives/
7070
COPY ci/cache*/build-unix* /build/build-unix/
7171

72+
RUN ls -la /build/ci/cache/vcpkg-archives/
73+
7274
RUN set -a && . /tmp/gdal-netcore-env && set +a; \
7375
make -f gdal-makefile $(cat /tmp/gdal-netcore-arch) init_gdal init_proj
7476
RUN set -a && . /tmp/gdal-netcore-env && set +a; \
@@ -95,7 +97,7 @@ RUN rm -rf /build/nuget && mkdir -p /build/nuget
9597
RUN set -a && . /tmp/gdal-netcore-env && set +a; \
9698
make -f publish-makefile pack $(cat /tmp/gdal-netcore-arch) BUILD_NUMBER_TAIL=$BUILD_NUMBER_TAIL PRERELEASE=$PRERELEASE
9799

98-
FROM --platform=$TARGETPLATFORM alpine as final
100+
FROM --platform=$TARGETPLATFORM alpine AS final
99101
COPY --from=base /usr/share/dotnet /usr/share/dotnet
100102
# copy cache from build
101103
COPY --from=gdalbuild /build/build-unix /build/build-unix

ci/Dockerfile.vcpkg

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,17 @@ RUN apt-get update && apt-get install -y \
1717
RUN pip install cmake --upgrade
1818

1919
# vcpkg repo (change to your local clone of vcpkg)
20-
COPY build-unix/vcpkg /vcpkg
20+
COPY ci/cache*/vcpkg-archives* /vcpkg-archives/
21+
COPY ci/cache*/build*/vcpkg* /vcpkg/
22+
RUN ls -la /vcpkg-archives/
23+
RUN ls -la /vcpkg/
24+
ARG VCPKG_DEFAULT_BINARY_CACHE=/vcpkg-archives/
2125

2226
WORKDIR /vcpkg
2327

2428
# default build args
25-
ARG BUILD_ARCH=x64
26-
ARG LINKAGE=static
29+
ARG BUILD_ARCH=arm64
30+
ARG LINKAGE=dynamic
2731

2832
ENV VCPKG_FORCE_SYSTEM_BINARIES=1
2933
RUN ./bootstrap-vcpkg.sh
@@ -37,4 +41,4 @@ set(VCPKG_CMAKE_SYSTEM_NAME Linux)" > custom-triplets/${BUILD_ARCH}-linux.cmake
3741

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

40-
RUN ./vcpkg install openssl:${BUILD_ARCH}-linux --overlay-triplets=./custom-triplets --editable
44+
RUN ./vcpkg install hdf5:${BUILD_ARCH}-linux --overlay-triplets=./custom-triplets --editable

osx/before-install.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
set -e
44

5-
# requirements for CI runner
5+
# requirements for CI runner. Removed python3 as it is already installed and causes symlink issues
66
brew install make pkg-config autoconf automake \
7-
autoconf-archive swig libtool dylibbundler gsed python3 pipx
7+
autoconf-archive swig libtool dylibbundler gsed pipx
8+
9+
# issue with libtool on macOS https://github.com/Homebrew/homebrew-core/issues/180040
10+
brew reinstall libtool

osx/vcpkg-makefile

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,24 @@ patch_vcpkg_triplets:
107107
@echo "$$VCPKG_TRIPLET_OSX_STATIC_RELEASE" > $(VCPKG_ROOT)/custom-triplets/$(VCPKG_RID).cmake
108108

109109
install_packages:
110-
@$(foreach pack,$(VCPKG_REQUIRE_OSX),MAKELEVEL=0 $(VCPKG) install $(pack):$(VCPKG_RID) $(VCPKG_PARAMS_INSTALL);)
111-
@$(foreach pack,$(VCPKG_REQUIRE_OSX_DYNAMIC), MAKELEVEL=0 $(VCPKG) install $(pack):$(VCPKG_RID)-dynamic $(VCPKG_PARAMS_INSTALL);)
110+
@for pack in $(VCPKG_REQUIRE_OSX); do \
111+
{ (MAKELEVEL=0 $(VCPKG) install $$pack:$(VCPKG_RID) $(VCPKG_PARAMS_INSTALL) $(VCPKG_ENSURE_INSTALLED)) || \
112+
(if [ $$? -ne 0 ]; then \
113+
echo "Error occurred while installing $$pack"; \
114+
cat $(VCPKG_ROOT)/buildtrees/$$pack/*err.log; \
115+
cat $(VCPKG_ROOT)/buildtrees/$$pack/*out.log; \
116+
fi; exit 1) \
117+
}; \
118+
done
119+
@for pack in $(VCPKG_REQUIRE_OSX_DYNAMIC); do \
120+
{ (MAKELEVEL=0 $(VCPKG) install $$pack:$(VCPKG_RID)-dynamic $(VCPKG_PARAMS_INSTALL) $(VCPKG_ENSURE_INSTALLED)) || \
121+
(if [ $$? -ne 0 ]; then \
122+
echo "Error occurred while installing $$pack"; \
123+
cat $(VCPKG_ROOT)/buildtrees/$$pack/*err.log; \
124+
cat $(VCPKG_ROOT)/buildtrees/$$pack/*out.log; \
125+
fi; exit 1) \
126+
}; \
127+
done
112128

113129
remove_packages:
114130
@$(foreach pack,$(VCPKG_REQUIRE_OSX), $(VCPKG) remove $(pack):$(VCPKG_RID) $(VCPKG_PARAMS_REMOVE);)

shared/GdalCore.opt

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ BUILD_NUMBER_TAIL=100
99
### build (drivers) root
1010
BUILD_ROOT=$(ROOTDIR_)/build-$(BASE_RID)
1111

12-
# May 10, 2024
13-
GDAL_VERSION=3.9.0
12+
# Jun 19, 2024
13+
GDAL_VERSION=3.9.1
1414
GDAL_ROOT=$(BUILD_ROOT)/gdal-source
1515
GDAL_REPO=https://github.com/OSGeo/gdal.git
16-
GDAL_COMMIT_VER=v$(GDAL_VERSION)
16+
GDAL_COMMIT_VER=v$(GDAL_VERSION)RC1
1717

18-
# Mar 1, 2024
19-
PROJ_VERSION=9.4.0
18+
# Jun 1, 2024
19+
PROJ_VERSION=9.4.1
2020
PROJ_ROOT=$(BUILD_ROOT)/proj-source
2121
PROJ_REPO=https://github.com/OSGeo/PROJ.git
2222
PROJ_COMMIT_VER=$(PROJ_VERSION)
@@ -25,11 +25,11 @@ PROJ_COMMIT_VER=$(PROJ_VERSION)
2525

2626
VCPKG_ROOT=$(BUILD_ROOT)/vcpkg
2727
VCPKG_REPO=https://github.com/microsoft/vcpkg.git
28-
VCPKG_COMMIT_VER=2024.04.26
28+
VCPKG_COMMIT_VER=2024.07.12
2929

3030
# base requirements for both runtimes
3131
VCPKG_REQUIRE=geos "tiff[zstd,zip,jpeg,tools,lzma,cxx,webp]" curl
32-
VCPKG_REQUIRE_DYNAMIC=openssl zlib expat xerces-c zlib libxml2 libpq openjpeg cfitsio "openexr[tools]" unixodbc libwebp giflib "hdf5[cpp]" pcre freexl libkml libpng "libjxl[tools]" netcdf-c "libgeotiff[tools]" "sqlite3[tool,rtree]" cryptopp blosc
32+
VCPKG_REQUIRE_DYNAMIC=unixodbc openssl zlib expat xerces-c zlib libxml2 libpq openjpeg cfitsio "openexr[tools]" libwebp giflib hdf5 pcre freexl libkml libpng "libjxl[tools]" netcdf-c "libgeotiff[tools]" "sqlite3[tool,rtree]" cryptopp blosc
3333
# windows runtime now depends on GisInternals SDK
3434
# we have nothing to install except custom geos and proj
3535
VCPKG_REQUIRE_WIN=$(VCPKG_REQUIRE) "sqlite3[tool,rtree]" libiconv lz4 liblzma "libjxl[tools]" blosc cryptopp
@@ -43,7 +43,7 @@ VCPKG_REQUIRE_UNIX_DYNAMIC=$(VCPKG_REQUIRE) $(VCPKG_REQUIRE_DYNAMIC)
4343
# osx requires the same libs as linux
4444
# sqlite static is required only to build proj.db
4545
VCPKG_REQUIRE_OSX=$(VCPKG_REQUIRE_UNIX) "sqlite3[tool,rtree]"
46-
VCPKG_REQUIRE_OSX_DYNAMIC=$(VCPKG_REQUIRE) $(VCPKG_REQUIRE_DYNAMIC) netcdf-c libmysql
46+
VCPKG_REQUIRE_OSX_DYNAMIC=$(VCPKG_REQUIRE_DYNAMIC) $(VCPKG_REQUIRE) netcdf-c libmysql
4747

4848
VCPKG_CLEANUP=buildtrees downloads packages installed
4949

@@ -127,4 +127,5 @@ RUNTIME_TARGET_BUNDLE_FINAL_CORE=$(PACKAGE_BUILD_ROOT)/$(PACKAGE_NAME_CORE).targ
127127
GIT=git
128128
GIT_CLEAN=$(GIT) clean -fqdx
129129
GIT_CLONE_DEPTH=--depth=1
130+
VCPKG_ENSURE_INSTALLED=|| exit 1
130131
# --------------------- !CONFIG! --------------------

unix/vcpkg-makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ patch_vcpkg_triplets:
105105
@echo "$$VCPKG_TRIPLET_LINUX_STATIC_RELEASE" > $(VCPKG_ROOT)/custom-triplets/$(VCPKG_RID).cmake
106106

107107
install_packages:
108-
@$(foreach pack,$(VCPKG_REQUIRE_UNIX),MAKELEVEL=0 $(VCPKG) install $(pack):$(VCPKG_RID) $(VCPKG_PARAMS_INSTALL);)
109-
@$(foreach pack,$(VCPKG_REQUIRE_UNIX_DYNAMIC),MAKELEVEL=0 $(VCPKG) install $(pack):$(VCPKG_RID)-dynamic $(VCPKG_PARAMS_INSTALL);)
108+
@$(foreach pack,$(VCPKG_REQUIRE_UNIX),MAKELEVEL=0 $(VCPKG) install $(pack):$(VCPKG_RID) $(VCPKG_PARAMS_INSTALL) $(VCPKG_ENSURE_INSTALLED);)
109+
@$(foreach pack,$(VCPKG_REQUIRE_UNIX_DYNAMIC),MAKELEVEL=0 $(VCPKG) install $(pack):$(VCPKG_RID)-dynamic $(VCPKG_PARAMS_INSTALL) $(VCPKG_ENSURE_INSTALLED);)
110110

111111
remove_packages:
112112
@$(foreach pack,$(VCPKG_REQUIRE_UNIX),$(VCPKG) remove $(pack):$(VCPKG_RID) $(VCPKG_PARAMS_REMOVE);)

win/collect-deps-makefile.vc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ SDK_ROOT=$(ROOTDIR_)/build-win/sdk/release-1930-x64
1414

1515
all: clean_output collect
1616

17+
get-output:
18+
@echo $(OUTPUT)
19+
1720
clean_output:
1821
-$(DEL_DIR) "$(OUTPUT)\"
1922

@@ -31,8 +34,6 @@ collect_bindings:
3134

3235
collect: collect_bindings copyprojdb
3336
@if not exist "$(OUTPUT)" mkdir "$(OUTPUT)"
34-
$(COPY) "$(abspath $(SDK_ROOT)\bin)\*.dll" "$(OUTPUT)\"
35-
$(COPY) "$(abspath $(VCPKG_INSTALLED)\bin)\*.dll" "$(OUTPUT)\"
3637
# remove SDK dlls that are not needed
3738
$(DEL_FILE) "$(OUTPUT)\gdal*.dll"
3839
$(COPY) "$(abspath $(BUILD_ROOT)\gdal-build\share\csharp)\*_wrap.dll" "$(OUTPUT)\"

0 commit comments

Comments
 (0)