-
Notifications
You must be signed in to change notification settings - Fork 166
/
.appveyor.yaml
207 lines (184 loc) · 9.36 KB
/
.appveyor.yaml
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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
image:
- macos-monterey
- Visual Studio 2022
- Ubuntu
environment:
GIT_REDIRECT_STDERR: '2>&1'
APPVEYOR_YML_DISABLE_PS_LINUX: true
APPVEYOR_SAVE_CACHE_ON_ERROR: true
matrix:
- ubuntu_version: 22.04
- ubuntu_version: 23.04
matrix:
exclude:
- image: Visual Studio 2022
ubuntu_version: 22.04
- image: macos-monterey
ubuntu_version: 22.04
install:
- ps: $env:asap_major_version=findstr "set(CURRENT_MAJOR_VERSION" CMakeLists.txt | % {"$($_.split(' ')[1])"[0]}
- ps: $env:asap_minor_version=findstr "set(CURRENT_MINOR_VERSION" CMakeLists.txt | % {"$($_.split(' ')[1])"[0]}
- ps: $env:asap_patch_version=findstr "set(CURRENT_PATCH_VERSION" CMakeLists.txt | % {"$($_.split(' ')[1])"[0]}
- cmd: echo ASAP version %asap_major_version%.%asap_minor_version%.%asap_patch_version%-%APPVEYOR_BUILD_NUMBER%
- sh: export ASAP_MAJOR_VERSION="$(grep set\(CURRENT_MAJOR_VERSION CMakeLists.txt | cut -d " " -f2 | cut -d ")" -f1)"
- sh: export ASAP_MINOR_VERSION="$(grep set\(CURRENT_MINOR_VERSION CMakeLists.txt | cut -d " " -f2 | cut -d ")" -f1)"
- sh: export ASAP_PATCH_VERSION="$(grep set\(CURRENT_PATCH_VERSION CMakeLists.txt | cut -d " " -f2 | cut -d ")" -f1)"
- sh: echo ASAP version $ASAP_MAJOR_VERSION.$ASAP_MINOR_VERSION.$ASAP_PATCH_VERSION-$APPVEYOR_BUILD_NUMBER
- ps: Update-AppveyorBuild -Version "$env:asap_major_version.$env:asap_minor_version.$env:asap_patch_version-$env:APPVEYOR_BUILD_NUMBER"
for:
-
matrix:
only:
- image: Visual Studio 2022
before_build:
- ps: >-
If (!(Test-Path -Path 'c:\projects\dcmtk')) {
Start-FileDownload 'https://github.com/computationalpathologygroup/ASAP/releases/download/v2.1/asap_deps.zip'
7z x asap_deps.zip -oc:\projects
}
- ps: >-
If (!(Test-Path -Path 'C:\projects\swig\install')) {
git clone https://github.com/GeertLitjens/swig c:\projects\swig\src
choco install winflexbison3
mkdir c:\projects\swig\build
mkdir c:\projects\swig\install
cd c:\projects\swig\build
cmake ..\src -DWITH_PCRE=OFF -DCMAKE_INSTALL_PREFIX=c:\projects\swig\install -DBISON_EXECUTABLE=C:\ProgramData\chocolatey\lib\winflexbison3\tools\win_bison.exe
cmake --build . --config Release
cmake --install .
}
- ps: >-
If (!(Test-Path -Path C:\Python39-x64\Lib\site-packages\numpy)) {
Invoke-Expression "C:\Python39-x64\Scripts\pip install numpy"
}
- ps: >-
If (!(Test-Path -Path 'C:\tools\opencv')) {
choco install -r opencv
}
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
build_script:
- cmd: cd C:\projects\asap
- cmd: cmake -B ./ASAP_build -DJPEG_INCLUDE_DIR=C:/projects/libjpeg-turbo/include -DJPEG_LIBRARY_DEBUG=C:/projects/libjpeg-turbo/lib/jpeg-static.lib -DJPEG_LIBRARY_RELEASE=C:/projects/libjpeg-turbo/lib/jpeg-static.lib -DOpenJPEG_DIR=C:/projects/openjpeg/lib/cmake/openjpeg-2.5 -DOPENSLIDE_INCLUDE_DIR=c:/projects/openslide-win64/include/openslide -DOPENSLIDE_LIBRARY=c:/projects/openslide-win64/lib/libopenslide.lib -DDCMTK_DIR=c:/projects/dcmtk/cmake -DTIFF_INCLUDE_DIR=c:/projects/libtiff/include -DTIFF_LIBRARY_DEBUG=c:/projects/libtiff/lib/tiff.lib -DTIFF_LIBRARY_RELEASE=c:/projects/libtiff/lib/tiff.lib -DPugiXML_DIR=c:/projects/pugixml/lib/cmake/pugixml -DBUILD_MULTIRESOLUTIONIMAGEINTERFACE_DICOM_SUPPORT=ON -DPACKAGE_ON_INSTALL=TRUE -DBUILD_ASAP=TRUE -DBUILD_IMAGEPROCESSING=TRUE -DBUILD_EXECUTABLES=TRUE -DQt6_DIR=C:/Qt/6.5.1/msvc2019_64/lib/cmake/Qt6 -DQt6GuiTools_DIR=C:/Qt/6.5.1/msvc2019_64/lib/cmake/Qt6GuiTools -DOpenCV_DIR=c:/tools/opencv/build -DBUILD_WORKLIST_INTERFACE=TRUE -DWRAP_MULTIRESOLUTIONIMAGEINTERFACE_PYTHON=ON -DWRAP_WHOLESLIDEFILTERS_PYTHON=ON -DPython3_ROOT_DIR=c:/Python39-x64 -DSWIG_EXECUTABLE=c:/projects/swig/install/bin/swig.exe
- cmd: cd ./ASAP_build
- cmd: cmake --build . --config Release
- cmd: cpack
cache:
- C:\projects\swig\install
artifacts:
- path: ./ASAP_build/*.exe
name: ASAP_Installer
deploy:
- provider: GitHub
release: ASAP $(asap_major_version).$(asap_minor_version) (Nightly)
auth_token:
secure: hRxFBfnDeq0DQLsi9pwxDMGEPfGa+0UxooCFH0LqO/bSajx+IixhfWnAA/z/tI5L
artifact: ASAP_Installer
draft: false
force_update: true
on:
branch: develop
APPVEYOR_REPO_TAG: false
- provider: GitHub
release: ASAP $(asap_major_version).$(asap_minor_version)
auth_token:
secure: hRxFBfnDeq0DQLsi9pwxDMGEPfGa+0UxooCFH0LqO/bSajx+IixhfWnAA/z/tI5L
artifact: ASAP_Installer
draft: false
force_update: true
on:
branch: master # release from master branch only
APPVEYOR_REPO_TAG: true # deploy on tag push only
-
matrix:
only:
- image: Ubuntu
services:
- docker
build_script:
- sh: cd buildtools
- sh: docker build -q --tag asap_build:${ubuntu_version} --build-arg UBUNTU_VERSION=${ubuntu_version} .
- sh: docker run -v ${PWD}:/artifacts asap_build:${ubuntu_version} /root/build/build_ASAP.sh true
artifacts:
- path: ./buildtools/*.deb
name: ASAP_DEB_Package
deploy:
- provider: GitHub
release: ASAP $ASAP_MAJOR_VERSION.$ASAP_MINOR_VERSION (Nightly)
auth_token:
secure: hRxFBfnDeq0DQLsi9pwxDMGEPfGa+0UxooCFH0LqO/bSajx+IixhfWnAA/z/tI5L
artifact: ASAP_DEB_Package
draft: false
force_update: true
on:
branch: develop
APPVEYOR_REPO_TAG: false # deploy on tag push only
- provider: GitHub
release: ASAP $ASAP_MAJOR_VERSION.$ASAP_MINOR_VERSION
auth_token:
secure: hRxFBfnDeq0DQLsi9pwxDMGEPfGa+0UxooCFH0LqO/bSajx+IixhfWnAA/z/tI5L
artifact: ASAP_DEB_Package
draft: true
force_update: true
on:
branch: master # release from master branch only
APPVEYOR_REPO_TAG: true # deploy on tag push only
-
matrix:
only:
- image: macos-monterey
build_script:
- sh: mkdir -p /Users/appveyor/tools/swig/build
- sh: mkdir -p /Users/appveyor/tools/swig/install
- sh: cd /Users/appveyor/tools
- sh: curl -o cmake.tar.gz -LJ https://github.com/Kitware/CMake/releases/download/v3.27.2/cmake-3.27.2-macos-universal.tar.gz
- sh: tar -xvf ./cmake.tar.gz -C /Users/appveyor/tools
- sh: curl -o miniconda.sh -LJ https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
- sh: mkdir /Users/appveyor/.conda
- sh: chmod a+x miniconda.sh
- sh: ./miniconda.sh -b
- sh: /Users/appveyor/miniconda3/bin/conda update --quiet -n base -c defaults conda
- sh: /Users/appveyor/miniconda3/bin/conda create --quiet --name build python=3.9
- sh: /Users/appveyor/miniconda3/bin/conda install --quiet -n build numpy nomkl
- sh: brew install bison
- sh: git clone https://github.com/GeertLitjens/swig /Users/appveyor/tools/swig/src
- sh: rm -f /usr/local/include/X11
- sh: cd /Users/appveyor/tools/swig/build
- sh: /Users/appveyor/tools/cmake-3.27.2-macos-universal/CMake.app/Contents/bin/cmake ../src -DWITH_PCRE=OFF -DCMAKE_CXX_FLAGS=-std=c++17 -DCMAKE_INSTALL_PREFIX=/Users/appveyor/tools/swig/install -DBISON_EXECUTABLE=/usr/local/opt/bison/bin/bison
- sh: /Users/appveyor/tools/cmake-3.27.2-macos-universal/CMake.app/Contents/bin/cmake --build . --config Release
- sh: /Users/appveyor/tools/cmake-3.27.2-macos-universal/CMake.app/Contents/bin/cmake --install .
- sh: brew unlink subversion
- sh: export APPVEYOR_VNC_BLOCK=true
- sh: curl -sflL 'https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-vnc.sh' | bash -e -
- sh: brew update
- sh: brew install openslide opencv qt6 dcmtk
- sh: cd /Users/appveyor/projects
- sh: cd /Users/appveyor/projects/asap
- sh: cmake . -DCMAKE_VERBOSE_MAKEFILE=ON -DBUILD_WORKLIST_INTERFACE=TRUE -DSWIG_EXECUTABLE=/Users/appveyor/tools/swig/install/bin/swig -DWRAP_MULTIRESOLUTIONIMAGEINTERFACE_PYTHON=TRUE -DBUILD_ASAP=TRUE -DBUILD_EXECUTABLES=TRUE -DBUILD_IMAGEPROCESSING=TRUE -DCMAKE_BUILD_TYPE=Release -DPACKAGE_ON_INSTALL=TRUE -DOPENSLIDE_INCLUDE_DIR:PATH=/usr/local/Cellar/openslide/3.4.1_8/include/openslide -DQt6_DIR:PATH=/usr/local/Cellar/qt/6.5.1_2/lib/cmake/Qt6 -DPython3_ROOT_DIR=/Users/appveyor/miniconda3/envs/build
- sh: make
- sh: cp **/*/*.dylib /usr/local/lib/ # i don't know how to combine these two commands
- sh: cp **/*.dylib /usr/local/lib/
- sh: sudo make package
artifacts:
- path: ./*.dmg
name: ASAP_DMG_Package
deploy:
- provider: GitHub
release: ASAP $ASAP_MAJOR_VERSION.$ASAP_MINOR_VERSION (Nightly)
auth_token:
secure: hRxFBfnDeq0DQLsi9pwxDMGEPfGa+0UxooCFH0LqO/bSajx+IixhfWnAA/z/tI5L
artifact: ASAP_DMG_Package
draft: false
force_update: true
on:
branch: develop # release from master branch only
APPVEYOR_REPO_TAG: false # deploy on tag push only
- provider: GitHub
release: ASAP $(asap_major_version).$(asap_minor_version)
auth_token:
secure: hRxFBfnDeq0DQLsi9pwxDMGEPfGa+0UxooCFH0LqO/bSajx+IixhfWnAA/z/tI5L
artifact: ASAP_DMG_Package
draft: false
force_update: true
on:
branch: master # release from master branch only
APPVEYOR_REPO_TAG: true # deploy on tag push only