forked from OSGeo/gdal
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
204 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
FROM ubuntu:22.04 | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y --allow-unauthenticated \ | ||
autoconf \ | ||
automake \ | ||
bash \ | ||
ccache \ | ||
cmake \ | ||
curl \ | ||
doxygen \ | ||
fossil \ | ||
g++ \ | ||
git \ | ||
gpsbabel \ | ||
libblosc-dev \ | ||
libboost-dev \ | ||
libcairo2-dev \ | ||
libcfitsio-dev \ | ||
libcrypto++-dev \ | ||
libcurl4-gnutls-dev \ | ||
libexpat-dev \ | ||
libfcgi-dev \ | ||
libfyba-dev \ | ||
libfreexl-dev \ | ||
libgeos-dev \ | ||
libgeotiff-dev \ | ||
libgif-dev \ | ||
libhdf4-alt-dev \ | ||
libhdf5-serial-dev \ | ||
libjpeg-dev \ | ||
libkml-dev \ | ||
liblcms2-2 \ | ||
liblz4-dev \ | ||
liblzma-dev \ | ||
libmongoc-dev \ | ||
libmongoclient-dev \ | ||
libmysqlclient-dev \ | ||
libnetcdf-dev \ | ||
libogdi-dev \ | ||
libopenexr-dev \ | ||
libopenjp2-7-dev \ | ||
libpcre3-dev \ | ||
libpng-dev \ | ||
libpoppler-dev \ | ||
libpoppler-private-dev \ | ||
libpq-dev \ | ||
libproj-dev \ | ||
librasterlite2-dev \ | ||
libspatialite-dev \ | ||
libssl-dev \ | ||
libwebp-dev \ | ||
libxerces-c-dev \ | ||
libxml2-dev \ | ||
libxslt-dev \ | ||
libzstd-dev \ | ||
locales \ | ||
mysql-client-core-8.0 \ | ||
netcdf-bin \ | ||
openjdk-8-jdk \ | ||
poppler-utils \ | ||
postgis \ | ||
postgresql-client \ | ||
python3-dev \ | ||
python3-numpy \ | ||
python3-pip \ | ||
sqlite3 \ | ||
swig \ | ||
unixodbc-dev \ | ||
zip | ||
|
||
# MSSQL: client side | ||
RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - | ||
RUN curl https://packages.microsoft.com/config/ubuntu/22.04/prod.list | tee /etc/apt/sources.list.d/msprod.list | ||
RUN apt-get update \ | ||
&& ACCEPT_EULA=Y apt-get install -y msodbcsql18 unixodbc-dev | ||
|
||
# ESRI File Geodatabase API | ||
RUN curl -L -O https://github.com/Esri/file-geodatabase-api/raw/master/FileGDB_API_1.5/FileGDB_API_1_5_64gcc51.tar.gz \ | ||
&& tar xzf FileGDB_API_1_5_64gcc51.tar.gz \ | ||
&& cp -r FileGDB_API-64gcc51/* /usr/ \ | ||
&& rm FileGDB_API_1_5_64gcc51.tar.gz \ | ||
&& rm -rf FileGDB_API-64gcc51 \ | ||
&& ldconfig | ||
|
||
COPY requirements.txt /tmp/ | ||
RUN python3 -m pip install -U -r /tmp/requirements.txt | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
cmake ${GDAL_SOURCE_DIR:=..} \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DCMAKE_C_FLAGS="-Werror" \ | ||
-DCMAKE_CXX_FLAGS="-Werror" \ | ||
-DUSE_CCACHE=ON \ | ||
-DGDAL_USE_GEOTIFF_INTERNAL:BOOL=ON \ | ||
-DGDAL_USE_TIFF_INTERNAL:BOOL=ON | ||
|
||
make -j$(nproc) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#!/bin/sh | ||
|
||
set -ex | ||
|
||
################## | ||
# Start services # | ||
################## | ||
|
||
# MSSQL: server side | ||
docker rm -f gdal-sql1 | ||
docker pull mcr.microsoft.com/mssql/server:2017-latest | ||
docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=DummyPassw0rd' -p 1433:1433 --name gdal-sql1 -d mcr.microsoft.com/mssql/server:2017-latest | ||
|
||
# MySQL 8 | ||
docker rm -f gdal-mysql1 | ||
docker run --name gdal-mysql1 -e MYSQL_ROOT_PASSWORD=passwd -e "MYSQL_ROOT_HOST=%" -p 33060:3306 -d mysql/mysql-server:8.0.18 mysqld --default-authentication-plugin=mysql_native_password | ||
|
||
# MariaDB 10.3.9 | ||
docker rm -f gdal-mariadb | ||
docker run --name gdal-mariadb -e MYSQL_ROOT_PASSWORD=passwd -e "MYSQL_ROOT_HOST=%" -p 33061:3306 -d mariadb:10.3.9 | ||
|
||
# PostGIS | ||
docker rm -f gdal-postgis | ||
docker run -v /home:/home --name "gdal-postgis" -p 25432:5432 -e ALLOW_IP_RANGE=0.0.0.0/0 -d -t kartoza/postgis:13.0 | ||
|
||
# Azurite (Azure simulator) | ||
docker rm -f gdal-azurite | ||
docker run -d -p 10000:10000 --name gdal-azurite mcr.microsoft.com/azure-storage/azurite azurite-blob --blobHost 0.0.0.0 | ||
|
||
# Mongo | ||
docker rm -f gdal-mongo | ||
docker run --name gdal-mongo -p 27018:27017 -d mongo:4.4 | ||
|
||
###################### | ||
# Configure services # | ||
###################### | ||
|
||
sleep 10 | ||
|
||
# MSSQL | ||
docker exec -t gdal-sql1 /opt/mssql-tools/bin/sqlcmd -l 30 -S localhost -U SA -P DummyPassw0rd -Q "CREATE DATABASE TestDB" | ||
|
||
# MySQL | ||
docker exec gdal-mysql1 sh -c "echo 'CREATE DATABASE test; SELECT Version()' | mysql -uroot -ppasswd" | ||
|
||
# MariaDB | ||
docker exec gdal-mariadb sh -c "echo 'CREATE DATABASE test; SELECT Version()' | mysql -uroot -ppasswd" | ||
|
||
# PostGIS | ||
docker exec -e PGPASSWORD=docker gdal-postgis psql -h localhost -U docker -d gis -c "CREATE DATABASE autotest" | ||
docker exec -e PGPASSWORD=docker gdal-postgis psql -h localhost -U docker -d autotest -c "CREATE EXTENSION postgis; CREATE EXTENSION postgis_raster; SELECT postgis_full_version()" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
. ../scripts/setdevenv.sh | ||
|
||
export PYTEST="python3 -m pytest -vv -p no:sugar --color=no" | ||
|
||
# Run C++ tests | ||
make quicktest | ||
|
||
# Run ogr_fgdb test in isolation due to likely conflict with libxml2 | ||
(cd autotest/ogr && $PYTEST ogr_fgdb.py) | ||
|
||
IP=host.docker.internal | ||
|
||
# Test /vsiaz/ against the Azurite simulator | ||
export AZURITE_STORAGE_CONNECTION_STRING="DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://${IP}:10000/devstoreaccount1;" | ||
AZURE_STORAGE_CONNECTION_STRING=${AZURITE_STORAGE_CONNECTION_STRING} python3 -c "from osgeo import gdal; import sys; sys.exit(gdal.Mkdir('/vsiaz/mycontainer', 0o755))" | ||
(cd autotest/gcore && AZURE_STORAGE_CONNECTION_STRING=${AZURITE_STORAGE_CONNECTION_STRING} AZ_RESOURCE=mycontainer $PYTEST vsiaz_real_instance_manual.py) | ||
|
||
# MySQL 8 | ||
(cd autotest/ogr && OGR_MYSQL_CONNECTION_STRING=mysql:test,user=root,password=passwd,port=33060,host=$IP $PYTEST ogr_mysql.py) | ||
# MariaDB 10.3.9 | ||
(cd autotest/ogr && OGR_MYSQL_CONNECTION_STRING=mysql:test,user=root,password=passwd,port=33061,host=$IP $PYTEST ogr_mysql.py) | ||
|
||
# PostGIS tests | ||
(cd autotest/ogr && OGR_PG_CONNECTION_STRING="host=$IP port=25432 dbname=autotest user=docker password=docker" $PYTEST --capture=no -ra ogr_pg.py) | ||
(cd autotest/gdrivers && PGHOST="$IP" PGPORT=25432 PGUSER=docker PGPASSWORD=docker $PYTEST --capture=no -ra postgisraster.py) | ||
|
||
# MongoDB v3 | ||
(cd autotest/ogr && MONGODBV3_TEST_PORT=27018 MONGODBV3_TEST_HOST=$IP $PYTEST ogr_mongodbv3.py) | ||
|
||
(cd autotest/ogr && OGR_MSSQL_CONNECTION_STRING="MSSQL:server=$IP;database=TestDB;driver=ODBC Driver 17 for SQL Server;UID=SA;PWD=DummyPassw0rd" $PYTEST ogr_mssqlspatial.py) | ||
|
||
# ogr_ogdi.py Fails with ERROR 1: OGDI DataSource Open Failed: Could not find the dynamic library "vrf" | ||
# ogr_fgdb.py was already run above | ||
(cd autotest && $PYTEST \ | ||
--ignore=ogr_ogdi.py \ | ||
--ignore=ogr_fgdb.py \ | ||
) |