-
Notifications
You must be signed in to change notification settings - Fork 0
/
.appveyor.yml
126 lines (119 loc) · 5.4 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
# Copyright (c) 2018-2024, Intel Corporation
#
# SPDX-License-Identifier: BSD-3-Clause
configuration: Release
environment:
LLVM_LATEST: 18.1
DOCKER_PATH: "ispc/test_repo"
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu2204
LLVM_VERSION: latest
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
LLVM_VERSION: latest
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
LLVM_VERSION: 17.0
for:
-
matrix:
only:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
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 2019" ( (set generator="Visual Studio 16") & (set vspath="C:\Program Files (x86)\Microsoft Visual Studio\2019"))
if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2022" ( (set generator="Visual Studio 17") & (set vspath="C:\Program Files\Microsoft Visual Studio\2022"))
set LLVM_TAR=llvm-18.1.8-win.vs2019-Release+Asserts-x86.arm.wasm.tar.7z
if "%LLVM_VERSION%"=="17.0" (set LLVM_TAR=llvm-17.0.6-win.vs2019-Release+Asserts-x86.arm.wasm.tar.7z)
if "%LLVM_VERSION%"=="16.0" (set LLVM_TAR=llvm-16.0.6-win.vs2019-Release+Asserts-x86.arm.wasm.tar.7z)
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_llvm100
%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/ispc/ispc.dependencies/releases/download/llvm-%LLVM_VERSION%-ispc-dev/%LLVM_TAR%
7z.exe x -t7z %LLVM_TAR%
7z.exe x -ttar llvm*tar
set PATH=%LLVM_HOME%\bin-%LLVM_VERSION%\bin;%PATH%
before_build:
- cmd: |-
call %vspath%\Community\VC\Auxiliary\Build\vcvars64.bat
cd %ISPC_HOME%
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 scripts\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: Ubuntu2204
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-18.1.8-ubuntu22.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 libtbb-dev
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/ispc/ispc.dependencies/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 -DCMAKE_CXX_FLAGS="-Werror"
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