forked from DLR-SC/tigl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
158 lines (141 loc) · 4.7 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
version: '{build}'
os: Visual Studio 2015
environment:
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
ARCH: x86
TYPE: STATIC
GENERATOR: Ninja
CONDA_INSTALL_LOCN: C:\\Miniconda35
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
ARCH: amd64
TYPE: STATIC
GENERATOR: Ninja
CONDA_INSTALL_LOCN: C:\\Miniconda35-x64
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
ARCH: amd64
TYPE: DYNAMIC
GENERATOR: Ninja
CONDA_INSTALL_LOCN: C:\\Miniconda35-x64
matrix:
fast_finish: true
build:
verbosity: minimal
artifacts:
- path: '*.zip'
name: binaries
- path: '*.exe'
name: installer
deploy:
- provider: FTP
protocol: sftp
host: frs.sourceforge.net
username:
secure: HZlK5sZGRgSoPQQI6EgdtsFtTj/ZAfdSPdLLxt8FeuE=
password:
secure: z0kfNd+oRq/PHvJumrSOpA==
folder: files/Nightlies-Windows
on:
appveyor_scheduled_build: true
- provider: Environment
name: GitHub
on:
appveyor_repo_tag: true
install:
- call %CONDA_INSTALL_LOCN%\Scripts\activate.bat
- ps: |
if ($env:TYPE -eq "STATIC")
{
& conda install --yes tixi3>=3.0.3 oce-static=0.17.2 freetype-static=2.6 freeimageplus-static=3.17.0 ninja doxygen swig>=3.0.11 -c dlr-sc -c dlr-sc/label/tigl-dev
}
if ($env:TYPE -eq "DYNAMIC")
{
& conda install --yes tixi3>=3.0.3 oce=0.17.2 freetype=2.6.5 freeimageplus=3.18.0 tbb-devel ninja doxygen swig>=3.0.11 pythonocc-core=0.17.3 -c dlr-sc -c dlr-sc/label/tigl-dev
}
-
- ps: |
Write-Output "Platform: $env:ARCH"
$qtdist = "5.10.1/msvc2015"
if ($env:ARCH -eq "amd64")
{
$qtdist = "5.10.1/msvc2015_64"
}
- ps: |
If (!(Test-Path -Path "c:\matlab-libs-win")) {
Write-Output "Downloading matlab libraries"
(new-object System.Net.WebClient).Downloadfile("https://sourceforge.net/projects/tigl/files/Thirdparty/matlab-libs-win.zip", "c:\matlab-libs-win.zip")
Write-Output "Extract matlab libraries"
& 7z x -y "c:\matlab-libs-win.zip" -oC:\ > null
}
# Download clcache
- pip install git+https://github.com/frerich/clcache.git
- set CLCACHE_DIR=c:\clcache-cache\vc2015\%ARCH%
- clcache.exe -s
- set CC=clcache.exe
- set CXX=clcache.exe
- set CLCACHE_SERVER=1
- set CLCACHE_HARDLINK=1
# start the clcache server
- powershell.exe -Command "Start-Process clcache-server"
# check if release build, if yes we need nsis
- ps: |
$BUILD_RELEASE = $($env:appveyor_repo_tag -eq "true")
$BUILD_NIGHTLY = "ON"
if ($env:TYPE -eq "DYNAMIC")
{
$BUILD_RELEASE = 0
}
if ($BUILD_RELEASE) {
$BUILD_NIGHTLY = "OFF"
Write-Output "Release builds enabled."
}
before_build:
# Setup compiler paths #
- call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %ARCH%
build_script:
- ps: |
md _build -Force | Out-Null
cd _build
Write-Output "Running cmake: -G "$env:GENERATOR" -DOCE_STATIC_LIBS=ON -DCMAKE_INSTALL_PREFIX=install -DTIGL_CONCAT_GENERATED_FILES=ON -DCMAKE_PREFIX_PATH=$env:CONDA_INSTALL_LOCN\Library -DTIGL_BINDINGS_MATLAB=ON -DTIGL_BINDINGS_JAVA=ON -DTIGL_NIGHTLY=$BUILD_NIGHTLY -DQT_PATH=c:\Qt\$qtdist -DMATLAB_DIR=c:\matlab-libs-win .."
& cmake -G "$env:GENERATOR" -DTIGL_BINDINGS_INSTALL_CPP=ON -DOCE_STATIC_LIBS=ON -DCMAKE_INSTALL_PREFIX=install -DTIGL_CONCAT_GENERATED_FILES=ON -DCMAKE_PREFIX_PATH=$env:CONDA_INSTALL_LOCN\Library -DTIGL_BINDINGS_MATLAB=ON -DTIGL_BINDINGS_JAVA=ON -DTIGL_NIGHTLY="$BUILD_NIGHTLY" -DQT_PATH=c:\Qt\$qtdist -DMATLAB_DIR=c:\matlab-libs-win ..
if ($LastExitCode -ne 0) {
throw "Exec: $ErrorMessage"
}
- ps: |
if ($env:TYPE -eq "DYNAMIC")
{
& cmake -DTIGL_BINDINGS_PYTHON_INTERNAL=ON .
}
- ps: |
& cmake --build . --target install
if ($LastExitCode -ne 0) {
throw "Exec: $ErrorMessage"
}
after_build:
- clcache.exe -s
test_script:
- cmake --build . --target tigl-java-demo
- cd ../tests/unittests
- mkdir _build
- cd _build
- cmake -G %GENERATOR% -DCMAKE_PREFIX_PATH=C:\projects\tigl\_build\install;%CONDA_INSTALL_LOCN%\Library -DCMAKE_BUILD_TYPE=Release ..
- cmake --build .
- TiGL-unittests.exe --gtest_output=xml:test_results.xml
# Upload test results
- ps: (new-object net.webclient).UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\test_results.xml))
after_test:
- cd C:\projects\tigl\_build
- ps: |
& cmake --build . --target doc
& cpack -G ZIP
& mv *.zip ..
- ps : |
if ($BUILD_RELEASE)
{
cpack -G NSIS
mv *.exe ..
}
cache:
- c:\redist
- c:\matlab-libs-win
- c:\clcache-cache