-
Notifications
You must be signed in to change notification settings - Fork 0
/
.appveyor.yml
152 lines (145 loc) · 6.69 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
# 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: 11.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: 10.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 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-11.0.0-win.vs2019-Release+Asserts-x86.arm.wasm.7z
if "%LLVM_VERSION%"=="10.0" (set LLVM_TAR=llvm-10.0.1-win.vs2019-Release+Asserts-x86.arm.wasm.zip)
install:
- ps: choco install --no-progress winflexbison3 wget 7zip
- cmd: |-
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% > container_id.txt
%NONEEDDOCKER% set /p CONTAINER=<container_id.txt
%NONEEDDOCKER% docker cp %CONTAINER%:%CROSS_TOOLS% %CROSS_TOOLS%
set PATH=%LLVM_HOME%\bin;%PATH%
mkdir %LLVM_HOME% && cd %LLVM_HOME%
wget -q 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 -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 WASM=OFF
export LLVM_TAR=llvm-11.0.0-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"
export CONTAINER=`docker run -d "$DOCKER_NAME"`
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 -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'
artifacts:
- path: build/ispc-*
name: ispc