Skip to content
Permalink
Browse files
Add automated Wheel builds pushed to pypi
  • Loading branch information
geographika committed Mar 3, 2020
1 parent a41e496 commit 2ecb9d8fe9754def947d95936e98bb353a304468
Showing 1 changed file with 29 additions and 14 deletions.
@@ -10,6 +10,12 @@ cache:
- '%APPVEYOR_BUILD_FOLDER%\swigwin-4.0.1.zip'

environment:

global:
TWINE_USERNAME: geographika
TWINE_PASSWORD:
secure: 6yuYlaTUIL8SRBakWTke8w==

# VS 2017
VS_VERSION: Visual Studio 15 2017
matrix:
@@ -18,13 +24,13 @@ environment:
SWIG_VER: swigwin-3.0.12
- platform: x64
PYTHON_EXECUTABLE: c:/python27-x64/python.exe
SWIG_VER: swigwin-4.0.1
SWIG_VER: swigwin-4.0.1
- platform: x64
PYTHON_EXECUTABLE: c:/python36-x64/python.exe
SWIG_VER: swigwin-4.0.1
SWIG_VER: swigwin-4.0.1

services:
- mssql2017
services:
- mssql2017

matrix:
fast_finish: true
@@ -63,13 +69,13 @@ build_script:
- set "PROJECT_BINARY_DIR=%BUILD_FOLDER%/build"
- cmake -G "%VS_FULL%" .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=%SDK_PREFIX% -DFREETYPE_INCLUDE_DIR_freetype2=%SDK_INC%/freetype -DFREETYPE_INCLUDE_DIR_ft2build=%SDK_INC%/freetype -DFREETYPE_LIBRARY=%SDK_LIB%/freetype.lib -DZLIB_INCLUDE_DIR=%SDK_INC% -DZLIB_LIBRARY=%SDK_LIB%/zlib.lib -DPNG_PNG_INCLUDE_DIR=%SDK_INC% -DPNG_LIBRARY=%SDK_LIB%/libpng.lib -DPNG_LIBRARIES=%SDK_LIB%/libpng.lib -DJPEG_INCLUDE_DIR=%SDK_INC% -DJPEG_LIBRARY=%SDK_LIB%/libjpeg.lib -DPROJ_INCLUDE_DIR=%SDK_INC% -DPROJ_LIBRARY=%SDK_LIB%/proj_i.lib -DFRIBIDI_INCLUDE_DIR=%SDK_INC% -DFRIBIDI_LIBRARY=%SDK_LIB%/fribidi.lib -DHARFBUZZ_INCLUDE_DIR=%SDK_INC%/harfbuzz -DHARFBUZZ_LIBRARY=%SDK_LIB%/harfbuzz.lib -DICONV_INCLUDE_DIR=%SDK_INC% -DICONV_LIBRARY=%SDK_LIB%/iconv.lib -DICONV_DLL=%SDK_BIN%/iconv.dll -DCAIRO_INCLUDE_DIR=%SDK_INC% -DCAIRO_LIBRARY=%SDK_LIB%/cairo.lib -DFCGI_INCLUDE_DIR=%SDK_INC% -DFCGI_LIBRARY=%SDK_LIB%/libfcgi.lib -DGEOS_INCLUDE_DIR=%SDK_INC% -DGEOS_LIBRARY=%SDK_LIB%/geos_c.lib -DPOSTGRESQL_INCLUDE_DIR=%SDK_INC% -DPOSTGRESQL_LIBRARY=%SDK_LIB%/libpqdll.lib -DGDAL_INCLUDE_DIR=%SDK_INC% -DGDAL_LIBRARY=%SDK_LIB%/gdal_i.lib -DLIBXML2_INCLUDE_DIR=%SDK_INC%/libxml -DLIBXML2_LIBRARIES=%SDK_LIB%/libxml2.lib -DGIF_INCLUDE_DIR=%SDK_INC% -DGIF_LIBRARY=%SDK_LIB%/giflib.lib -DWITH_CURL=1 -DCURL_INCLUDE_DIR=%SDK_INC% -DCURL_LIBRARY=%SDK_LIB%/libcurl_imp.lib -DMS_EXTERNAL_LIBS=wsock32.lib -DWITH_SOS=1 -DWITH_CLIENT_WFS=1 -DWITH_CLIENT_WMS=1 -DSVG_INCLUDE_DIR=%SDK_INC% -DSVG_LIBRARY=%SDK_LIB%/libsvg.lib -DSVGCAIRO_INCLUDE_DIR=%SDK_INC% -DSVGCAIRO_LIBRARY=%SDK_LIB%/libsvg-cairo.lib -DWITH_SVGCAIRO=1 -DREGEX_DIR=%REGEX_DIR% -DWITH_POINT_Z_M=1 -DWITH_KML=1 -DWITH_THREAD_SAFETY=1 -DSWIG_EXECUTABLE=%SWIG_EXECUTABLE% -DWITH_PYTHON=1 -DPYTHON_EXECUTABLE=%PYTHON_EXECUTABLE% -DWITH_CSHARP=1 -DWITH_MSSQL2008=1 -DPROTOBUFC_COMPILER=%SDK_BIN%/protoc.exe -DPROTOBUFC_LIBRARY=%SDK_LIB%/protobuf-c.lib -DPROTOBUFC_INCLUDE_DIR=%SDK_INC%/include/protobuf-c -DWITH_PROTOBUFC=1 -DCMAKE_C_FLAGS="/WX" -DCMAKE_CXX_FLAGS="/WX"
- cmake --build . --config Release
- cd %BUILD_FOLDER%/build
- set PATH=%BUILD_FOLDER%/build/Release;%SDK_BIN%;%PATH%
- set PROJ_LIB=%SDK_BIN%/proj/SHARE
- cd %BUILD_FOLDER%/build
- set PATH=%BUILD_FOLDER%/build/Release;%SDK_BIN%;%PATH%
- set PROJ_LIB=%SDK_BIN%/proj/SHARE
- cmake --build . --target pythonmapscript-wheel --config Release

before_test:
- set PATH=%PATH%;%SDK_BIN%/gdal/apps
before_test:
- set PATH=%PATH%;%SDK_BIN%/gdal/apps
- cd %BUILD_FOLDER%/msautotest
- set PROJ_LIB=%SDK_BIN%/proj6/share
- "./mssql/create_mssql_db.bat"
@@ -78,22 +84,31 @@ before_test:

test_script:
- set PROJ_LIB=%SDK_BIN%/proj/SHARE
- cd %BUILD_FOLDER%/msautotest/mssql
- cd %BUILD_FOLDER%/msautotest/mssql
- "%PYTHON_EXECUTABLE% run_test.py"
- cd %BUILD_FOLDER%/msautotest/mspython
- cd %BUILD_FOLDER%/msautotest/mspython
- "%PYTHON_EXECUTABLE% run_all_tests.py"

deploy: off

after_test:
- cd %BUILD_FOLDER%
- 7z a mapserver.zip ./build/* > nul

# Uncomment to enable debugging on the server
#on_finish:
# on_finish:
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))

artifacts:
- path: mapserver.zip
name: mapserver
type: zip

deploy_script:
- ps: |
if ($env:APPVEYOR_REPO_BRANCH -ne "master" -or $env:APPVEYOR_REPO_TAG -ne $TRUE) { return }
if ($env:PYTHON_EXECUTABLE -eq "c:/python36-x64/python.exe") {
cd $env:APPVEYOR_BUILD_FOLDER\build\mapscript\python\Release
& $env:PYTHON_EXECUTABLE setup.py sdist
}
echo "Deploying Python Wheel to PyPI"
& $env:PYTHON_EXECUTABLE -m pip --disable-pip-version-check install twine
& $env:PYTHON_EXECUTABLE -m twine upload --repository-url https://test.pypi.org/legacy/ --skip-existing $env:APPVEYOR_BUILD_FOLDER\build\mapscript\python\Release\dist\*

0 comments on commit 2ecb9d8

Please sign in to comment.