-
-
Notifications
You must be signed in to change notification settings - Fork 17
/
appveyor.yml
89 lines (77 loc) · 2.33 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
version: '1.2.0-b{build}'
branches:
only:
- master
- /v\d+\.\d+\.\d+/
#only_commits:
# files:
# - CMakeLists.txt
# - appveyor.yml
# - modules/
# - apps/
# - cmake/
image:
- Visual Studio 2017
configuration:
- Release
- Debug
platform:
- x86
- x64
matrix:
fast_finish: true
clone_folder: c:\projects\virt86
init:
- set ARCH=
- if "%PLATFORM%"=="x64" (set ARCH= Win64)
- echo %ARCH%
- echo %APPVEYOR_BUILD_WORKER_IMAGE%
- set generator="Visual Studio 15 2017%ARCH%"
- echo CMake generator = %GENERATOR%
- set VIRT86_ARTIFACT_PATH=C:\projects\virt86\build\_artifact\virt86-MSVC-%PLATFORM%-%CONFIGURATION%
- echo virt86 artifact path = %VIRT86_ARTIFACT_PATH%
before_build:
- cmd: |-
mkdir build
cd build
mkdir %VIRT86_ARTIFACT_PATH%
cmake --version
cmake .. -G %GENERATOR% -DCMAKE_INSTALL_PREFIX=%VIRT86_ARTIFACT_PATH% -DCMAKE_SYSTEM_VERSION=10.0.17763.0
copy c:\projects\virt86\README.md %VIRT86_ARTIFACT_PATH%
copy c:\projects\virt86\LICENSE %VIRT86_ARTIFACT_PATH%
build:
project: c:\projects\virt86\build\INSTALL.vcxproj
verbosity: minimal
parallel: true
# Manually push artifacts in order to add the version to the filename
after_test:
- ps: |-
function ZipFiles($zipfilename, $sourcedir)
{
[Reflection.Assembly]::LoadWithPartialName("System.IO.Compression.FileSystem")
$compressionLevel = [System.IO.Compression.CompressionLevel]::Optimal
[System.IO.Compression.ZipFile]::CreateFromDirectory($sourcedir, $zipfilename, $compressionLevel, $false)
}
$binPath = "$($env:VIRT86_ARTIFACT_PATH)"
if ($($env:APPVEYOR_REPO_TAG) -eq "true") {
$tagName = $env:APPVEYOR_REPO_TAG_NAME
$tagName = $tagName.Remove(0, 1)
$zipName = "virt86-$($tagName)-Windows-MSVC-$($env:PLATFORM)-$($env:CONFIGURATION).zip"
} else {
$zipName = "virt86-$($env:APPVEYOR_BUILD_VERSION)-Windows-MSVC-$($env:PLATFORM)-$($env:CONFIGURATION).zip"
}
$zipFullPath = "$($binPath)$($zipName)"
ZipFiles "$($zipFullPath)" "$($binPath)" | Out-Null
Push-AppveyorArtifact "$($zipFullPath)" -FileName $zipName
deploy:
- provider: BinTray
username: strikerx3
api_key:
secure: MBloC3yYRMJJW4YwiQr15SO89uaxGb0o1BmE0NL0AyfHnSNVr79pBH45CloK9arG
subject: strikerx3
repo: virt86
package: virt86
version: 1.2.0
publish: true
override: true
explode: false