82 lines
3.0 KiB
YAML
82 lines
3.0 KiB
YAML
version: '{build}'
|
|
clone_depth: 1
|
|
environment:
|
|
MSYS_DIR: C:\msys64
|
|
matrix:
|
|
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
|
CPP: true
|
|
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
|
PY: 36
|
|
COMPILER: mingw32
|
|
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
|
PY: 37
|
|
COMPILER: mingw32
|
|
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
|
PY: 38
|
|
COMPILER: mingw32
|
|
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
|
PY: 38
|
|
COMPILER: msvc
|
|
for:
|
|
- matrix:
|
|
only:
|
|
- CPP: true
|
|
before_build:
|
|
- git submodule update --init
|
|
- set tag=x%APPVEYOR_REPO_TAG_NAME%
|
|
- if %tag:~,2% == xv (set BUILD_TYPE=RelWithDebInfo) else (set BUILD_TYPE=Debug)
|
|
- mkdir build
|
|
- cmake -G"Visual Studio 14" -Tv140 -Bbuild -H.
|
|
build_script:
|
|
- msbuild "build\src\solvespace.vcxproj" /verbosity:minimal /property:Configuration=%BUILD_TYPE% /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
|
|
- msbuild "build\src\solvespace-cli.vcxproj" /verbosity:minimal /property:Configuration=%BUILD_TYPE% /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
|
|
- msbuild "build\test\solvespace-testsuite.vcxproj" /verbosity:minimal /property:Configuration=%BUILD_TYPE% /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
|
|
test_script:
|
|
- build\bin\%BUILD_TYPE%\solvespace-testsuite.exe
|
|
deploy:
|
|
- provider: GitHub
|
|
auth_token:
|
|
secure: P9/pf2nM+jlWKe7pCjMp41HycBNP/+5AsmE/TETrDUoBOa/9WFHelqdVFrbRn9IC
|
|
description: ""
|
|
artifact: solvespace.exe,solvespace-cli.exe,solvespace.pdb
|
|
on:
|
|
APPVEYOR_REPO_NAME: solvespace/solvespace
|
|
APPVEYOR_REPO_TAG: true
|
|
- matrix:
|
|
only:
|
|
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
|
install:
|
|
# Install Python-dev
|
|
- IF DEFINED PYTHON_DEV choco install -y python --version %PYTHON_DEV%
|
|
# Environment variables
|
|
- set PYTHON_DIR=C:\Python%PY%-x64
|
|
- set Path=%MSYS_DIR%\mingw64\bin;%MSYS_DIR%\usr\bin;%Path%
|
|
- set Path=%PYTHON_DIR%;%PYTHON_DIR%\Scripts;%Path%
|
|
# Show Python
|
|
- python --version
|
|
- pip --version
|
|
# Upgrade setuptools
|
|
- pip install setuptools -U
|
|
# Set Python compiler to MinGW
|
|
- cython\platform\set_pycompiler %PYTHON_DIR% %COMPILER%
|
|
# Install modules
|
|
- pip install -r cython\requirements.txt
|
|
build_script:
|
|
- cd cython && python setup.py test && cd ..
|
|
after_build:
|
|
# PyPI deployment
|
|
- IF "%APPVEYOR_REPO_TAG%"=="true"
|
|
IF "%APPVEYOR_REPO_NAME%"=="KmolYuan/solvespace" (
|
|
pip install twine &&
|
|
cd cython &&
|
|
python setup.py bdist_wheel &&
|
|
twine upload dist\*.whl --skip-existing
|
|
)
|
|
artifacts:
|
|
- path: build\bin\%BUILD_TYPE%\solvespace.exe
|
|
name: solvespace.exe
|
|
- path: build\bin\%BUILD_TYPE%\solvespace-cli.exe
|
|
name: solvespace-cli.exe
|
|
- path: build\bin\%BUILD_TYPE%\solvespace.pdb
|
|
name: solvespace.pdb
|