-
Notifications
You must be signed in to change notification settings - Fork 35
/
appveyor.yml
110 lines (92 loc) · 4.76 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# Windows testing using Visual Studio.
# Syntax for this file:
# http://www.appveyor.com/docs/appveyor-yml
# 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
# this fails now because the repo is private
shallow_clone: false
os: 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:
# Avoid slow downloads on Azure.
APPVEYOR_BUILD_ARTIFACT_STORAGE: gce-artifacts-us
init:
## Set environment variables.
- ps: $env:JAVA_HOME = "C:\Program Files\Java\jdk1.8.0"
- ps: $env:JAVA_HOME
# Used by FindAnt.cmake:
- ps: $env:ANT_HOME = "C:\Program Files\NetBeans 8.2\extide\ant"
- ps: $env:OPENSIM_HOME = "C:/OpenSim"
# Java must be on the PATH for Ant to find (Ant is run through CMake).
- ps: $env:PATH = "$env:JAVA_HOME/bin;$env:OPENSIM_HOME/bin;$env:PATH"
- ps: $env:PATH
#- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
install:
#- ps: choco install jdk8 # We no longer get NetBeans through choco; this means we can use AppVeyor's provided JDK.
## The GUI is built with the Netbeans platform.
# We need 8.2 and this isn't available on Chocolatey.
#- ps: choco install netbeans-jee --version 8.1 --yes --limit-output --allow-empty-checksums| Out-Null
# https://netbeans.org/downloads/start.html?platform=windows&lang=en&option=javase
- appveyor DownloadFile http://download.netbeans.org/netbeans/8.2/final/bundles/netbeans-8.2-javase-windows.exe
# Make sure the NetBeans installer is not corrupted.
- ps: $expectedHash = "7b0646306a7488e617837da1517a86c08b7cf6fbe4dd9d74e8a4564b5ffde004".ToUpper()
- ps: $hashFromFile = Get-FileHash -Algorithm SHA256 -Path .\netbeans-8.2-javase-windows.exe
- ps: if (($hashFromFile.Hash) -ne ($expectedHash)) { Write-Error "Hash doesn't match." }
# Install NetBeans
- ps: .\netbeans-8.2-javase-windows.exe --silent | Out-Null # This installer is gregaroius.
## Apache Ant for building Java projects.
#- choco install ant --yes --limit-output # Provided by NetBeans.
## OpenSim (and Simbody).
# OpenSim's installation is pushed to our Appveyor NuGet account feed.
# http://help.appveyor.com/discussions/problems/6024-build-stalled-prompting-for-nuget-permissions#comment_41867748
- nuget sources add -name opensim-core -source https://ci.appveyor.com/nuget/opensim-core-kd63opes1em0
- nuget install opensim-core-VC141 -Version 0.0.0 -ExcludeVersion -OutputDirectory C:\
- dir C:\
# Only get certain submodules (not OpenSimAPI).
- git submodule update --init --recursive -- opensim-models opensim-visualizer Gui/opensim/threejs
build_script:
- ps: mkdir ../build
- cd ../build
- cmake ../opensim-gui -G"Visual Studio 15 2017 Win64" -DCMAKE_PREFIX_PATH=C:\opensim-core-VC141 -DANT_ARGS="-Dnbplatform.default.netbeans.dest.dir=C:/Program Files/NetBeans 8.2;-Dnbplatform.default.harness.dir=C:/Program Files/NetBeans 8.2/harness"
- cmake --build . --target CopyOpenSimCore --config Release
- cmake --build . --target CopyModels --config Release
- cmake --build . --target PrepareInstaller --config Release
- cmake --build . --target CopyJRE --config Release
- cmake --build . --target CopyVisualizer --config Release
#
# TODO edit the .opensim folder name (in opensim.conf)
# Read the value of the cache variable storing the GUI build version.
- ps: $env:match = cmake -L . | Select-String -Pattern OPENSIMGUI_BUILD_VERSION
- ps: $env:VERSION = $env:match.split('=')[1]
- ps: $env:VERSION
test_script:
## Run tests.
- echo "No tests yet."
# ant run
after_test:
## On master branch, create package for 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
- IF %APPVEYOR_REPO_BRANCH% EQU master SET DISTR=TRUE
# Create and upload package.
- cd %APPVEYOR_BUILD_FOLDER%\Gui\opensim\dist\installer\
- IF DEFINED DISTR "C:/Program Files (x86)/NSIS/makensis.exe" make_installer.nsi
- IF DEFINED DISTR appveyor PushArtifact OpenSim-%VERSION%-win64.exe
- cd %APPVEYOR_BUILD_FOLDER%
- IF DEFINED DISTR 7z a C:\OpenSim-%VERSION%.zip %APPVEYOR_BUILD_FOLDER%\Gui\opensim\dist\installer\opensim\
- IF DEFINED DISTR appveyor PushArtifact C:\OpenSim-%VERSION%.zip
# deploy:
# provider: SFTP
# protocol: ftps
# host: frs.sourceforge.net
# username: opensim-bot,myosin
# password:
# secure: OlJM0z185NHw/D0pXoEZdw==
# folder: /home/frs/project/myosin/opensim-gui
# artifact: OpenSim-%VERSION%-win64.exe
# # TODO on:
# # TODO branch: master