Skip to content

Commit

Permalink
merge upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan5142 committed Feb 22, 2024
2 parents 4d5ea68 + 18a4515 commit 589c5a8
Show file tree
Hide file tree
Showing 2,096 changed files with 91,154 additions and 43,157 deletions.
13 changes: 8 additions & 5 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,19 @@ should be formatted as "component/filename: Describe what the commit does (fixes
so that anyone that parses 'git log' immediately knows what a commit is about.
Do not hesitate to provide more context in the longer part of the commit message.
GOOD: "GTiff: fix wrong color interpretation with -co ALPHA=YES (fixes #1234)
For example:
"GTiff: fix wrong color interpretation with -co ALPHA=YES (fixes #1234)
When -co ALPHA=YES was used, but PHOTOMETRIC was not specified, the ExtraSample
tag was wrongly set to unspecified.
"
BAD: "Fix crash", "fix #1234"
The GDAL project requires specific code formatting for C/C++ and Python code.
This is largely automated with the pre-commit tool.
Consult how to [install and set it up](https://gdal.org/development/dev_practices.html#commit-hooks)
In case you need several iterations to make continuous integration happy,
please squash your commits in a single one at the end. See
[Contributing](https://github.com/OSGeo/gdal/blob/master/CONTRIBUTING.md)
More generally, consult [development practices](https://gdal.org/development/dev_practices.html)
-->

## What does this PR do?
Expand All @@ -27,6 +29,7 @@ please squash your commits in a single one at the end. See
## Tasklist

- [ ] ADD YOUR TASKS HERE
- [ ] Make sure code is correctly formatted (cf [pre-commit configuration](https://gdal.org/development/dev_practices.html#commit-hooks))
- [ ] Add test case(s)
- [ ] Add documentation
- [ ] Updated Python API documentation (swig/include/python/docs/)
Expand Down
83 changes: 64 additions & 19 deletions .github/workflows/alpine/Dockerfile.ci
Original file line number Diff line number Diff line change
@@ -1,30 +1,75 @@
FROM alpine:edge

RUN apk add \
linux-headers gnu-libiconv-dev \
g++ make ccache cmake \
proj-dev proj proj-util \
curl-dev tiff-dev \
zlib-dev zstd-dev xz-dev snappy-dev \
libjpeg-turbo-dev libpng-dev openjpeg-dev libwebp-dev expat-dev libkml-dev \
py3-numpy-dev python3-dev py3-setuptools py3-numpy py3-pip swig \
poppler-dev postgresql-dev \
openexr-dev libheif-dev xerces-c-dev geos-dev cfitsio-dev \
netcdf-dev libaec-dev hdf5-dev freexl-dev \
lz4-dev blosc-dev libdeflate-dev brotli-dev uriparser-dev \
apache-arrow-dev \
armadillo-dev \
basisu-dev \
blosc-dev \
brunsli-dev \
ccache \
cfitsio-dev \
cmake \
curl-dev \
expat-dev \
freexl-dev \
gcc \
g++ \
geos-dev \
giflib-dev \
gnu-libiconv-dev \
hdf5-dev \
json-c-dev \
kealib-dev \
libaec-dev \
libarchive-dev \
kealib-dev libjxl-dev \
json-c-dev giflib-dev \
libspatialite-dev librasterlite2-dev \
libdeflate-dev \
libgeotiff-dev \
libheif-dev \
libjpeg-turbo-dev \
libjxl-dev \
libkml-dev \
libpng-dev \
libpq-dev \
librasterlite2-dev \
libspatialite-dev \
libtirpc-dev \
libwebp-dev \
libxml2-dev \
libxslt-dev \
linux-headers \
lz4-dev \
make \
mariadb-connector-c-dev \
netcdf-dev \
odbc-cpp-wrapper-dev \
ogdi-dev \
openexr-dev \
openjpeg-dev \
openssl-dev \
pcre2-dev \
podofo-dev \
poppler-dev \
proj-dev \
proj-util \
py3-pyarrow \
py3-pyarrow-pyc \
py3-numpy \
py3-numpy-dev \
py3-pip \
py3-setuptools \
python3-dev \
qhull-dev \
sfcgal-dev \
snappy-dev \
sqlite-dev \
swig \
tiledb-dev \
tiff-dev \
unixodbc-dev \
libpq-dev \
apache-arrow-dev \
py3-pyarrow py3-pyarrow-pyc \
libxml2-dev \
podofo-dev
xerces-c-dev \
xz-dev \
zlib-dev \
zstd-dev

COPY requirements.txt /tmp/
RUN python3 -m pip install --break-system-packages -U -r /tmp/requirements.txt
26 changes: 25 additions & 1 deletion .github/workflows/alpine/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,35 @@

set -e

cat << EOF > /tmp/foo.cpp
#include <cstdio>
extern "C" void DeclareDeferredFOO(void);
void DeclareDeferredFOO()
{
FILE* f = fopen("/tmp/DeclareDeferredFOO_has_been_run.bin", "wb");
if (f)
fclose(f);
}
EOF

cmake ${GDAL_SOURCE_DIR:=..} \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_UNITY_BUILD=ON \
-DUSE_CCACHE=ON \
-DCMAKE_INSTALL_PREFIX=/usr \
-DIconv_INCLUDE_DIR=/usr/include/gnu-libiconv \
-DIconv_LIBRARY=/usr/lib/libiconv.so \
-DCMAKE_C_FLAGS=-Werror -DCMAKE_CXX_FLAGS=-Werror -DWERROR_DEV_FLAG="-Werror=dev"
-DADD_EXTERNAL_DEFERRED_PLUGIN_FOO=/tmp/foo.cpp \
-DCMAKE_C_FLAGS=-Werror -DCMAKE_CXX_FLAGS="-std=c++23 -Werror" -DWERROR_DEV_FLAG="-Werror=dev"
make -j$(nproc)
make -j$(nproc) install DESTDIR=/tmp/install-gdal

# To check if DeclareDeferredFOO() is called by GDALAllRegister()
apps/gdalinfo --version

if test -f /tmp/DeclareDeferredFOO_has_been_run.bin; then
echo "DeclareDeferredFOO() has been run"
else
echo "DeclareDeferredFOO() has NOT been run"
exit 1
fi
75 changes: 75 additions & 0 deletions .github/workflows/alpine_32bit/Dockerfile.ci
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
FROM i386/alpine:edge

RUN apk add \
apache-arrow-dev \
armadillo-dev \
bash \
basisu-dev \
blosc-dev \
brunsli-dev \
ccache \
cfitsio-dev \
cmake \
curl-dev \
expat-dev \
freexl-dev \
gcc \
g++ \
geos-dev \
giflib-dev \
gnu-libiconv-dev \
hdf5-dev \
json-c-dev \
kealib-dev \
libaec-dev \
libarchive-dev \
libdeflate-dev \
libgeotiff-dev \
libheif-dev \
libjpeg-turbo-dev \
libjxl-dev \
libkml-dev \
libpng-dev \
libpq-dev \
librasterlite2-dev \
libspatialite-dev \
libtirpc-dev \
libwebp-dev \
libxml2-dev \
libxslt-dev \
linux-headers \
lz4-dev \
make \
mariadb-connector-c-dev \
netcdf-dev \
odbc-cpp-wrapper-dev \
ogdi-dev \
openexr-dev \
openjpeg-dev \
openssl-dev \
pcre2-dev \
podofo-dev \
poppler-dev \
proj-dev \
proj-util \
py3-pyarrow \
py3-pyarrow-pyc \
py3-numpy \
py3-numpy-dev \
py3-pip \
py3-setuptools \
python3-dev \
qhull-dev \
sfcgal-dev \
snappy-dev \
sqlite-dev \
swig \
tiff-dev \
unixodbc-dev \
xerces-c-dev \
xz-dev \
zlib-dev \
zstd-dev

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

set -e

cmake ${GDAL_SOURCE_DIR:=..} \
-DCMAKE_BUILD_TYPE=Debug \
-DUSE_CCACHE=ON \
-DCMAKE_INSTALL_PREFIX=/usr \
-DIconv_INCLUDE_DIR=/usr/include/gnu-libiconv \
-DIconv_LIBRARY=/usr/lib/libiconv.so \
-DCMAKE_C_FLAGS=-Werror -DCMAKE_CXX_FLAGS=-Werror -DWERROR_DEV_FLAG="-Werror=dev"
make -j$(nproc)
File renamed without changes.
4 changes: 2 additions & 2 deletions .github/workflows/android_cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ jobs:
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Cache
uses: actions/cache@v3
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
id: cache
with:
path: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/android_cmake/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ tar xzf sqlite-autoconf-3370200.tar.gz
cd sqlite-autoconf-3370200
CC="ccache $NDK_TOOLCHAIN/bin/aarch64-linux-android24-clang" ./configure \
--prefix=/tmp/install --host=aarch64-linux-android24
make -j3
make -j$(nproc)
make install
cd ..

Expand All @@ -61,7 +61,7 @@ cmake .. \
-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=NEVER \
-DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=NEVER \
-DEXE_SQLITE3=/usr/bin/sqlite3
make -j3
make -j$(nproc)
make install
cd ../..

Expand All @@ -86,7 +86,7 @@ PKG_CONFIG_LIBDIR=/tmp/install/lib/pkgconfig cmake .. \
-DSFCGAL_CONFIG=disabled \
-DHDF5_C_COMPILER_EXECUTABLE=disabled \
-DHDF5_CXX_COMPILER_EXECUTABLE=disabled
make -j3
make -j$(nproc)
make install
cd ..

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/backport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ jobs:
- name: Backport Bot
id: backport
if: github.event.pull_request.merged && ( ( github.event.action == 'closed' && contains( join( github.event.pull_request.labels.*.name ), 'backport') ) || contains( github.event.label.name, 'backport' ) )
uses: m-kuhn/[email protected]
uses: m-kuhn/backport@7f3cab83e4b3b26aefcffda21851c3dc3d389f45 # v1.2.7
with:
github_token: ${{ secrets.BACKPORT_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/benchmarks/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -eu

BENCHMARK_STORAGE="file:///tmp"
BENCHMARK_STORAGE="file://${PWD}/benchmark_results"

# Use time.process_time for more reliability on VMs
BENCHMARK_OPTIONS=(
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/cifuzz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ jobs:
steps:
- name: Build Fuzzers
id: build
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@56f58e25299ee6559fa40369bd4af908000c0c36 # master on 2023/12/31
with:
oss-fuzz-project-name: 'gdal'
dry-run: false
- name: Run Fuzzers
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@56f58e25299ee6559fa40369bd4af908000c0c36 # master on 2023/12/31
with:
oss-fuzz-project-name: 'gdal'
fuzz-seconds: 600
dry-run: false
- name: Upload Crash
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
if: failure() && steps.build.outcome == 'success'
with:
name: artifacts
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/clang_static_analyzer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ permissions:
jobs:

clang_static_analyzer:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Run
run: docker run --rm -v $PWD:$PWD ubuntu:16.04 sh -c "cd $PWD && apt update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends sudo software-properties-common && DEBIAN_FRONTEND=noninteractive sh ./ci/travis/csa_common/before_install.sh && sh ./ci/travis/csa_common/install.sh && sh ./ci/travis/csa_common/script.sh"
run: docker run --rm -v $PWD:$PWD ubuntu:22.04 sh -c "cd $PWD && apt update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends sudo software-properties-common && DEBIAN_FRONTEND=noninteractive sh ./ci/travis/csa_common/before_install.sh && sh ./ci/travis/csa_common/install.sh && sh ./ci/travis/csa_common/script.sh"
Loading

0 comments on commit 589c5a8

Please sign in to comment.