-
Notifications
You must be signed in to change notification settings - Fork 53
/
.appveyor.yml
78 lines (70 loc) · 4.34 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
version: "{branch}.build.{build}"
clone_folder: c:\projects\simdcomp
#cache:
# c:\build-cache -> .appveyor.yml
environment:
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
ARCH: x64
# looks like vc14 has trouble with code on x86, at least on the AppVeyor image
# - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
# ARCH: x86
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
ARCH: x64
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
ARCH: x86
build_script:
ps: |
cd c:\projects\simdcomp
echo "" | Out-File -Encoding "ASCII" task.bat
if ('Visual Studio 2015' -eq $env:APPVEYOR_BUILD_WORKER_IMAGE) {
$VC = 14;
$vs_shell_cmd = 'call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" ' + $env:ARCH + ' 2>&1'
} elseif ('Visual Studio 2017' -eq $env:APPVEYOR_BUILD_WORKER_IMAGE) {
$VC = 15;
if ('x64' -eq $env:ARCH) {
$vs_shell_cmd = 'call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat" 2>&1'
} else {
$vs_shell_cmd = 'call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars32.bat" 2>&1'
}
}
mkdir 'c:\tmp_pack'
echo $vs_shell_cmd | Out-File -Encoding "ASCII" -Append task.bat
$move_cmd = 'move *.zip c:\tmp_pack'
if ($VC -gt 14) {
# these won't be tested, just build and upload artifact, vc15 only
$cmd = 'nmake /nologo /f makefile.vc AVX512=yes PKG_VERSION=' + $env:APPVEYOR_REPO_COMMIT.substring(0, 8) + ' MACHINE=' + $env:ARCH + ' 2>&1'
echo $cmd | Out-File -Encoding "ASCII" -Append task.bat
$cmd = 'nmake /nologo /f makefile.vc AVX512=yes PKG_VERSION=' + $env:APPVEYOR_REPO_COMMIT.substring(0, 8) + ' MACHINE=' + $env:ARCH + ' pack 2>&1'
echo $cmd | Out-File -Encoding "ASCII" -Append task.bat
echo $move_cmd | Out-File -Encoding "ASCII" -Append task.bat
echo 'nmake /nologo /f makefile.vc clean' | Out-File -Encoding "ASCII" -Append task.bat
$cmd = 'nmake /nologo /f makefile.vc AVX2=yes PKG_VERSION=' + $env:APPVEYOR_REPO_COMMIT.substring(0, 8) + ' MACHINE=' + $env:ARCH + ' 2>&1'
echo $cmd | Out-File -Encoding "ASCII" -Append task.bat
$cmd = 'nmake /nologo /f makefile.vc AVX2=yes PKG_VERSION=' + $env:APPVEYOR_REPO_COMMIT.substring(0, 8) + ' MACHINE=' + $env:ARCH + ' pack 2>&1'
echo $cmd | Out-File -Encoding "ASCII" -Append task.bat
echo $move_cmd | Out-File -Encoding "ASCII" -Append task.bat
echo 'nmake /nologo /f makefile.vc clean' | Out-File -Encoding "ASCII" -Append task.bat
}
$cmd = 'nmake /nologo /f makefile.vc PKG_VERSION=' + $env:APPVEYOR_REPO_COMMIT.substring(0, 8) + ' MACHINE=' + $env:ARCH + ' 2>&1'
echo $cmd | Out-File -Encoding "ASCII" -Append task.bat
$cmd = 'nmake /nologo /f makefile.vc PKG_VERSION=' + $env:APPVEYOR_REPO_COMMIT.substring(0, 8) + ' MACHINE=' + $env:ARCH + ' pack 2>&1'
echo $cmd | Out-File -Encoding "ASCII" -Append task.bat
echo $move_cmd | Out-File -Encoding "ASCII" -Append task.bat
$here = (Get-Item -Path "." -Verbose).FullName
$task = $here + '\task.bat'
& $task
after_build:
ps: |
Get-ChildItem 'c:\tmp_pack' -Filter *.zip |
Foreach-Object {
Push-AppveyorArtifact $_.FullName
}
test_script:
ps: |
cd c:\projects\simdcomp
echo "" | Out-File -Encoding "ASCII" task.bat
$here = (Get-Item -Path "." -Verbose).FullName
echo '.\unit.exe' | Out-File -Encoding "ASCII" -Append task.bat
$task = $here + '\task.bat'
& $task