Skip to content

Commit

Permalink
Merge branch 'OSGeo:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
a0x8o authored Dec 5, 2024
2 parents dfde97c + 79ffe0a commit af6b72e
Show file tree
Hide file tree
Showing 1,210 changed files with 13,087 additions and 22,108 deletions.
1 change: 1 addition & 0 deletions .github/workflows/asan/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ cmake ${GDAL_SOURCE_DIR:=..} \
-DUSE_CCACHE=ON \
-DGDAL_USE_GEOTIFF_INTERNAL=ON \
-DGDAL_USE_TIFF_INTERNAL=ON \
-DGDAL_ENABLE_DRIVER_PDF_PLUGIN=ON \
-DGDAL_USE_LIBKML=OFF -DOGR_ENABLE_DRIVER_LIBKML=OFF \
-DFileGDB_ROOT=/usr/local/FileGDB_API
make -j$NPROC
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/asan/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ export PYTHONMALLOC=malloc
gdalinfo autotest/gcore/data/byte.tif
python3 -c "from osgeo import gdal; print('yes')"

# Check fix for https://github.com/rasterio/rasterio/issues/3250
mv ${GDAL_DRIVER_PATH}/gdal_PDF.so ${GDAL_DRIVER_PATH}/gdal_PDF.so.disabled
echo "from osgeo import gdal" > register_many_times.py
echo "for i in range(1000):" >> register_many_times.py
echo " gdal.AllRegister()" >> register_many_times.py
python3 register_many_times.py
mv ${GDAL_DRIVER_PATH}/gdal_PDF.so.disabled ${GDAL_DRIVER_PATH}/gdal_PDF.so

cd autotest

# Run each module in its own pytest process.
Expand Down
34 changes: 10 additions & 24 deletions .github/workflows/cmake_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ jobs:
- name: Checkout GDAL
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: Install development packages
uses: msys2/setup-msys2@ddf331adaebd714795f1042345e6ca57bd66cea8 # v2.24.1
uses: msys2/setup-msys2@c52d1fa9c7492275e60fe763540fb601f5f232a1 # v2.25.0
with:
msystem: MINGW64
update: true
Expand Down Expand Up @@ -418,7 +418,7 @@ jobs:
shell: pwsh
run: |
echo "JAVA_HOME=$env:JAVA_HOME_11_X64" >> %GITHUB_ENV%
- uses: conda-incubator/setup-miniconda@a4260408e20b96e80095f42ff7f1a15b27dd94ca # v3.0.4
- uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
with:
activate-environment: gdalenv
miniforge-version: latest
Expand Down Expand Up @@ -525,7 +525,7 @@ jobs:
git config --global core.autocrlf false
- name: Checkout GDAL
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- uses: conda-incubator/setup-miniconda@a4260408e20b96e80095f42ff7f1a15b27dd94ca # v3.0.4
- uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
with:
activate-environment: gdalenv
miniforge-version: latest
Expand Down Expand Up @@ -625,26 +625,9 @@ jobs:
rm -rf /opt/homebrew/lib/node_modules # conflicts with node@18 from brew
brew update
brew outdated
# Attempt at fixing:
# => Pouring pkgconf--2.3.0_1.arm64_sonoma.bottle.tar.gz
# Error: The `brew link` step did not complete successfully
# The formula built, but is not symlinked into /opt/homebrew
# Could not symlink bin/pkg-config
# Target /opt/homebrew/bin/pkg-config
# is a symlink belonging to [email protected]. You can unlink it:
# brew unlink [email protected]
#
# To force the link and overwrite all conflicting files:
# brew link --overwrite pkgconf
#
# To list all files that would be deleted:
# brew link --overwrite pkgconf --dry-run
#
# Possible conflicting files are:
# /opt/homebrew/bin/pkg-config -> /opt/homebrew/Cellar/[email protected]/0.29.2_3/bin/pkg-config
# /opt/homebrew/share/aclocal/pkg.m4 -> /opt/homebrew/Cellar/[email protected]/0.29.2_3/share/aclocal/pkg.m4
# /opt/homebrew/share/man/man1/pkg-config.1 -> /opt/homebrew/Cellar/[email protected]/0.29.2_3/share/man/man1/pkg-config.1
rm -f /opt/homebrew/bin/pkg-config /opt/homebrew/share/aclocal/pkg.m4 /opt/homebrew/share/man/man1/pkg-config.1
mv /opt/homebrew/bin/pkg-config /opt/homebrew/bin/pkg-config.old
mv /opt/homebrew/share/aclocal/pkg.m4 /opt/homebrew/share/aclocal/pkg.m4.old
mv /opt/homebrew/share/man/man1/pkg-config.1 /opt/homebrew/share/man/man1/pkg-config.1.old
brew install --overwrite [email protected] [email protected]
brew install postgresql || brew link postgresql
brew install pkg-config freexl libxml2 libspatialite geos proj libgeotiff openjpeg giflib libaec postgis poppler doxygen unixodbc jpeg-turbo aom jpeg-xl libheif libarchive libkml boost
Expand All @@ -654,6 +637,9 @@ jobs:
brew uninstall --ignore-dependencies gdal
# Workaround for https://github.com/Homebrew/homebrew-core/pull/170959#issuecomment-2379606442
sed -i .bak 's/hdf5_hl;hdf5;/hdf5_hl-shared;hdf5-shared;/g' "$(brew --prefix netcdf)/lib/cmake/netCDF/netCDFTargets.cmake"
mv /opt/homebrew/bin/pkg-config.old /opt/homebrew/bin/pkg-config
mv /opt/homebrew/share/aclocal/pkg.m4.old /opt/homebrew/share/aclocal/pkg.m4
mv /opt/homebrew/share/man/man1/pkg-config.1.old /opt/homebrew/share/man/man1/pkg-config.1
- name: Configure ccache
run: |
echo CCACHE_BASEDIR=$PWD >> ${GITHUB_ENV}
Expand Down Expand Up @@ -710,7 +696,7 @@ jobs:
git config --global core.autocrlf false
- name: Checkout GDAL
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- uses: conda-incubator/setup-miniconda@a4260408e20b96e80095f42ff7f1a15b27dd94ca # v3.0.4
- uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
with:
activate-environment: gdalenv
python-version: 3.9
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/code_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -220,3 +220,19 @@ jobs:
xmllint --schema ./frmts/nitf/data/nitf_spec.xsd ./frmts/nitf/data/nitf_spec.xml --noout
xmllint --schema ./ogr/ogrsf_frmts/vdv/data/vdv452.xsd ./ogr/ogrsf_frmts/vdv/data/vdv452.xml --noout
xmllint --schema ./ogr/ogrsf_frmts/gmlas/data/gmlasconf.xsd ./ogr/ogrsf_frmts/gmlas/data/gmlasconf.xml --noout
check-config-options:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: Set up Python
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: 3.8
- name: Check cmakelist
run: |
python scripts/collect_config_options.py
git diff
git diff --quiet || (echo "You need to run scripts/collect_config_options to update port/cpl_known_config_options.h" && /bin/false)
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ jobs:
# We do that after running CMake to avoid CodeQL to trigger during CMake time,
# in particular during HDF5 detection which is terribly slow (https://github.com/OSGeo/gdal/issues/9549)
- name: Initialize CodeQL
uses: github/codeql-action/init@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0
uses: github/codeql-action/init@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # v3.27.5
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -129,6 +129,6 @@ jobs:
cmake --build build -j$(nproc)
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0
uses: github/codeql-action/analyze@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # v3.27.5
with:
category: "/language:${{matrix.language}}"
2 changes: 1 addition & 1 deletion .github/workflows/conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-${{ steps.get-date.outputs.today }}-conda-${{ env.CACHE_NUMBER }}

- uses: conda-incubator/setup-miniconda@a4260408e20b96e80095f42ff7f1a15b27dd94ca # v3.0.4
- uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
with:
miniforge-version: latest
use-mamba: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/delete_untagged_containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
if: github.repository == 'OSGeo/gdal'
steps:
- name: Delete all containers from gdal-deps without tags
uses: Chizkiyahu/delete-untagged-ghcr-action@b302990b6c629f3b272a31f3c3a268e1f7d0ffae # v4.0.1
uses: Chizkiyahu/delete-untagged-ghcr-action@1c77a06b7f80ad4beb82b85919003831d47277d1 # v5.0.0
with:
token: ${{ secrets.PAT_TOKEN_DELETE_UNTAGGED_CONTAINERS }}
repository_owner: ${{ github.repository_owner }}
Expand Down
42 changes: 27 additions & 15 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,31 @@ jobs:
fail-fast: false
matrix:
include:
- name: alpine-small
arch: linux/amd64
- name: alpine-small-amd64
image_name: alpine-small
arch: amd64

- name: alpine-normal
arch: linux/amd64
- name: alpine-normal-amd64
image_name: alpine-small
arch: amd64

- name: ubuntu-small
arch: linux/amd64
- name: ubuntu-small-amd64
image_name: ubuntu-small
arch: amd64

- name: ubuntu-small
arch: linux/arm64
- name: ubuntu-small-arm64
image_name: ubuntu-small
arch: arm64

- name: ubuntu-full
arch: linux/amd64
- name: ubuntu-full-amd64-proprietary-sdks
image_name: ubuntu-full
arch: amd64

- name: ubuntu-full
arch: linux/arm64
- name: ubuntu-full-arm64
image_name: ubuntu-full
arch: arm64

name: ${{ matrix.name }}-${{ matrix.arch }}
name: ${{ matrix.name }}

runs-on: ubuntu-latest

Expand All @@ -54,5 +60,11 @@ jobs:
shell: bash -l {0}
run: |
docker run --rm --privileged linuxkit/binfmt:v0.8
cd docker/${{ matrix.name }}
./build.sh --platform ${{ matrix.arch }}
cd docker/${{ matrix.image_name }}
if test "${{ matrix.name }}" = "ubuntu-full-amd64-proprietary-sdks"; then
./build.sh --platform linux/${{ matrix.arch }} --with-oracle --with-mrsid --with-ecw
else
./build.sh --platform linux/${{ matrix.arch }}
fi
docker run --rm ghcr.io/osgeo/gdal:${{ matrix.image_name }}-latest-${{ matrix.arch }} gdalinfo --formats
docker run --rm ghcr.io/osgeo/gdal:${{ matrix.image_name }}-latest-${{ matrix.arch }} ogrinfo --formats
12 changes: 12 additions & 0 deletions .github/workflows/linux_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,13 @@ jobs:
build_script: build.sh
os: ubuntu-22.04

- name: Ubuntu 24.04, s390x
id: s390x
container: s390x
build_script: build.sh
test_script: test.sh
os: ubuntu-22.04

name: ${{ matrix.name }}

runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -183,6 +190,11 @@ jobs:
if: env.CONTAINER_REGISTRY == 'ghcr.io'
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin

- name: Enable Docker qemu
shell: bash -l {0}
run: |
docker run --rm --privileged linuxkit/binfmt:v0.8
# Pull build environment in forks or pull requests, unless [skip cache] is included in the commit message
- name: Pull build environment
if: "(github.repository_owner != 'OSGeo' || github.event_name == 'pull_request') && !contains(github.event.head_commit.message, '[skip cache]')"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:

- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0

- uses: conda-incubator/setup-miniconda@a4260408e20b96e80095f42ff7f1a15b27dd94ca # v3.0.4
- uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
with:
channels: conda-forge
auto-update-conda: true
Expand Down
83 changes: 83 additions & 0 deletions .github/workflows/s390x/Dockerfile.ci
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
FROM ubuntu:24.04

ENV DEBIAN_FRONTEND=noninteractive
ENV TARGET_ARCH=s390x
ENV GCC_ARCH=s390x
ENV APT_ARCH_SUFFIX=:s390x

RUN rm -f /etc/apt/sources.list /etc/apt/sources.list.d/ubuntu.sources \
&& echo "deb [arch=amd64] http://us.archive.ubuntu.com/ubuntu/ noble main restricted universe" >> /etc/apt/sources.list \
&& echo "deb [arch=amd64] http://us.archive.ubuntu.com/ubuntu/ noble-updates main restricted universe" >> /etc/apt/sources.list \
&& echo "deb [arch=amd64] http://us.archive.ubuntu.com/ubuntu/ noble-backports main restricted universe" >> /etc/apt/sources.list \
&& echo "deb [arch=amd64] http://security.ubuntu.com/ubuntu noble-security main restricted universe" >> /etc/apt/sources.list \
&& echo "deb [arch=${TARGET_ARCH}] http://ports.ubuntu.com/ubuntu-ports/ noble main restricted universe" >> /etc/apt/sources.list \
&& echo "deb [arch=${TARGET_ARCH}] http://ports.ubuntu.com/ubuntu-ports/ noble-updates main restricted universe" >> /etc/apt/sources.list \
&& echo "deb [arch=${TARGET_ARCH}] http://ports.ubuntu.com/ubuntu-ports/ noble-security main restricted universe" >> /etc/apt/sources.list \
&& dpkg --add-architecture ${TARGET_ARCH} \
&& apt-get update -y \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y g++-13-${GCC_ARCH}-linux-gnu \
&& ln -s ${GCC_ARCH}-linux-gnu-gcc-13 /usr/bin/${GCC_ARCH}-linux-gnu-gcc \
&& ln -s ${GCC_ARCH}-linux-gnu-g++-13 /usr/bin/${GCC_ARCH}-linux-gnu-g++

ENV CC=${GCC_ARCH}-linux-gnu-gcc-13
ENV CXX=${GCC_ARCH}-linux-gnu-g++-13

RUN apt-get update && \
apt-get install -y --allow-unauthenticated \
bash \
ccache \
cmake \
curl \
ninja-build \
libavif-dev${APT_ARCH_SUFFIX} \
libblosc-dev${APT_ARCH_SUFFIX} \
libboost-dev${APT_ARCH_SUFFIX} \
libcairo2-dev${APT_ARCH_SUFFIX} \
libcfitsio-dev${APT_ARCH_SUFFIX} \
libcrypto++-dev${APT_ARCH_SUFFIX} \
libcurl4-gnutls-dev${APT_ARCH_SUFFIX} \
libexpat-dev${APT_ARCH_SUFFIX} \
libfcgi-dev${APT_ARCH_SUFFIX} \
libfyba-dev${APT_ARCH_SUFFIX} \
libfreexl-dev${APT_ARCH_SUFFIX} \
libgeos-dev${APT_ARCH_SUFFIX} \
libgeotiff-dev${APT_ARCH_SUFFIX} \
libgif-dev${APT_ARCH_SUFFIX} \
libhdf4-alt-dev${APT_ARCH_SUFFIX} \
libhdf5-serial-dev${APT_ARCH_SUFFIX} \
libheif-dev${APT_ARCH_SUFFIX} \
libjpeg-dev${APT_ARCH_SUFFIX} \
libjxl-dev${APT_ARCH_SUFFIX} \
libkml-dev${APT_ARCH_SUFFIX} \
liblz4-dev${APT_ARCH_SUFFIX} \
liblzma-dev${APT_ARCH_SUFFIX} \
libmysqlclient-dev${APT_ARCH_SUFFIX} \
libnetcdf-dev${APT_ARCH_SUFFIX} \
libogdi-dev${APT_ARCH_SUFFIX} \
libopenexr-dev${APT_ARCH_SUFFIX} \
libopenjp2-7-dev${APT_ARCH_SUFFIX} \
libpcre3-dev${APT_ARCH_SUFFIX} \
libpng-dev${APT_ARCH_SUFFIX} \
libpoppler-dev${APT_ARCH_SUFFIX} \
libpoppler-private-dev${APT_ARCH_SUFFIX} \
libpq-dev${APT_ARCH_SUFFIX} \
libproj-dev${APT_ARCH_SUFFIX} \
librasterlite2-dev${APT_ARCH_SUFFIX} \
libspatialite-dev${APT_ARCH_SUFFIX} \
libssl-dev${APT_ARCH_SUFFIX} \
libwebp-dev${APT_ARCH_SUFFIX} \
libxerces-c-dev${APT_ARCH_SUFFIX} \
libxml2-dev${APT_ARCH_SUFFIX} \
libxslt-dev${APT_ARCH_SUFFIX} \
libzstd-dev${APT_ARCH_SUFFIX} \
python3-dev${APT_ARCH_SUFFIX} \
python3-numpy${APT_ARCH_SUFFIX} \
python3-setuptools${APT_ARCH_SUFFIX} \
python3-pip \
swig \
unixodbc-dev${APT_ARCH_SUFFIX} \
wget \
zip

COPY requirements.txt /tmp/
RUN PYTHON_CMD=python3 && $PYTHON_CMD -m pip install -U --break-system-packages -r /tmp/requirements.txt
20 changes: 20 additions & 0 deletions .github/workflows/s390x/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

set -eu

CMAKE_ARGS=(
"-GNinja" \
"-DUSE_CCACHE=ON" \
"-DCMAKE_BUILD_TYPE=RelWithDebInfo" \
"-DCMAKE_INSTALL_PREFIX=/usr" \
"-DGDAL_USE_TIFF_INTERNAL=ON" \
"-DGDAL_USE_GEOTIFF_INTERNAL=ON" \
"-DBUILD_CSHARP_BINDINGS=OFF" \
"-DBUILD_JAVA_BINDINGS=OFF"
)

cmake ${GDAL_SOURCE_DIR:=..} \
"${CMAKE_ARGS[@]}"

ninja

10 changes: 10 additions & 0 deletions .github/workflows/s390x/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

set -eu

source ${GDAL_SOURCE_DIR:=..}/scripts/setdevenv.sh

autotest/cpp/gdal_unit_test --gtest_filter=-test_cpl.CPLSM_signed:test_cpl.CPLSpawn:test_cpl.CPLUTF8ForceToASCII

pytest autotest/alg
pytest autotest/gcore -k "not transformer and not virtualmem and not test_vrt_protocol_netcdf_component_name and not test_vsicrypt_3"
2 changes: 1 addition & 1 deletion .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,6 @@ jobs:

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0
uses: github/codeql-action/upload-sarif@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # v3.27.5
with:
sarif_file: results.sarif
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ repos:
ogr/ogrsf_frmts/flatgeobuf/flatbuffers/|
ogr/ogrsf_frmts/pmtiles/pmtiles/|
ogr/ogrsf_frmts/ods/ods_formula_parser.cpp|
ogr/ogrsf_frmts/ods/ods_formula_parser.hpp|
ogr/ogrsf_frmts/sqlite/sqlite_rtree_bulk_load|
ogr/swq_parser.cpp|
ogr/swq_parser.hpp|
Expand Down
Loading

0 comments on commit af6b72e

Please sign in to comment.