2018-07-12 21:45:50 +00:00
|
|
|
version: '{build}'
|
2016-04-19 12:19:00 +00:00
|
|
|
clone_depth: 1
|
2019-09-23 05:28:43 +00:00
|
|
|
environment:
|
|
|
|
MSYS_DIR: C:\msys64
|
|
|
|
matrix:
|
2020-07-08 07:58:13 +00:00
|
|
|
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
|
|
|
CPP: true
|
2019-09-23 05:28:43 +00:00
|
|
|
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
2020-07-07 06:55:03 +00:00
|
|
|
PY: 36
|
2019-10-08 13:25:03 +00:00
|
|
|
COMPILER: mingw32
|
2019-09-23 05:28:43 +00:00
|
|
|
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
2020-07-07 06:55:03 +00:00
|
|
|
PY: 37
|
2019-10-08 13:25:03 +00:00
|
|
|
COMPILER: mingw32
|
|
|
|
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
2020-07-07 06:55:03 +00:00
|
|
|
PY: 38
|
|
|
|
COMPILER: mingw32
|
|
|
|
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
|
|
|
PY: 38
|
2019-10-08 13:25:03 +00:00
|
|
|
COMPILER: msvc
|
2019-09-20 08:36:21 +00:00
|
|
|
for:
|
2019-09-23 05:28:43 +00:00
|
|
|
- matrix:
|
|
|
|
only:
|
2020-07-08 07:58:13 +00:00
|
|
|
- CPP: true
|
2019-09-20 08:36:21 +00:00
|
|
|
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
|
2020-07-07 06:48:16 +00:00
|
|
|
- cmake -G"Visual Studio 14" -Tv140 -Bbuild -H.
|
2019-09-20 08:36:21 +00:00
|
|
|
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
|
2019-09-23 05:28:43 +00:00
|
|
|
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
|
2019-10-08 13:25:03 +00:00
|
|
|
install:
|
2020-07-31 08:17:36 +00:00
|
|
|
- git submodule update --init -- extlib/mimalloc
|
2019-10-27 12:58:21 +00:00
|
|
|
# Install Python-dev
|
|
|
|
- IF DEFINED PYTHON_DEV choco install -y python --version %PYTHON_DEV%
|
2019-09-23 05:28:43 +00:00
|
|
|
# Environment variables
|
2020-07-07 06:55:03 +00:00
|
|
|
- set PYTHON_DIR=C:\Python%PY%-x64
|
2019-09-23 05:28:43 +00:00
|
|
|
- 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
|
2019-10-08 13:25:03 +00:00
|
|
|
- cython\platform\set_pycompiler %PYTHON_DIR% %COMPILER%
|
2019-09-23 05:28:43 +00:00
|
|
|
# Install modules
|
|
|
|
- pip install -r cython\requirements.txt
|
2019-10-08 13:25:03 +00:00
|
|
|
build_script:
|
2019-09-23 05:28:43 +00:00
|
|
|
- cd cython && python setup.py test && cd ..
|
2019-10-08 13:25:03 +00:00
|
|
|
after_build:
|
2019-09-23 05:28:43 +00:00
|
|
|
# PyPI deployment
|
|
|
|
- IF "%APPVEYOR_REPO_TAG%"=="true"
|
2020-01-29 03:46:58 +00:00
|
|
|
IF "%APPVEYOR_REPO_NAME%"=="KmolYuan/solvespace" (
|
2020-10-05 06:29:02 +00:00
|
|
|
pip install wheel twine &&
|
2019-09-23 05:28:43 +00:00
|
|
|
cd cython &&
|
|
|
|
python setup.py bdist_wheel &&
|
|
|
|
twine upload dist\*.whl --skip-existing
|
|
|
|
)
|
2015-09-13 11:19:15 +00:00
|
|
|
artifacts:
|
Use the same code for loading resources in all executables.
All of our executables need resources; e.g. the vector font is
a resource and it is necessary for generation. Before this commit,
the GUI executable loaded the resources in a nice way, and everything
else did it in a very ad-hoc, fragile way.
After this commit, all executables are placed in <build>/bin and
follow the same algorithm:
* On Windows, resources are compiled and linked into every
executable.
* On Linux, resources are copied into <build>/res (which is
tried first) and <prefix>/share/solvespace (which is tried
second).
* On macOS, resources are copied into <build>/res (which is
tried first) and <build>/bin/solvespace.app/Contents/Resources
(which is tried second).
In practice this means that we can add as many executables as we want
without duplicating lots of code. In addition, on macOS, we can
place supplementary executables into the bundle, and they can use
resources from the bundle transparently.
2016-11-28 04:16:18 +00:00
|
|
|
- path: build\bin\%BUILD_TYPE%\solvespace.exe
|
2015-09-13 11:19:15 +00:00
|
|
|
name: solvespace.exe
|
2016-11-29 02:57:41 +00:00
|
|
|
- path: build\bin\%BUILD_TYPE%\solvespace-cli.exe
|
|
|
|
name: solvespace-cli.exe
|
Use the same code for loading resources in all executables.
All of our executables need resources; e.g. the vector font is
a resource and it is necessary for generation. Before this commit,
the GUI executable loaded the resources in a nice way, and everything
else did it in a very ad-hoc, fragile way.
After this commit, all executables are placed in <build>/bin and
follow the same algorithm:
* On Windows, resources are compiled and linked into every
executable.
* On Linux, resources are copied into <build>/res (which is
tried first) and <prefix>/share/solvespace (which is tried
second).
* On macOS, resources are copied into <build>/res (which is
tried first) and <build>/bin/solvespace.app/Contents/Resources
(which is tried second).
In practice this means that we can add as many executables as we want
without duplicating lots of code. In addition, on macOS, we can
place supplementary executables into the bundle, and they can use
resources from the bundle transparently.
2016-11-28 04:16:18 +00:00
|
|
|
- path: build\bin\%BUILD_TYPE%\solvespace.pdb
|
2015-09-13 11:19:15 +00:00
|
|
|
name: solvespace.pdb
|