forked from ispc/ispc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.appveyor.yml
163 lines (156 loc) · 7.46 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
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
# Copyright (c) 2018-2020, Intel Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# * Neither the name of Intel Corporation nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
# OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
configuration: Release
environment:
LLVM_LATEST: 10.0
DOCKER_PATH: "ispc/test_repo"
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu1604
LLVM_VERSION: latest
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
LLVM_VERSION: latest
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
LLVM_VERSION: 9.0
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
LLVM_VERSION: 8.0
for:
-
matrix:
only:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
init:
- cmd: |-
set ISPC_HOME=%APPVEYOR_BUILD_FOLDER%
set LLVM_HOME=C:\projects\llvm
set CROSS_TOOLS=C:\projects\cross
set CHOCO_DIR=%ProgramData%\chocolatey
set MACOS_SDK=MacOSX10.13.sdk
set WASM=OFF
if "%LLVM_VERSION%"=="latest" (set WASM=ON)
if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2017" ( (set generator="Visual Studio 15 Win64") & (set vsversion=2017))
if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2019" ( (set generator="Visual Studio 16") & (set vsversion=2019))
set LLVM_TAR=llvm-10.0.1-win.vs2019-Release+Asserts-x86.arm.wasm.zip
if "%LLVM_VERSION%"=="9.0" (set LLVM_TAR=llvm-9.0.1-win.vs2017-Release+Asserts-x86.arm.wasm.zip)
if "%LLVM_VERSION%"=="8.0" (set LLVM_TAR=llvm-8.0.1-win.vs2017-Release+Asserts-x86.arm.wasm.zip)
install:
- cmd: |-
cinst winflexbison3
set FLEX_PATH=%CHOCO_DIR%\lib\winflexbison3\tools
if exist "%FLEX_PATH%\win_flex.exe" ( cd %FLEX_PATH% && ren win_flex.exe flex.exe )
if exist "%CROSS_TOOLS%\gnuwin32\" set NONEEDDOCKER=rem
if "%LLVM_VERSION%" == "latest" set LLVM_VERSION=%LLVM_LATEST%
set LLVM_SHORT_VER=%LLVM_VERSION:.=%
cd %ISPC_HOME%
if "%WASM%" == "ON" ( call scripts\install_emscripten.bat )
if "%WASM%" == "ON" ( emcc --version )
set DOCKER_NAME=%DOCKER_PATH%:win_llvm%LLVM_SHORT_VER%
%NONEEDDOCKER% docker pull %DOCKER_NAME%
%NONEEDDOCKER% docker run -d %DOCKER_NAME%
%NONEEDDOCKER% docker ps --all --format "{{.ID}}" --filter ancestor=%DOCKER_NAME% | head -1 > container_id.txt
%NONEEDDOCKER% set /p CONTAINER=<container_id.txt
%NONEEDDOCKER% docker cp %CONTAINER%:%CROSS_TOOLS% %CROSS_TOOLS%
set PATH=%LLVM_HOME%\bin;C:\Python37\;C:\Python37\Scripts;%CHOCO_DIR%\lib\winflexbison3\tools;%PATH%
mkdir %LLVM_HOME% && cd %LLVM_HOME%
cinst wget
wget https://github.com/dbabokin/llvm-project/releases/download/llvm-%LLVM_VERSION%-ispc-dev/%LLVM_TAR%
7z.exe x -t7z %LLVM_TAR%
set PATH=%LLVM_HOME%\bin-%LLVM_VERSION%\bin;%PATH%
before_build:
- cmd: |-
call "C:\Program Files (x86)\Microsoft Visual Studio\%vsversion%\Community\VC\Auxiliary\Build\vcvars64.bat"
cd %ISPC_HOME%
check_env.py
mkdir build && cd build
cmake .. -Thost=x64 -G %generator% -DCMAKE_BUILD_TYPE=%configuration% -DCMAKE_INSTALL_PREFIX=%ISPC_HOME%\install -DISPC_PREPARE_PACKAGE=ON -DM4_EXECUTABLE=C:\cygwin64\bin\m4.exe -DISPC_CROSS=ON -DISPC_GNUWIN32_PATH=%CROSS_TOOLS%\gnuwin32 -DISPC_MACOS_SDK_PATH=%CROSS_TOOLS%\%MACOS_SDK% -DWASM_ENABLED=%WASM% -DISPC_INCLUDE_BENCHMARKS=ON
build_script:
- cmd: msbuild %ISPC_HOME%\build\PACKAGE.vcxproj /p:Platform=x64 /p:Configuration=%configuration%
test_script:
# Perf tests require Win64 configuration. "Visual Studio 16" generator is Win64 by default but for older versions
# we need to specify it manually.
- cmd: |-
set PATH=%ISPC_HOME%\build\bin\%configuration%;%PATH%
cd %ISPC_HOME%
check_isa.exe
ispc --support-matrix
python perf.py -n 1 -g %generator% && msbuild %ISPC_HOME%\build\tests\check-all.vcxproj /t:Build /p:Platform=x64 /p:Configuration=%configuration% && msbuild %ISPC_HOME%\build\RUN_TESTS.vcxproj /t:Build /p:Platform=x64 /p:Configuration=%configuration%
-
matrix:
only:
- APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu1604
init:
- sh: |-
export ISPC_HOME=$APPVEYOR_BUILD_FOLDER
export LLVM_HOME=$APPVEYOR_BUILD_FOLDER/llvm
export CROSS_TOOLS=/usr/local/src/cross
export MACOS_SDK=MacOSX10.13.sdk
export WASM=OFF
export LLVM_TAR=llvm-10.0.1-ubuntu16.04-Release+Asserts-x86.arm.wasm.tar.xz
install:
- sh: |-
sudo apt-get update
sudo apt-get install -y flex libc6-dev-i386 g++-multilib lib32stdc++6
if [ "$LLVM_VERSION" = "latest" ]; then
export LLVM_VERSION=$LLVM_LATEST
export WASM=ON
fi;
if [ "$WASM" == "ON" ]; then source scripts/install_emscripten.sh && emcc --version; fi
LLVM_SHORT_VER=${LLVM_VERSION/\.}
export DOCKER_NAME=$DOCKER_PATH:ubuntu_llvm$LLVM_SHORT_VER
if [ ! -d "$CROSS_TOOLS" ]; then
docker pull "$DOCKER_NAME"
docker run "$DOCKER_NAME"
export CONTAINER=`docker ps --all |head -2 |tail -1 |awk '//{print $1}'`
sudo docker cp $CONTAINER:$CROSS_TOOLS $CROSS_TOOLS
fi
mkdir $LLVM_HOME && cd $LLVM_HOME
wget https://github.com/dbabokin/llvm-project/releases/download/llvm-$LLVM_VERSION-ispc-dev/$LLVM_TAR
tar xvf $LLVM_TAR
export PATH=$LLVM_HOME/bin-$LLVM_VERSION/bin:$PATH
before_build:
- sh: |-
cd $ISPC_HOME && mkdir build && cd build
cmake ../ -DISPC_PREPARE_PACKAGE=ON -DCMAKE_INSTALL_PREFIX=$ISPC_HOME/install -DISPC_CROSS=ON -DISPC_MACOS_SDK_PATH=$CROSS_TOOLS/$MACOS_SDK -DWASM_ENABLED=$WASM
build_script:
- sh: make package -j4
test_script:
# Run only lit testing here since we have full testing in Travis
- sh: |-
bin/ispc --support-matrix
make check-all
cache:
- '%CHOCO_DIR%\bin -> .appveyor.yml'
- '%CHOCO_DIR%\lib -> .appveyor.yml'
- '%CROSS_TOOLS%\gnuwin32 -> .appveyor-clean-cache.txt'
- '%CROSS_TOOLS%\%MACOS_SDK% -> .appveyor-clean-cache.txt'
artifacts:
- path: build/ispc-*
name: ispc