Skip to content

Commit 4fe72ea

Browse files
committed
Appveyor CI: Installation of supporter programs, openafs, ...
1 parent 71d0057 commit 4fe72ea

File tree

4 files changed

+123
-7
lines changed

4 files changed

+123
-7
lines changed

appveyor.yml

Lines changed: 81 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,81 @@
1-
version: 1.0.{build}
1+
version: 1.7.0.{build}
2+
23
pull_requests:
34
do_not_increment_build_number: true
5+
46
branches:
57
only:
68
- master
79
- v1.6-dev
810

911
os: Visual Studio 2015
12+
1013
configuration: Release
1114

15+
platform:
16+
- x86
17+
# - x64
18+
1219
environment:
1320
ROOTSYS: C:\root
1421
PATH: '%ROOTSYS%\bin;C:\Qt\5.6\msvc2015;C:\Python35;C:\Miniconda35;C:\Miniconda35\\Scripts;%PATH%'
22+
BUILD_AHCAL: OFF
23+
BUILD_BIFAHCAL: OFF
24+
BUILD_TESTING: OFF
25+
BUILD_WITH_QT4: OFF
26+
BUILD_allproducer: OFF
27+
BUILD_altro: OFF
28+
BUILD_altroUSB: OFF
29+
BUILD_apixct: OFF
30+
BUILD_calice: ON
31+
BUILD_ccpdlf: OFF
32+
BUILD_clicpix: OFF
33+
BUILD_cmspixel: OFF
34+
BUILD_depfet: OFF
35+
BUILD_eudrb: OFF
36+
BUILD_example: OFF
37+
BUILD_explorer: OFF
38+
BUILD_fortis: OFF
39+
BUILD_gui: ON
40+
BUILD_main: OFF
41+
BUILD_manual: OFF
42+
BUILD_mimoroma: OFF
43+
BUILD_mimosa32: ON
44+
BUILD_miniTLU: OFF
45+
BUILD_mupix: OFF
46+
BUILD_mvd: OFF
47+
BUILD_ni: ON
48+
BUILD_nreader: OFF
49+
BUILD_offlinemon: OFF
50+
BUILD_onlinemon: ON
51+
BUILD_palpidefs: OFF
52+
BUILD_palpidess: OFF
53+
BUILD_pixelmanproducer: OFF
54+
BUILD_pybar: OFF
55+
BUILD_python: ON
56+
BUILD_root: OFF
57+
BUILD_taki: OFF
58+
BUILD_timepixdummy: OFF
59+
BUILD_tlu: ON
60+
BUILD_usbpix: OFF
61+
62+
#matrix:
63+
#- OPTION: modern
64+
# platform: x86
65+
#- OPTION: modern
66+
# platform: x64
67+
#- OPTION: old
68+
# platform: x86
69+
#- OPTION: old
70+
# platform: x64
1571

72+
cache:
73+
- '%APPVEYOR_BUILD_FOLDER%\extern\ZestSC1'
74+
- '%APPVEYOR_BUILD_FOLDER%\extern\tlufirmware'
75+
- '%APPVEYOR_BUILD_FOLDER%\extern\libusb-win32'
76+
1677
init:
17-
- ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
78+
#- ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
1879

1980
before_build:
2081
- cmd: >-
@@ -50,13 +111,28 @@ before_build:
50111
powershell -command "Start-Sleep -s 10"
51112
52113
build_script:
53-
- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
114+
- ps: If (Test-Path ("${env:APPVEYOR_BUILD_FOLDER}" + "\extern\ZestSC1")) {Write-Host ("Reusing cached ZestSC1 " + "${env:APPVEYOR_BUILD_FOLDER}" + "\extern\ZestSC1" + " instead of copying from AFS")} Else {Write-Host "Copying ZestSC1 from AFS"; Copy-item "\\afs\desy.de\group\telescopes\tlu\ZestSC1" -destination ("${env:APPVEYOR_BUILD_FOLDER}" + "\extern\ZestSC1") -recurse}
115+
116+
- ps: If (Test-Path ("${env:APPVEYOR_BUILD_FOLDER}" + "\extern\tlufirmware")) {Write-Host ("Reusing cached tlufirmware " + "${env:APPVEYOR_BUILD_FOLDER}" + "\extern\tlufirmware" + " instead of copying from AFS")} Else {Write-Host "Copying tlufirmware from AFS"; Copy-item "\\afs\desy.de\group\telescopes\tlu\tlufirmware" -destination ("${env:APPVEYOR_BUILD_FOLDER}" + "\extern\tlufirmware") -recurse}
117+
118+
- ps: If (Test-Path ("${env:APPVEYOR_BUILD_FOLDER}" + "\extern\libusb-win32")) {Write-Host ("Reusing cached libusb-win32 " + "${env:APPVEYOR_BUILD_FOLDER}" + "\extern\libusb-win32" + " instead of downloading from sourcefourge (which can be sometimes unreliable...)")} Else {Write-Host "Downloading libusb-win32 from sourceforge"; appveyor\download.ps1 -downloadLocation 'https://sourceforge.net/projects/libusb-win32/files/libusb-win32-releases/1.2.6.0/libusb-win32-bin-1.2.6.0.zip' -storageLocation 'C:\\libusb-win32-bin-1.2.6.0.zip'; $zipargument = ("-o" + "${env:APPVEYOR_BUILD_FOLDER}" + "\extern\"); 7z -y x C:\\libusb-win32-bin-1.2.6.0.zip $zipargument; Rename-Item -path ("${env:APPVEYOR_BUILD_FOLDER}" + "\extern\libusb-win32-bin-1.2.6.0") -newName ("${env:APPVEYOR_BUILD_FOLDER}" + "\extern\libusb-win32")}
119+
120+
#- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
54121

55122
- cd %APPVEYOR_BUILD_FOLDER%\build
56123

57-
- cmake -DBUILD_onlinemon=ON -DBUILD_python=OFF -DBUILD_tlu=ON ..
124+
#- cmake -DBUILD_onlinemon=ON -DBUILD_python=OFF -DBUILD_tlu=ON ..
125+
#- ps: $cmakeargument = (" -DBUILD_AHCAL=" + "${env:BUILD_AHCAL}" + " -DBUILD_BIFAHCAL=" + "${env:BUILD_BIFAHCAL}" + " -DBUILD_TESTING=" + "${env:BUILD_TESTING}" + " -DBUILD_WITH_QT4=" + "${env:BUILD_WITH_QT4}" + " -DBUILD_allproducer=" + "${env:BUILD_allproducer}" + " -DBUILD_altro=" + "${env:BUILD_altro}" + " -DBUILD_altroUSB=" + "${env:BUILD_altroUSB}" + " -DBUILD_apixct=" + "${env:BUILD_apixct}" + " -DBUILD_calice=" + "${env:BUILD_calice}" + " -DBUILD_ccpdlf=" + "${env:BUILD_ccpdlf}" + " -DBUILD_clicpix=" + "${env:BUILD_clicpix}" + " -DBUILD_cmspixel=" + "${env:BUILD_cmspixel}" + " -DBUILD_depfet=" + "${env:BUILD_depfet}" + " -DBUILD_eudrb=" + "${env:BUILD_eudrb}" + " -DBUILD_example=" + "${env:BUILD_example}" + " -DBUILD_explorer=" + "${env:BUILD_explorer}" + " -DBUILD_fortis=" + "${env:BUILD_fortis}" + " -DBUILD_gui=" + "${env:BUILD_gui}" + " -DBUILD_main=" + "${env:BUILD_main}" + " -DBUILD_manual=" + "${env:BUILD_manual}" + " -DBUILD_mimoroma=" + "${env:BUILD_mimoroma}" + " -DBUILD_mimosa32=" + "${env:BUILD_mimosa32}" + " -DBUILD_miniTLU=" + "${env:BUILD_miniTLU}" + " -DBUILD_mupix=" + "${env:BUILD_mupix}" + " -DBUILD_mvd=" + "${env:BUILD_mvd}" + " -DBUILD_ni=" + "${env:BUILD_ni}" + " -DBUILD_nreader=" + "${env:BUILD_nreader}" + " -DBUILD_offlinemon=" + "${env:BUILD_offlinemon}" + " -DBUILD_onlinemon=" + "${env:BUILD_onlinemon}" + " -DBUILD_palpidefs=" + "${env:BUILD_palpidefs}" + " -DBUILD_palpidess=" + "${env:BUILD_palpidess}" + " -DBUILD_pixelmanproducer=" + "${env:BUILD_pixelmanproducer}" + " -DBUILD_pybar=" + "${env:BUILD_pybar}" + " -DBUILD_python=" + "${env:BUILD_python}" + " -DBUILD_root=" + "${env:BUILD_root}" + " -DBUILD_taki=" + "${env:BUILD_taki}" + " -DBUILD_timepixdummy=" + "${env:BUILD_timepixdummy}" + " -DBUILD_tlu=" + "${env:BUILD_tlu}" + " -DBUILD_usbpix=" + "${env:BUILD_usbpix}"); [Environment]::SetEnvironmentVariable("CMAKEargs", $cmakeargument, "User")
126+
127+
#- cmd: cmake %CMAKEargs% ..
128+
- cmd: echo -DBUILD_AHCAL=%BUILD_AHCAL% -DBUILD_BIFAHCAL=%BUILD_BIFAHCAL% -DBUILD_TESTING=%BUILD_TESTING% -DBUILD_WITH_QT4=%BUILD_WITH_QT4% -DBUILD_allproducer=%BUILD_allproducer% -DBUILD_altro=%BUILD_altro% -DBUILD_altroUSB=%BUILD_altroUSB% -DBUILD_apixct=%BUILD_apixct% -DBUILD_calice=%BUILD_calice% -DBUILD_ccpdlf=%BUILD_ccpdlf% -DBUILD_clicpix=%BUILD_clicpix% -DBUILD_cmspixel=%BUILD_cmspixel% -DBUILD_depfet=%BUILD_depfet% -DBUILD_eudrb=%BUILD_eudrb% -DBUILD_example=%BUILD_example% -DBUILD_explorer=%BUILD_explorer% -DBUILD_fortis=%BUILD_fortis% -DBUILD_gui=%BUILD_gui% -DBUILD_main=%BUILD_main% -DBUILD_manual=%BUILD_manual% -DBUILD_mimoroma=%BUILD_mimoroma% -DBUILD_mimosa32=%BUILD_mimosa32% -DBUILD_miniTLU=%BUILD_miniTLU% -DBUILD_mupix=%BUILD_mupix% -DBUILD_mvd=%BUILD_mvd% -DBUILD_ni=%BUILD_ni% -DBUILD_nreader=%BUILD_nreader% -DBUILD_offlinemon=%BUILD_offlinemon% -DBUILD_onlinemon=%BUILD_onlinemon% -DBUILD_palpidefs=%BUILD_palpidefs% -DBUILD_palpidess=%BUILD_palpidess% -DBUILD_pixelmanproducer=%BUILD_pixelmanproducer% -DBUILD_pybar=%BUILD_pybar% -DBUILD_python=%BUILD_python% -DBUILD_root=%BUILD_root% -DBUILD_taki=%BUILD_taki% -DBUILD_timepixdummy=%BUILD_timepixdummy% -DBUILD_tlu=%BUILD_tlu% -DBUILD_usbpix=%BUILD_usbpix% ..
129+
130+
- cmd: cmake -DBUILD_AHCAL=%BUILD_AHCAL% -DBUILD_BIFAHCAL=%BUILD_BIFAHCAL% -DBUILD_TESTING=%BUILD_TESTING% -DBUILD_WITH_QT4=%BUILD_WITH_QT4% -DBUILD_allproducer=%BUILD_allproducer% -DBUILD_altro=%BUILD_altro% -DBUILD_altroUSB=%BUILD_altroUSB% -DBUILD_apixct=%BUILD_apixct% -DBUILD_calice=%BUILD_calice% -DBUILD_ccpdlf=%BUILD_ccpdlf% -DBUILD_clicpix=%BUILD_clicpix% -DBUILD_cmspixel=%BUILD_cmspixel% -DBUILD_depfet=%BUILD_depfet% -DBUILD_eudrb=%BUILD_eudrb% -DBUILD_example=%BUILD_example% -DBUILD_explorer=%BUILD_explorer% -DBUILD_fortis=%BUILD_fortis% -DBUILD_gui=%BUILD_gui% -DBUILD_main=%BUILD_main% -DBUILD_manual=%BUILD_manual% -DBUILD_mimoroma=%BUILD_mimoroma% -DBUILD_mimosa32=%BUILD_mimosa32% -DBUILD_miniTLU=%BUILD_miniTLU% -DBUILD_mupix=%BUILD_mupix% -DBUILD_mvd=%BUILD_mvd% -DBUILD_ni=%BUILD_ni% -DBUILD_nreader=%BUILD_nreader% -DBUILD_offlinemon=%BUILD_offlinemon% -DBUILD_onlinemon=%BUILD_onlinemon% -DBUILD_palpidefs=%BUILD_palpidefs% -DBUILD_palpidess=%BUILD_palpidess% -DBUILD_pixelmanproducer=%BUILD_pixelmanproducer% -DBUILD_pybar=%BUILD_pybar% -DBUILD_python=%BUILD_python% -DBUILD_root=%BUILD_root% -DBUILD_taki=%BUILD_taki% -DBUILD_timepixdummy=%BUILD_timepixdummy% -DBUILD_tlu=%BUILD_tlu% -DBUILD_usbpix=%BUILD_usbpix% ..
131+
132+
#; Write-Host "Calling cmake with argument " $cmakeargument; try {$ErrorActionPreference = 'SilentlyContinue'; cmake $cmakeargument "${env:APPVEYOR_BUILD_FOLDER}" 2>out-null} Catch [Exception] {}
58133

59-
- msbuild INSTALL.vcxproj
134+
#- cmd: if %PLATFORM% == 'x86' (msbuild INSTALL.vcxproj) else (msbuild INSTALL.vcxproj /p:Platform=x64 /p:Prefer32bit=false)
135+
- cmd: msbuild INSTALL.vcxproj
60136

61137
on_finish:
62138
#- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))

appveyor/download.ps1

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Script to install libusb
2+
# Based on python install script by
3+
# Authors: Olivier Grisel, Jonathan Helmus, Kyle Kastner, and Alex Willmer
4+
# License: CC0 1.0 Universal: http://creativecommons.org/publicdomain/zero/1.0/
5+
[CmdletBinding()]
6+
Param(
7+
[Parameter(Mandatory=$True,Position=1)]
8+
[string]$downloadLocation,
9+
10+
[Parameter(Mandatory=$True)]
11+
[string]$storageLocation
12+
)
13+
14+
function Download ($url, $filename) {
15+
$webclient = New-Object System.Net.WebClient
16+
17+
# Download and retry up to 5 times in case of network transient errors.
18+
Write-Host "Downloading " $url
19+
$retry_attempts = 4
20+
for ($i = 0; $i -lt $retry_attempts; $i++) {
21+
try {
22+
$webclient.DownloadFile($url, $filename)
23+
break
24+
}
25+
Catch [Exception]{
26+
Write-Host "Download attempt " $i " of " $retry_attempts " failed."
27+
Start-Sleep 1
28+
}
29+
}
30+
if (Test-Path $filename) {
31+
Write-Host "File saved at" $filename
32+
} else {
33+
# Retry once to get the error message if any at the last try
34+
$webclient.DownloadFile($url, $filename)
35+
}
36+
return $filename
37+
}
38+
39+
Download $downloadLocation $storageLocation

cmake/FindLIBUSB.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ IF(NOT LIBUSB_FOUND)
2828
# find path of libusb installation in ./extern folder
2929
file(GLOB_RECURSE extern_file ${PROJECT_SOURCE_DIR}/extern/*usb.h)
3030
if (extern_file)
31+
MESSAGE(STATUS "File $Â{extern_file} found in ./exter")
3132
# strip the file and 'include' path away:
3233
get_filename_component(extern_lib_path "${extern_file}" PATH)
3334
get_filename_component(extern_lib_path "${extern_lib_path}" PATH)
@@ -70,4 +71,4 @@ ELSE(LIBUSB_FOUND)
7071
IF(LIBUSB_FIND_REQUIRED)
7172
MESSAGE(FATAL_ERROR "Could not find LIBUSB")
7273
ENDIF(LIBUSB_FIND_REQUIRED)
73-
ENDIF(LIBUSB_FOUND)
74+
ENDIF(LIBUSB_FOUND)

cmake/FindZestSC1.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ file(GLOB_RECURSE extern_file ${PROJECT_SOURCE_DIR}/extern/*ZestSC1.h)
1616
if (extern_file)
1717
# should have found multiple files of that name, take root of folder (no 'windows*7/inc' string)
1818
FOREACH (this_file ${extern_file})
19-
IF(NOT "${this_file}" MATCHES ".*windows.?7/Inc/")
19+
IF( (NOT "${this_file}" MATCHES ".*windows.?7/Inc/") AND (NOT "${this_file}" MATCHES ".*windows/Inc/") AND (NOT "${this_file}" MATCHES ".*macosx/Inc/") AND (NOT "${this_file}" MATCHES ".*linux/Inc/"))
2020
SET(zest_inc_path "${this_file}")
2121
ENDIF()
2222
ENDFOREACH(this_file)

0 commit comments

Comments
 (0)