-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathappveyor.yml
127 lines (119 loc) · 5.45 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
image:
- Visual Studio 2017
- Ubuntu1804
platform:
- x64
# If the build fails on older versions for some reason:
# matrix:
# allow_failures:
# - image: Visual Studio 2015
# - image: Visual Studio 2017
# - image: Ubuntu1804
notifications:
- provider: Email
on_build_success: false
on_build_failure: false
on_build_status_changed: false
# build version format
version: '{build}'
environment:
APPVEYOR_YML_DISABLE_PS_LINUX: true
install:
# Windows only
- cmd: set VCPKG_DEFAULT_TRIPLET=x64-windows
- cmd: vcpkg integrate install
- cmd: vcpkg install hdf5[cpp]
# - cmd: dir C:\Tools\vcpkg\installed
# - cmd: dir C:\Tools\vcpkg\installed\x64-windows
# - cmd: dir C:\Tools\vcpkg\installed\x64-windows\bin
# - cmd: dir C:\Tools\vcpkg\installed\x64-windows\include
# - cmd: dir C:\Tools\vcpkg\installed\x64-windows\lib
# - cmd: dir C:\Tools\vcpkg\installed\x64-windows\share
# - cmd: dir C:\Tools\vcpkg\installed\x64-windows\share\hdf5
- cmd: vcpkg install opencl
- cmd: appveyor DownloadFile "http://registrationcenter-download.intel.com/akdlm/irc_nas/12512/opencl_runtime_16.1.2_x64_setup.msi"
- cmd: start /wait msiexec /i opencl_runtime_16.1.2_x64_setup.msi /qn /l*v opencl_runtime.log
- cmd: appveyor DownloadFile "https://boinc.berkeley.edu/dl/clinfo.zip"
- cmd: 7z e clinfo.zip
# Julia is not used on Window because it takes forever to build HDF5.jl
# - ps: appveyor DownloadFile "https://julialang-s3.julialang.org/bin/winnt/x64/1.1/julia-1.1.0-win64.exe" -FileName "C:\projects\julia-installer.exe"
# - ps: Start-Process -FilePath C:\projects\julia-installer.exe -ArgumentList "/S /D=C:\julia" -NoNewWindow -Wait
# - cmd: set PATH=%PATH%;C:\julia\bin\
# Linux only
- sh: sudo apt-get update
- sh: sudo apt-get -y install libhdf5-dev opencl-clhpp-headers opencl-c-headers opencl-dev clinfo
- sh: sudo bash .travis_install_intel_opencl.sh # pocl may be installed via apt-get but has some problems sometimes...
# Julia
- sh: appveyor DownloadFile "https://julialang-s3.julialang.org/bin/linux/x64/1.1/julia-1.1.0-linux-x86_64.tar.gz"
- sh: tar xvf julia-1.1.0-linux-x86_64.tar.gz
- sh: export PATH=$PATH:$(pwd)/julia-1.1.0/bin
- sh: julia -e "import Pkg; Pkg.add(\"HDF5\"); Pkg.build(\"HDF5\")"
# msr-tools, hdf5-tools to test power logging
- sh: sudo apt-get -y install msr-tools hdf5-tools
# Windows and Linux
- clinfo
cache:
- C:\Tools\vcpkg\installed\
- C:\Users\appveyor\.julia\
build_script:
- mkdir build
- cd build
# Windows only
- cmd: set VCPKG_DEFAULT_TRIPLET=x64-windows
- cmd: cmake .. -DCMAKE_TOOLCHAIN_FILE=C:/Tools/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_GENERATOR_PLATFORM=x64 -DCMAKE_POLICY_DEFAULT_CMP0074=NEW -DHDF5_ROOT="C:/Tools/vcpkg/installed/x64-windows" -DHDF5_INCLUDE_DIRS="C:/Tools/vcpkg/installed/x64-windows/include" -DHDF5_LIBRARIES="hdf5::hdf5-shared" -DHDF5_HL_LIBRARIES="hdf5::hdf5_hl-shared"
- cmd: cmake --build . --target ALL_BUILD --config Release
- cmd: set PATH=%PATH%;%cd%\bin;%cd%\bin\Release;%cd%\bin\Debug
- cmd: echo %PATH%
# - cmd: cd ..
# - cmd: 7z a build_directory_windows.zip build
# - cmd: appveyor PushArtifact build_directory_windows.zip
# - cmd: cd build
- cmd: toolkitICL -h
- cmd: cd ..
- cmd: rd /s /q build
- cmd: mkdir build
- cmd: cd build
- cmd: cmake -DTESTS=ON .. -DCMAKE_TOOLCHAIN_FILE=C:/Tools/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_GENERATOR_PLATFORM=x64 -DCMAKE_POLICY_DEFAULT_CMP0074=NEW -DHDF5_ROOT="C:/Tools/vcpkg/installed/x64-windows" -DHDF5_INCLUDE_DIRS="C:/Tools/vcpkg/installed/x64-windows/include" -DHDF5_LIBRARIES="hdf5::hdf5-shared" -DHDF5_HL_LIBRARIES="hdf5::hdf5_hl-shared"
- cmd: cmake --build . --target ALL_BUILD --config Release
- cmd: cmake --build . --target RUN_TESTS --config Release
# Linux only
# build without tests
- sh: cmake ..
- sh: cmake --build .
- sh: export PATH=$PATH:$(pwd)/bin
- sh: echo $PATH
# - sh: cd ..
# - sh: 7z a build_directory_linux.zip build
# - sh: appveyor PushArtifact build_directory_linux.zip
# - sh: cd build
- sh: toolkitICL -h
# build with tests
- sh: cd ..
- sh: rm -rf build
- sh: mkdir build
- sh: cd build
- sh: cmake -DTESTS=ON ..
- sh: cmake --build .
# run CMake tests
- sh: cmake --build . --target test
# test power logging
# instead of `sudo toolkitICL ...`, `sudo chmod o+rw /dev/cpu/0/msr` could be run once
# - sh: sudo modprobe msr
# - sh: cd test
# - sh: sudo ../bin/toolkitICL -b -intel_power 1000 -c repetition_test.h5
# - sh: h5ls out_repetition_test.h5/housekeeping
# - sh: h5ls out_repetition_test.h5/housekeeping/intel
# - sh: h5dump -d housekeeping/intel/cores0 out_repetition_test.h5
# - sh: h5dump -d housekeeping/intel/DRAM0 out_repetition_test.h5
# # - sh: h5dump -d housekeeping/intel/GT0 out_repetition_test.h5 # not required on all machines
# - sh: h5dump -d housekeeping/intel/package0 out_repetition_test.h5
# - sh: h5dump -d housekeeping/intel/power_time out_repetition_test.h5
# - sh: h5dump -d housekeeping/intel/TDP out_repetition_test.h5
# - sh: sudo ../bin/toolkitICL -b -intel_temp 1000 -c repetition_test.h5
# - sh: h5ls out_repetition_test.h5/housekeeping
# - sh: h5ls out_repetition_test.h5/housekeeping/intel
# - sh: h5dump -d housekeeping/intel/package0_temperature out_repetition_test.h5
# - sh: h5dump -d housekeeping/intel/temperature_time out_repetition_test.h5
# - sh: cd ..
# display test log
- sh: cat Testing/Temporary/LastTest.log