-
Notifications
You must be signed in to change notification settings - Fork 192
/
appveyor.yml
128 lines (113 loc) · 4.55 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
# Appveyor OS list
# Windows Server 2012 R2 (x64) <== Appveyor default image
# Visual Studio 2015
# os: expands the build matrix to include multiple os's
os:
- Windows Server 2012
# compiler: expands the build matrix to include multiple compilers (per os)
platform:
- x64
configuration:
- Release
# Only clone the top level commit; don't bother with history
shallow_clone: true
# environment: specifies additional global variables to define per row in build matrix
environment:
global:
CLFFT_ROOT: "%APPVEYOR_BUILD_FOLDER%\\bin\\nmake\\release"
OPENCL_ROOT: "%APPVEYOR_BUILD_FOLDER%\\bin\\opencl"
FFTW_ROOT: "%APPVEYOR_BUILD_FOLDER%\\bin\\fftw"
BOOST_ROOT: "C:\\Libraries\\boost_1_58_0"
OPENCL_REGISTRY: "https://www.khronos.org/registry/cl"
init:
- echo init step
- cmake --version
- C:\"Program Files (x86)"\"Microsoft Visual Studio 12.0"\VC\vcvarsall.bat %PLATFORM%
# Uncomment the following to display Remote Desktop connection details
# - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
# We need to create an opencl import library that clfft can link against
# Vendor based OpenCL packages are hard to use because of download size, registration requirements
# and unattended installs not well supported
install:
- echo Installing OpenCL
- ps: mkdir $env:OPENCL_ROOT
- ps: pushd $env:OPENCL_ROOT
- ps: $opencl_registry = $env:OPENCL_REGISTRY
# This downloads the source to the Khronos ICD library
- git clone --depth 1 https://github.com/KhronosGroup/OpenCL-ICD-Loader.git
- ps: mv ./OpenCL-ICD-Loader/* .
# This downloads all the opencl header files
# The cmake build files expect a directory called inc
- ps: mkdir inc/CL_headers_repo
- git clone --depth 1 https://github.com/KhronosGroup/OpenCL-Headers.git inc/CL_headers_repo
- ps: pushd inc
- ps: mkdir CL
- ps: cp CL_headers_repo/opencl22/CL/* CL/
- ps: popd
# - ps: wget $opencl_registry/api/2.1/cl.hpp -OutFile inc/CL/cl.hpp
# - ps: dir; if( $lastexitcode -eq 0 ){ dir include/CL } else { Write-Output boom }
# Create the static import lib in a directory called lib, so findopencl() will find it
- ps: mkdir lib
- ps: pushd lib
- cmake -G "NMake Makefiles" ..
- nmake
- ps: mkdir x64; cp OpenCL.lib x64\
- ps: popd
# Switch to OpenCL 1.2 headers
- ps: pushd inc/CL
- ps: del *
- ps: cp -r ../CL_headers_repo/opencl12/CL/* .
# - git fetch origin opencl12:opencl12
# - git checkout opencl12
- ps: popd
# Rename the inc directory to include, so FindOpencl() will find it
- ps: ren inc include
- ps: popd
- echo Installing FFTW
- ps: mkdir $env:FFTW_ROOT
- ps: pushd $env:FFTW_ROOT
# This downloads the windows 64-bit pre-compiled dlls
- ps: wget ftp://ftp.fftw.org/pub/fftw/fftw-3.3.4-dll64.zip -OutFile fftw-3.3.4-dll64.zip
- ps: 7z x fftw-3.3.4-dll64.zip
# - ps: pushd fftw-3.3.4-dll64
- ps: lib /machine:x64 /def:libfftw3-3.def
- ps: lib /machine:x64 /def:libfftw3f-3.def
- ps: lib /machine:x64 /def:libfftw3l-3.def
# before_build is used to run configure steps
before_build:
- echo before_build step
# Boost 1.58 is not installed in typical fashion, help FindBoost() find binary libs with BOOST_LIBRARYDIR
- ps: $env:BOOST_LIBRARYDIR = "$env:BOOST_ROOT/lib64-msvc-12.0"
- ps: mkdir $env:CLFFT_ROOT
- ps: pushd $env:CLFFT_ROOT
- ps: $env:AMDAPPSDKROOT = "$env:OPENCL_ROOT"
- ps: dir $env:AMDAPPSDKROOT; dir $env:AMDAPPSDKROOT/lib; dir $env:AMDAPPSDKROOT/include;
- cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DBoost_NO_SYSTEM_PATHS=OFF %APPVEYOR_BUILD_FOLDER%/src
# build_script invokes the compiler
build_script:
- echo build_script step
- nmake package
after_build:
- echo after_build step
- ps: ls $env:CLFFT_ROOT
- ps: mv $env:CLFFT_ROOT\*.zip $env:APPVEYOR_BUILD_FOLDER
# Appyeyor will save a copy of the package in it's personal storage
artifacts:
- path: '*.zip'
name: binary_zip
type: zip
# on_finish always executes regardless of passed or failed builds
on_finish:
- echo on_finish step
# Appveyor will push the artifacts it has saved to GitHub 'releases' tab
deploy:
provider: GitHub
auth_token:
secure: dRXIWJKpU7h2RsHX7RqmyYCtCw+Q9O3X5MArloY6p34GZC1w7bp+jQYTZqbdO7bw
artifact: binary_zip
draft: true
prerelease: true
on:
appveyor_repo_tag: true
# Uncomment the following to pause the VM and wait for RDP connetion to debug
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))