forked from simbody/simbody
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
60 lines (48 loc) · 2.29 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Windows testing using Visual Studio.
# Syntax for this file:
# http://www.appveyor.com/docs/appveyor-yml
# See http://msdn.microsoft.com/en-us/library/ms164311.aspx for
# command-line options to MSBuild.
# Speeding up a Visual Studio build.
# http://blogs.msdn.com/b/vcblog/archive/2011/01/05/damn-my-vc-project-is-building-slower-in-vs2010-what-do-i-do-now-a-step-by-step-guide.aspx
shallow_clone: true
image: Visual Studio 2017
platform: x64
# No need to run CI on the branch if we're also running CI for a PR.
skip_branch_with_pr: true
nuget:
disable_publish_on_pr: true
environment:
CMAKE_GENERATOR: "Visual Studio 15 2017 Win64"
matrix:
# Use the Visual Studio 14 2015 toolset.
- CMAKE_TOOLSET: "v140"
NUGET_PACKAGE_ID_SUFFIX: "-VC140"
# Use the Visual Studio 15 2017 toolset.
- CMAKE_TOOLSET: "v141"
NUGET_PACKAGE_ID_SUFFIX: "-VC141"
build_script:
# Must create separate build dir, otherwise can't read test files
# for some reason.
- mkdir build
- cd build
# Treat all warnings as errors.
- cmake .. -G"%CMAKE_GENERATOR%" -T"%CMAKE_TOOLSET%" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=C:\simbody
# See http://msdn.microsoft.com/en-us/library/ms164311.aspx for
# command-line options to MSBuild.
- cmake --build . --target ALL_BUILD --config Release -- /maxcpucount:4 /verbosity:quiet /p:TreatWarningsAsErrors="true"
test_script:
- ctest --parallel 4 --build-config Release --output-on-failure
after_test:
## On master branch, create NuGet package for Simbody, for use by OpenSim.
# Detect if we are on the master branch.
- IF %APPVEYOR_REPO_BRANCH% EQU master IF NOT DEFINED APPVEYOR_PULL_REQUEST_NUMBER SET DISTR=TRUE
# Install Simbody.
- IF DEFINED DISTR cmake --build . --target install --config Release -- /maxcpucount /verbosity:quiet
# Create NuGet package.
- IF DEFINED DISTR cd %APPVEYOR_BUILD_FOLDER%
# Create a nupkg. The install directory is to be packaged.
- IF DEFINED DISTR nuget pack doc/.simbody.nuspec -Properties "packageIdSuffix=%NUGET_PACKAGE_ID_SUFFIX%" -BasePath C:\simbody
# The line above creates the file simbody%NUGET_PACKAGE_ID_SUFFIX%.0.0.0.nupkg.
# Push this file to Appveyor's NuGet account feed, to be used by OpenSim.
- IF DEFINED DISTR appveyor PushArtifact simbody%NUGET_PACKAGE_ID_SUFFIX%.0.0.0.nupkg