Skip to content

Commit

Permalink
Merge pull request #11 from OSGeo/master
Browse files Browse the repository at this point in the history
Resync
  • Loading branch information
lucianpls authored Mar 19, 2021
2 parents 23c1250 + 621db4a commit e53c0ee
Show file tree
Hide file tree
Showing 872 changed files with 19,545 additions and 41,535 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/android.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: Android build

on: [push, pull_request]
on:
push:
paths-ignore:
- 'gdal/doc/**'
pull_request:
paths-ignore:
- 'gdal/doc/**'

jobs:

Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/asan_build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: ASAN build

on: [push, pull_request]
on:
push:
paths-ignore:
- 'gdal/doc/**'
pull_request:
paths-ignore:
- 'gdal/doc/**'

jobs:

Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Backport
on:
pull_request_target:
types:
- closed
- labeled

jobs:
backport:
runs-on: ubuntu-18.04
name: Backport
steps:
- 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]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
9 changes: 8 additions & 1 deletion .github/workflows/clang_static_analyzer.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
name: CLang Static Analyzer

on: [push, pull_request]
on:
push:
paths-ignore:
- 'gdal/doc/**'
pull_request:
paths-ignore:
- 'gdal/doc/**'


jobs:

Expand Down
38 changes: 14 additions & 24 deletions .github/workflows/code_checks.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: Code Checks

on: [push, pull_request]
on:
push:
paths-ignore:
- 'gdal/doc/**'
pull_request:
paths-ignore:
- 'gdal/doc/**'

jobs:

Expand Down Expand Up @@ -38,8 +44,8 @@ jobs:
- name: Run cppcheck test
run: ./gdal/scripts/cppcheck.sh

cppcheck_1804:
runs-on: ubuntu-18.04
cppcheck_2004:
runs-on: ubuntu-20.04
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"
steps:
- name: Checkout
Expand All @@ -48,26 +54,10 @@ jobs:
- name: Install Requirements
run: |
sudo apt update
sudo apt install -y cppcheck libsqlite3-dev ccache sqlite3
- name: Cache PROJ build
uses: actions/cache@v2
with:
path: ~/.ccache
key: ${{ runner.os }}-cache-cppcheck-1804

- name: Build PROJ
run: |
curl http://download.osgeo.org/proj/proj-6.3.2.tar.gz > proj-6.3.2.tar.gz
tar xzf proj-6.3.2.tar.gz
mv proj-6.3.2 proj
cd proj
CC="ccache gcc" CXX="ccache g++" CFLAGS=-O0 CXXFLAGS=-O0 ./configure --without-static --prefix=/tmp/projinstall
make -j$(nproc)
make install -j$(nproc)
sudo apt install -y cppcheck libsqlite3-dev ccache sqlite3 libproj-dev
- name: Run configure
run: (cd gdal && ./configure --with-proj=/tmp/projinstall)
run: (cd gdal && ./configure)

- name: Run cppcheck test
run: ./gdal/scripts/cppcheck.sh
Expand All @@ -84,10 +74,10 @@ jobs:
- name: Detect printf
run: ./gdal/scripts/detect_printf.sh

- name: Detect self assigments
- name: Detect self assignments
run: ./gdal/scripts/detect_self_assignment.sh

- name: Detect suspicous char digit zero
- name: Detect suspicious char digit zero
run: ./gdal/scripts/detect_suspicious_char_digit_zero.sh

- name: Shellcheck
Expand Down Expand Up @@ -115,7 +105,7 @@ jobs:
$FLAKE8 gdal/swig/python/osgeo/utils/auxiliary
doxygen:
runs-on: ubuntu-latest
runs-on: ubuntu-18.04
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/conda.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
name: Conda

on: [push, pull_request]
on:
push:
paths-ignore:
- 'gdal/doc/**'
pull_request:
paths-ignore:
- 'gdal/doc/**'


jobs:
build:
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/fedora_rawhide.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Fedora Rawhide

on:
push:
paths-ignore:
- 'gdal/doc/**'
pull_request:
paths-ignore:
- 'gdal/doc/**'


jobs:

fedora_rawhide:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Cache
uses: actions/cache@v2
id: cache
with:
path: |
${{ github.workspace }}/ccache.tar.gz
key: ${{ runner.os }}-cache-fedora-rawhide-${{ github.run_id }}
restore-keys: ${{ runner.os }}-cache-fedora-rawhide-

- name: Build
run: docker run --privileged=true -e CI -e WORK_DIR="$PWD" -v $PWD:$PWD -v /var/run/docker.sock:/var/run/docker.sock fedora:rawhide $PWD/.github/workflows/fedora_rawhide/start.sh
79 changes: 79 additions & 0 deletions .github/workflows/fedora_rawhide/start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
#!/bin/sh

set -e

dnf install -y --setopt=install_weak_deps=False proj-devel
dnf install -y clang make diffutils ccache \
libxml2-devel expat-devel xerces-c-devel \
zlib-devel xz-devel libzstd-devel \
giflib-devel libjpeg-devel libpng-devel \
openjpeg2-devel cfitsio-devel libwebp-devel \
libkml-devel json-c-devel \
geos-devel \
sqlite-devel pcre-devel libspatialite-devel freexl-devel \
libtiff-devel libgeotiff-devel \
poppler-cpp-devel \
cryptopp-devel \
armadillo-devel qhull-devel \
hdf-devel hdf5-devel netcdf-devel \
mongo-cxx-driver-devel libpq-devel \
python3-pip python3-devel

USER=root
export USER

TRAVIS=yes
export TRAVIS

cd "$WORK_DIR"

if test -f "$WORK_DIR/ccache.tar.gz"; then
echo "Restoring ccache..."
(cd $HOME && mkdir -p .cache && cd .cache && tar xzf "$WORK_DIR/ccache.tar.gz")
fi

SCRIPT_DIR=$(dirname "$0")
case $SCRIPT_DIR in
"/"*)
;;
".")
SCRIPT_DIR=$(pwd)
;;
*)
SCRIPT_DIR=$(pwd)/$(dirname "$0")
;;
esac

ccache -M 1G
ccache -s

# Configure GDAL
CURRENT_DIR=$PWD
cd gdal
CC='ccache clang' CXX='ccache clang++' LDFLAGS='-lstdc++' ./configure --prefix=/usr --without-libtool --with-python=/usr/bin/python3 --with-poppler --with-spatialite --with-liblzma --with-webp --with-hdf4 --with-hdf5 --with-armadillo

make USER_DEFS=-Werror -j$(nproc)
(cd apps && make USER_DEFS=-Werror -j$(nproc) test_ogrsf)
make install
ldconfig
cd "$CURRENT_DIR"
(cd autotest/cpp && make -j3)

ccache -s

echo "Saving ccache..."
rm -f "$WORK_DIR/ccache.tar.gz"
(cd $HOME/.cache && tar czf "$WORK_DIR/ccache.tar.gz" ccache)

export PYTEST="python3 -m pytest -vv -p no:sugar --color=no"

(cd autotest/cpp && make quick_test)

# install pip and use it to install test dependencies
pip3 install -U -r autotest/requirements.txt

projsync --system-directory --file us_noaa_conus.tif
projsync --system-directory --file us_nga_egm96

(cd autotest && $PYTEST)

9 changes: 8 additions & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
name: MacOS build

on: [push, pull_request]
on:
push:
paths-ignore:
- 'gdal/doc/**'
pull_request:
paths-ignore:
- 'gdal/doc/**'


jobs:

Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/mingw_w64.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
name: mingw_w64 build

on: [push, pull_request]
on:
push:
paths-ignore:
- 'gdal/doc/**'
pull_request:
paths-ignore:
- 'gdal/doc/**'


jobs:

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mingw_w64/install-python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ apt install -y --no-install-recommends \
wine-devel-i386=5.21~bionic \
wine-devel-amd64=5.21~bionic \
winetricks \
xvfb # This is for making a dummy X server disply
xvfb # This is for making a dummy X server display

echo "------ Download python ------"
wget https://www.python.org/ftp/python/3.7.6/python-3.7.6-amd64.exe
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/ubuntu_18.04.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
name: Ubuntu 18.04 build

on: [push, pull_request]
on:
push:
paths-ignore:
- 'gdal/doc/**'
pull_request:
paths-ignore:
- 'gdal/doc/**'


jobs:

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu_18.04/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ tar xzf mongo-c-driver-1.13.0.tar.gz && (cd mongo-c-driver-1.13.0 && mkdir build
tar xzf r3.4.0.tar.gz && (cd mongo-cxx-driver-r3.4.0 && mkdir build_cmake && cd build_cmake && CC='ccache gcc' CXX='ccache g++' cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DBSONCXX_POLY_USE_BOOST=ON -DMONGOCXX_ENABLE_SLOW_TESTS=NO -DCMAKE_BUILD_TYPE=Debug && make -j3 && sudo make -j3 install)

# Build libspatialite
fossil clone https://www.gaia-gis.it/fossil/libspatialite libspatialite.fossil && mkdir sl && (cd sl && fossil open ../libspatialite.fossil && CC='ccache gcc' CXX='ccache g++' ./configure --disable-static --prefix=/usr --disable-geos370 && make -j3 && sudo make -j3 install)
fossil clone https://www.gaia-gis.it/fossil/libspatialite libspatialite.fossil && mkdir sl && (cd sl && fossil open ../libspatialite.fossil && CC='ccache gcc' CXX='ccache g++' ./configure --disable-static --prefix=/usr --disable-geos370 --disable-rttopo && make -j3 && sudo make -j3 install)

# Build librasterlite2
fossil clone https://www.gaia-gis.it/fossil/librasterlite2 librasterlite2.fossil && mkdir rl2 && (cd rl2 && fossil open ../librasterlite2.fossil && CC='ccache gcc' CXX='ccache g++' ./configure --disable-static --prefix=/usr --disable-lz4 --disable-zstd && make -j3 && sudo make -j3 install)
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/ubuntu_18.04_32bit.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
name: Ubuntu 18.04 32bit build

on: [push, pull_request]
on:
push:
paths-ignore:
- 'gdal/doc/**'
pull_request:
paths-ignore:
- 'gdal/doc/**'


jobs:

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ubuntu_18.04_32bit/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ ccache -M 1G
ccache -s

# Build libspatialite
fossil clone https://www.gaia-gis.it/fossil/libspatialite libspatialite.fossil && mkdir sl && (cd sl && fossil open ../libspatialite.fossil && CC='ccache gcc' CXX='ccache g++' ./configure --disable-static --prefix=/usr --disable-geos370 && make -j3 && sudo make -j3 install)
fossil clone https://www.gaia-gis.it/fossil/libspatialite libspatialite.fossil && mkdir sl && (cd sl && fossil open ../libspatialite.fossil && CC='ccache gcc' CXX='ccache g++' ./configure --disable-static --prefix=/usr --disable-geos370 --disable-rttopo && make -j3 && sudo make -j3 install)

# Build librasterlite2
fossil clone https://www.gaia-gis.it/fossil/librasterlite2 librasterlite2.fossil && mkdir rl2 && (cd rl2 && fossil open ../librasterlite2.fossil && CC='ccache gcc' CXX='ccache g++' ./configure --disable-static --prefix=/usr --disable-lz4 --disable-zstd && make -j3 && sudo make -j3 install)

# Build proj

(git clone --depth 1 https://github.com/OSGeo/PROJ && cd PROJ && (cd data && curl http://download.osgeo.org/proj/proj-datumgrid-1.8.tar.gz > proj-datumgrid-1.8.tar.gz && tar xvzf proj-datumgrid-1.8.tar.gz) && ./autogen.sh && CC='ccache gcc' CXX='ccache g++' CFLAGS='-DPROJ_RENAME_SYMBOLS' CXXFLAGS='-DPROJ_RENAME_SYMBOLS' ./configure --disable-static --prefix=/usr/local || cat config.log && make -j3)
sudo sh -c "cd $PWD/PROJ && make -j3 install && mv /usr/local/lib/libproj.so.19.2.0 /usr/local/lib/libinternalproj.so.19.2.0 && rm /usr/local/lib/libproj.so* && rm /usr/local/lib/libproj.la && ln -s libinternalproj.so.19.2.0 /usr/local/lib/libinternalproj.so.19 && ln -s libinternalproj.so.19.2.0 /usr/local/lib/libinternalproj.so"
sudo sh -c "cd $PWD/PROJ && make -j3 install && mv /usr/local/lib/libproj.so.22.0.0 /usr/local/lib/libinternalproj.so.22.0.0 && rm /usr/local/lib/libproj.so* && rm /usr/local/lib/libproj.la && ln -s libinternalproj.so.22.0.0 /usr/local/lib/libinternalproj.so.19 && ln -s libinternalproj.so.22.0.0 /usr/local/lib/libinternalproj.so"

# Configure GDAL
CURRENT_DIR=$PWD
Expand Down
14 changes: 12 additions & 2 deletions .github/workflows/ubuntu_20.04.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
name: Ubuntu 20.04 build

on: [push, pull_request]
on:
push:
paths-ignore:
- 'gdal/doc/**'
pull_request:
paths-ignore:
- 'gdal/doc/**'


jobs:

Expand Down Expand Up @@ -53,6 +60,9 @@ jobs:
- name: Run SWIG CSharp tests
run: docker run --rm gdal sh -c "cd /build/gdal/swig/csharp && make && make && make test"

- name: Build Python sdist package
run: docker run --rm gdal sh -c "cd /build/gdal/swig/python && python3 setup.py sdist"

- name: Run pytest
# --security-opt seccomp=unconfined, so that the userfaulfd syscall is available
run: docker run -e CI -e TRAVIS=yes -e GITHUB_WORKFLOW --security-opt seccomp=unconfined --rm gdal sh -c "cd /build/autotest && pip3 install -U -r requirements.txt && pytest"
run: docker run -e CI -e TRAVIS=yes -e TRAVIS_BRANCH=ubuntu_2004 -e GITHUB_WORKFLOW --security-opt seccomp=unconfined --rm gdal sh -c "cd /build/autotest && pip3 install -U -r requirements.txt && pytest"
Loading

0 comments on commit e53c0ee

Please sign in to comment.