Add MSVC CI builder.
parent
de609637d1
commit
bd616e898d
27
appveyor.yml
27
appveyor.yml
|
@ -6,8 +6,13 @@ environment:
|
||||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
|
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
|
||||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
||||||
PYTHON_DIR: C:\Python36-x64
|
PYTHON_DIR: C:\Python36-x64
|
||||||
|
COMPILER: mingw32
|
||||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
||||||
PYTHON_DIR: C:\Python37-x64
|
PYTHON_DIR: C:\Python37-x64
|
||||||
|
COMPILER: mingw32
|
||||||
|
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
||||||
|
PYTHON_DIR: C:\Python37-x64
|
||||||
|
COMPILER: msvc
|
||||||
for:
|
for:
|
||||||
- matrix:
|
- matrix:
|
||||||
only:
|
only:
|
||||||
|
@ -33,12 +38,10 @@ for:
|
||||||
on:
|
on:
|
||||||
APPVEYOR_REPO_NAME: solvespace/solvespace
|
APPVEYOR_REPO_NAME: solvespace/solvespace
|
||||||
APPVEYOR_REPO_TAG: true
|
APPVEYOR_REPO_TAG: true
|
||||||
|
|
||||||
- matrix:
|
- matrix:
|
||||||
only:
|
only:
|
||||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
||||||
PYTHON_DIR: C:\Python36-x64
|
install:
|
||||||
install: &python-install
|
|
||||||
# Environment variables
|
# Environment variables
|
||||||
- set Path=%MSYS_DIR%\mingw64\bin;%MSYS_DIR%\usr\bin;%Path%
|
- set Path=%MSYS_DIR%\mingw64\bin;%MSYS_DIR%\usr\bin;%Path%
|
||||||
- set Path=%PYTHON_DIR%;%PYTHON_DIR%\Scripts;%Path%
|
- set Path=%PYTHON_DIR%;%PYTHON_DIR%\Scripts;%Path%
|
||||||
|
@ -48,32 +51,24 @@ for:
|
||||||
# Upgrade setuptools
|
# Upgrade setuptools
|
||||||
- pip install setuptools -U
|
- pip install setuptools -U
|
||||||
# Set Python compiler to MinGW
|
# Set Python compiler to MinGW
|
||||||
- cython\platform\set_pycompiler %PYTHON_DIR%
|
- cython\platform\set_pycompiler %PYTHON_DIR% %COMPILER%
|
||||||
# Install modules
|
# Install modules
|
||||||
- pip install -r cython\requirements.txt
|
- pip install -r cython\requirements.txt
|
||||||
# Show tool kits
|
# Show tool kits
|
||||||
- gcc --version
|
- gcc --version
|
||||||
- mingw32-make --version
|
- mingw32-make --version
|
||||||
build_script: &python-script
|
build_script:
|
||||||
- cd cython && python setup.py test && cd ..
|
- cd cython && python setup.py test && cd ..
|
||||||
after_build: &python-deploy
|
after_build:
|
||||||
# PyPI deployment
|
# PyPI deployment
|
||||||
- IF "%APPVEYOR_REPO_TAG%"=="true"
|
- IF "%APPVEYOR_REPO_TAG%"=="true"
|
||||||
IF "%APPVEYOR_REPO_NAME%"=="KmolYuan/solvespace" (
|
IF "%APPVEYOR_REPO_NAME%"=="KmolYuan/solvespace"
|
||||||
|
IF "%COMPILER%"=="mingw32" (
|
||||||
pip install twine &&
|
pip install twine &&
|
||||||
cd cython &&
|
cd cython &&
|
||||||
python setup.py bdist_wheel &&
|
python setup.py bdist_wheel &&
|
||||||
twine upload dist\*.whl --skip-existing
|
twine upload dist\*.whl --skip-existing
|
||||||
)
|
)
|
||||||
|
|
||||||
- matrix:
|
|
||||||
only:
|
|
||||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
|
||||||
PYTHON_DIR: C:\Python37-x64
|
|
||||||
install: *python-install
|
|
||||||
build_script: *python-script
|
|
||||||
after_build: *python-deploy
|
|
||||||
|
|
||||||
artifacts:
|
artifacts:
|
||||||
- path: build\bin\%BUILD_TYPE%\solvespace.exe
|
- path: build\bin\%BUILD_TYPE%\solvespace.exe
|
||||||
name: solvespace.exe
|
name: solvespace.exe
|
||||||
|
|
|
@ -1,14 +1,16 @@
|
||||||
echo off
|
echo off
|
||||||
|
|
||||||
REM Usage: set_pycompiler C:\Python37
|
REM Usage: set_pycompiler C:\Python37 mingw32
|
||||||
REM Where %PYTHON_DIR% is the directory of your Python installation.
|
REM Where %PYTHON_DIR% is the directory of your Python installation.
|
||||||
|
REM Compiler option can be "mingw32" or "msvc".
|
||||||
REM In Pyslvs project.
|
REM In Pyslvs project.
|
||||||
set HERE=%~dp0
|
set HERE=%~dp0
|
||||||
set PYTHON_DIR=%1
|
set PYTHON_DIR=%1
|
||||||
|
set COMPILER=%2
|
||||||
|
|
||||||
REM Create "distutils.cfg"
|
REM Create "distutils.cfg"
|
||||||
echo [build]>> "%PYTHON_DIR%\Lib\distutils\distutils.cfg"
|
echo [build]>> "%PYTHON_DIR%\Lib\distutils\distutils.cfg"
|
||||||
echo compiler=mingw32>> "%PYTHON_DIR%\Lib\distutils\distutils.cfg"
|
echo compiler=%COMPILER%>> "%PYTHON_DIR%\Lib\distutils\distutils.cfg"
|
||||||
|
|
||||||
REM Apply the patch of "cygwinccompiler.py".
|
REM Apply the patch of "cygwinccompiler.py".
|
||||||
REM Unix "patch" command of Msys.
|
REM Unix "patch" command of Msys.
|
||||||
|
|
Loading…
Reference in New Issue