forked from POV-Ray/povray
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
98 lines (87 loc) · 3.96 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
version: 3.7+av{build}
pull_requests:
do_not_increment_build_number: true
branches:
except:
- /v[0-9]/
skip_tags: true
os:
- Visual Studio 2015
shallow_clone: true
matrix:
fast_finish: true
environment:
matrix:
- configuration: Release
platform: Win32
bin_dir: bin32
artifact_suffix: -Win32
PlatformToolset: v100
- configuration: Release-SSE2
platform: Win32
bin_dir: bin32
artifact_suffix: -Win32-sse2
PlatformToolset: v100
- configuration: Release
platform: x64
bin_dir: bin64
artifact_suffix: -Win64
PlatformToolset: v140
before_build:
- ps: |
$env:devenv = $env:VS140COMNTOOLS + '\..\IDE\devenv'
& $env:devenv windows\vs10\povray.sln /upgrade
$env:pov_autobuild_a = '#define POV_RAY_IS_AUTOBUILD 1'
$env:pov_autobuild_b = '#define POV_RAY_AUTOBUILD_ID "av' + $env:APPVEYOR_BUILD_NUMBER + '"'
(Get-Content source\base\build.h).replace('//{POV_AUTOBUILD_A}', $env:pov_autobuild_a) | Set-Content source\base\build.h
(Get-Content source\base\build.h).replace('//{POV_AUTOBUILD_B}', $env:pov_autobuild_b) | Set-Content source\base\build.h
(Get-Content source\base\build.h).replace('//{POV_AUTOBUILD_C}', $env:pov_autobuild_c) | Set-Content source\base\build.h
(Get-Content source\base\build.h).replace('//{POV_AUTOBUILD_1}', $env:pov_autobuild_1) | Set-Content source\base\build.h
(Get-Content source\base\build.h).replace('//{POV_AUTOBUILD_2}', $env:pov_autobuild_2) | Set-Content source\base\build.h
(Get-Content source\base\build.h).replace('//{POV_AUTOBUILD_3}', $env:pov_autobuild_3) | Set-Content source\base\build.h
(Get-Content source\base\build.h).replace('YOUR NAME (YOUR EMAIL)', $env:pov_authorized_by) | Set-Content source\base\build.h
(Get-Content source\base\build.h).replace('#error Please fill in BUILT_BY, then remove this line', '') | Set-Content source\base\build.h
build:
project: windows\vs10\povray.sln
parallel: true
verbosity: minimal
after_build:
- ps: |
$env:pov_exe_version = (Get-Content unix\VERSION)
$env:pov_tag_version = 'v' + $env:pov_exe_version
$env:pov_build_version = $env:pov_tag_version + '+av' + $env:APPVEYOR_BUILD_NUMBER
$env:pov_build_message = ''
if ($env:pov_exe_version -match '^[0-9.]*-x') {
$env:pov_build_type = 'Experimental'
$env:pov_build_message += '**EXPERIMENTAL: This version of POV-Ray is not part of the official development branch!**'
$env:pov_build_message += "`n`n"
} elseif ($env:pov_exe_version -match '^[0-9.]*-') {
$env:pov_build_type = 'Development'
} else {
$env:pov_build_type = 'Automated'
}
$env:pov_release_type = ($env:pov_build_type).ToLower() + ' release'
$env:pov_build_title = $env:pov_build_type + ' build'
$env:pov_build_message += '**Note:** This is a binary-only ' + $env:pov_release_type + '; to install, copy the binary into an existing POV-Ray 3.7 installation. (Make sure to backup the original binary first.)'
$env:pov_build_message += "`n`n"
$env:pov_build_message += 'The 64-bit binary may require Windows Vista or higher. To run this ' + $env:pov_release_type + ' on an earlier 64-bit version of Windows, you may need to use the 32-bit SSE2 binary instead.'
$env:pov_zipdir = "povray-" + $env:pov_exe_version + '-av' + $env:APPVEYOR_BUILD_NUMBER + $env:artifact_suffix
$env:pov_binary = "Windows\vs10\" + $env:bin_dir + "\pvengine*.exe"
$env:pov_zip = "artifacts\" + $env:pov_zipdir + ".7z"
New-Item -ItemType directory -Path $env:pov_zipdir | Out-Null
New-Item -ItemType directory -Path "artifacts" | Out-Null
Copy-Item $env:pov_binary $env:pov_zipdir
& "7z" "a" "-r" $env:pov_zip $env:pov_zipdir
test: off
artifacts:
- path: artifacts\*.7z
name: binaryOnly7z
deploy:
- provider: GitHub
tag: $(pov_tag_version)
release: $(pov_build_title) $(pov_build_version)
description: $(pov_build_message)
auth_token:
secure: WkcFPXyr/SJ9TXixTQyivhfoR9FzlryIbc4deHeQ0eA6YRXL0wQopMYJ6XL1/FJK
draft: true
prerelease: true