forked from tom-seddon/b2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
141 lines (124 loc) · 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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
version: '{build}'
# don't make Travis's tag creation prod AppVeyor into doing repeated
# builds.
skip_tags: true
branches:
only:
- master
- wip/master
for:
-
branches:
only:
- master
environment:
PRERELEASE: false
-
branches:
only:
- wip/master
environment:
PRERELEASE: true
# the variable is called "support 10.9", because that's the net
# result, but it's not very well named, because it actually just
# controls linking against ffmpeg 4 or not. The opposite of "support
# 10.9" is "target 11.0" - because that's what Homebrew's ffmpeg 4
# supports - at least at the time of writing.
environment:
matrix:
- MACOS_SUPPORT_10_9: true
- MACOS_SUPPORT_10_9: false
image:
- Visual Studio 2019
- Ubuntu2204
- macos-bigsur
matrix:
exclude:
- image: Visual Studio 2019
MACOS_SUPPORT_10_9: true
- image: Ubuntu2204
MACOS_SUPPORT_10_9: true
install:
- ps: $env:SUFFIX = $(git log -1 --format=%cd-%h --date=format:%Y%m%d-%H%M%S $env:APPVEYOR_REPO_COMMIT)
- ps: $env:TIMESTAMP = $(git log -1 --format=%cd --date=format:%Y%m%d-%H%M%S $env:APPVEYOR_REPO_COMMIT)
- ps: $env:RELEASE_NAME = "b2-"+$env:SUFFIX
- ps: |
if ($env:PRERELEASE -eq $true) {
$env:RELEASE_NAME="$env:RELEASE_NAME-prerelease"
}
- ps: |
if ($env:CI_WINDOWS -eq $true) {
echo 'Windows'
$env:deploy=$true
$env:OUTPUT_NAME="build\_Rel\win32\b2-windows-"+$env:SUFFIX+".zip"
$env:SYMBOLS_NAME="build\_Rel\win32\symbols.b2-windows-"+$env:SUFFIX+".7z"
$env:PYTHON3="py"
$env:PY_PYTHON="3"
} elseif ($env:CI_LINUX -eq $true) {
echo 'Linux'
cmake --version
$env:deploy=$false
sudo apt-get -y update
sudo apt-get -y install libcurl4-openssl-dev libgl1-mesa-dev libglvnd-dev libgtk2.0-dev libpulse-dev uuid-dev libsdl2-dev libuv1-dev
$env:PYTHON3="python3"
} elseif ($env:CI_MACOS -eq $true) {
echo 'macOS'
$env:deploy=$true
if ($env:MACOS_SUPPORT_10_9 -eq $true) {
$env:MACOS_VER="10.9"
} else {
$env:MACOS_VER="11.0"
}
$env:OUTPUT_NAME="build/_Rel/osx/b2-osx-"+$env:MACOS_VER+"-"+$env:SUFFIX+".dmg"
$env:SYMBOLS_NAME="build/_Rel/osx/symbols.b2-osx-"+$env:MACOS_VER+"-"+$env:SUFFIX+".7z"
$env:HOMEBREW_NO_AUTO_UPDATE=1
$env:HOMEBREW_NO_INSTALL_CLEANUP=1
# https://github.com/appveyor/ci/issues/3786
rm -f /usr/local/include/X11
brew install ninja
if ($env:MACOS_SUPPORT_10_9 -eq $false) {
brew install ffmpeg@4
# brew install libav
# which pkg-config
# pkg-config --variable pc_path pkg-config
# ls -l /usr/local/bin/
# ls -l /usr/local/lib/
# ls -l /usr/local/lib/pkgconfig/
$env:PKG_CONFIG_PATH=$env:PKG_CONFIG_PATH+"/usr/local/opt/ffmpeg@4/lib/pkgconfig:"
pkg-config --cflags libavcodec
find /usr/local/Cellar/ffmpeg@4/4.4.1/include -type f
pkg-config --libs libavcodec
pkg-config --list-all | sort
}
$env:PYTHON3="python3"
} else {
echo 'Unknown platform'
$env:PLATFORM="unknown"
$env:deploy=$false
$env:PYTHON3="python3"
}
- ps: 'dir env:'
- git submodule init
- git submodule update
build_script:
- ps: |
& $env:PYTHON3 -u ./etc/release/release.py --verbose --timestamp=$env:TIMESTAMP --macos-deployment-target=$env:MACOS_VER $env:SUFFIX
if($lastexitcode -eq 0) {
$host.SetShouldExit(0);
}
artifacts:
- path: $(OUTPUT_NAME)
name: output
- path: $(SYMBOLS_NAME)
name: symbols
deploy:
- release: $(RELEASE_NAME)
description: |
$(APPVEYOR_REPO_COMMIT_MESSAGE)
$(APPVEYOR_REPO_COMMIT_MESSAGE_EXTENDED)
provider: GitHub
auth_token:
secure: NTWtNQsxaMVhAyad5bBM3H6lTGsqRCprICrq8kvYvXgjnaeDcjjLpNe0H0ZaG4sl
artifact: output,symbols
draft: false
prerelease: $(PRERELEASE)