-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
95 lines (82 loc) · 3.18 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
version: '1.0.{build}'
os: Visual Studio 2015
# 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: false
# 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"
OPENCL_REGISTRY: "https://www.khronos.org/registry/cl"
matrix:
- VCVARSALL: C:\"Program Files (x86)"\"Microsoft Visual Studio 14.0"\VC\vcvarsall.bat %PLATFORM%
PYTHON: "C:/Python36/"
BUILD_ENV: "Ninja"
BUILD_DIR: "build"
PYTHON_VERSION: "3.6"
BUILD_SANITIZE_MEMORY: 0
VERBOSE: ON
install:
# Install yasha
- "%PYTHON%/python.exe -m pip install yasha"
# Install Ninja
- set NINJA_URL="https://github.com/ninja-build/ninja/releases/download/v1.6.0/ninja-win.zip"
- appveyor DownloadFile %NINJA_URL% -FileName ninja.zip
- 7z x ninja.zip -oC:\projects\deps\ninja > nul
- set PATH=C:\projects\deps\ninja;%PATH%
- ninja --version
# Install OpenCL
#- echo Fetching source
#- 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
#- git clone --depth 1 https://github.com/KhronosGroup/OpenCL-Headers.git inc/CL
#- 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: popd
## Switch to OpenCL 1.2 headers
#- ps: pushd inc/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
# before_build is used to run configure steps
before_build:
# Refresh submodules
- git submodule update --init --recursive
# Setup env
- call %VCVARSALL%
- set PATH=c:\Program Files\LLVM\msbuild-bin\;%PATH%
- set INCLUDE=c:\Program Files\LLVM\lib\clang\4.0.0\include\;%INCLUDE%
- mkdir %BUILD_DIR% && cd %BUILD_DIR%
# Generate
- cmake .. -G"%BUILD_ENV%" -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DPYTHON_EXECUTABLE:FILEPATH="%PYTHON%"/python.exe -DBUILD_SANITIZE_MEMORY=%BUILD_SANITIZE_MEMORY% -DCMAKE_VERBOSE_MAKEFILE:BOOL=%VERBOSE%
build_script:
- cmake --build . --config %CONFIGURATION% --target zacc.system.detect -- -j 4
- cmake --build . --config %CONFIGURATION% --target zacc.tests.all -- -j 4
test_script:
- ls .\bin
- ls .\lib
- .\bin\zacc.system.detect.exe
- ctest --output-on-failure
#on_finish:
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))