
This commit alters the build system substantially; it adds another platform, `headless`, that provides stubs in place of all GUI functions, and provides a library `solvespace_headless` alongside the main executable. To cut down build times, only the few files that have #if defined(HEADLESS) are built twice for the executable and the library; the rest is grouped into a new `solvespace_cad` library. It is not usable on its own and just serves for grouping. This commit also gates the tests behind a -DENABLE_TESTS=ON CMake option, ON by default (but suggested as OFF in the README so that people don't ever have to install cairo to build the executable.) The tests introduced in this commit are (so far) rudimentary, although functional, and they serve as a stepping point towards introducing coverage analysis.
41 lines
1.5 KiB
YAML
41 lines
1.5 KiB
YAML
version: 2.1.{build}
|
|
clone_depth: 1
|
|
before_build:
|
|
- git submodule update --init
|
|
- mkdir build
|
|
- cd build
|
|
- set tag=x%APPVEYOR_REPO_TAG_NAME%
|
|
- if %tag:~,2% == xv (set BUILD_TYPE=RelWithDebInfo) else (set BUILD_TYPE=Debug)
|
|
- cmake -G"Visual Studio 12" -T v120_xp ..
|
|
build_script:
|
|
- msbuild "src\solvespace.vcxproj" /verbosity:minimal /property:Configuration=%BUILD_TYPE% /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
|
|
- msbuild "test\solvespace_testsuite.vcxproj" /verbosity:minimal /property:Configuration=%BUILD_TYPE% /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
|
|
test_script:
|
|
- test\%BUILD_TYPE%\solvespace_testsuite.exe
|
|
artifacts:
|
|
- path: build\src\Debug\solvespace.exe
|
|
name: solvespace.exe
|
|
- path: build\src\Debug\solvespace.pdb
|
|
name: solvespace.pdb
|
|
- path: build\src\RelWithDebInfo\solvespace.exe
|
|
name: solvespace.exe
|
|
- path: build\src\RelWithDebInfo\solvespace.pdb
|
|
name: solvespace.pdb
|
|
deploy:
|
|
# Releases to solvespace/solvespace
|
|
- provider: GitHub
|
|
auth_token:
|
|
secure: P9/pf2nM+jlWKe7pCjMp41HycBNP/+5AsmE/TETrDUoBOa/9WFHelqdVFrbRn9IC
|
|
description: ""
|
|
artifact: solvespace.exe
|
|
on:
|
|
appveyor_repo_tag: true
|
|
# Releases to whitequark/solvespace (to be removed)
|
|
- provider: GitHub
|
|
auth_token:
|
|
secure: Flqxu1cz6PyxVT1wzTP4bSrQOY8wFrO7pJxYxvjEkLqIUU4dsDQrs2rac/A9deet
|
|
description: ""
|
|
artifact: solvespace.exe
|
|
on:
|
|
appveyor_repo_tag: true
|