-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.appveyor.yml
116 lines (90 loc) · 3.9 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
# Notes:
# - Minimal appveyor.yml file is an empty file. All sections are optional.
# - Indent each level of configuration with 2 spaces. Do not use tabs!
# - All section names are case-sensitive.
# - Section names should be unique on each level.
#---------------------------------#
# general configuration #
#---------------------------------#
# version format
version: '{branch}-{build}'
# Do not build on tags (GitHub only)
skip_tags: true
# manual mode
branches:
except:
- /.*/
#---------------------------------#
# environment configuration #
#---------------------------------#
# environment variables
# build system info: https://www.appveyor.com/docs/installed-software/
os: Visual Studio 2017
environment:
REPO_DIR: &REPO_DIR c:\project # directory created by appveyor
OGG_SOL_FILE: libogg_static.sln
OGG_MSBUILD_CMD_X86: /maxcpucount /property:Configuration=Release,Platform=Win32
OGG_MSBUILD_CMD_X64: /maxcpucount /property:Configuration=Release,Platform=x64
OPUS_SOL_FILE: opus.sln
OPUS_GIT_TAG: v1.2
OPUS_MSBUILD_CMD_X86: /maxcpucount /property:Configuration=Release,Platform=Win32 /target:opus
OPUS_MSBUILD_CMD_X64: /maxcpucount /property:Configuration=Release,Platform=x64 /target:opus
OPUS-TOOLS_SOL_FILE: opus-tools.sln
OPUS-TOOLS_MSBUILD_CMD_X86: /maxcpucount /property:Configuration=Release,Platform=Win32
OPUS-TOOLS_MSBUILD_CMD_X64: /maxcpucount /property:Configuration=Release,Platform=x64
# clone directory
clone_folder: *REPO_DIR
#---------------------------------#
# build configuration #
#---------------------------------#
# scripts to run before build
before_build:
# git submodules
- cd "%REPO_DIR%"
- git submodule update --init --remote --recursive
# prepare ogg
- cd "%REPO_DIR%"
- if exist "lib\libogg\win32\VS2015" (rd /S /Q "lib\libogg\win32\VS2015")
- move /Y "src\ogg\VS2015" "lib\libogg\win32"
- msbuild "lib\libogg\win32\VS2015\%OGG_SOL_FILE%" %OGG_MSBUILD_CMD_X86%
- msbuild "lib\libogg\win32\VS2015\%OGG_SOL_FILE%" %OGG_MSBUILD_CMD_X64%
# prepare opus
- cd "%REPO_DIR%\lib\opus"
- git checkout tags/%OPUS_GIT_TAG%
- cd "%REPO_DIR%"
- if exist "lib\opus\win32" (rd /S /Q "lib\opus\win32\VS2015")
- move /Y "src\opus\VS2015" "lib\opus\win32"
- msbuild "lib\opus\win32\VS2015\%OPUS_SOL_FILE%" %OPUS_MSBUILD_CMD_X86%
- msbuild "lib\opus\win32\VS2015\%OPUS_SOL_FILE%" %OPUS_MSBUILD_CMD_X64%
# to run your custom scripts instead of automatic MSBuild
build_script:
- cd "%REPO_DIR%"
- if exist "lib\opus-tools\win32\VS2015" (rd /S /Q "lib\opus-tools\win32\VS2015")
- move /Y "src\opus-tools\VS2015" "lib\opus-tools\win32\VS2015"
- msbuild "lib\opus-tools\win32\VS2015\%OPUS-TOOLS_SOL_FILE%" %OPUS-TOOLS_MSBUILD_CMD_X86%
- mkdir "lib\opus-tools\win32\VS2015\x64\Release"
- copy "src\opus-tools\opusenc.pgd" "lib\opus-tools\win32\VS2015\x64\Release\"
- msbuild "lib\opus-tools\win32\VS2015\%OPUS-TOOLS_SOL_FILE%" %OPUS-TOOLS_MSBUILD_CMD_X64%
# scripts to run before deployment
after_build:
# prepare for artifacts packaging
- cd "%REPO_DIR%"
- mkdir "opus-tools\win32" "opus-tools\x64"
- copy "Readme.md" "opus-tools"
- copy "lib\opus-tools\win32\VS2015\Win32\Release\opus*.exe" "opus-tools\win32"
- copy "lib\opus-tools\win32\VS2015\x64\Release\opus*.exe" "opus-tools\x64"
- 7z a -sfx7z.sfx -mx9 "opus-tools.exe" "opus-tools" # the artifact must reside at the source repo root
- 'powershell -Command "& { $hash = (Get-FileHash -Algorithm SHA1 "opus-tools.exe").hash.ToString().toLower(); Write-Host $hash " *opus-tools.exe"; }" > "opus-tools.exe.sha1"'
#---------------------------------#
# tests configuration #
#---------------------------------#
# to disable automatic tests
test: off
#---------------------------------#
# artifacts configuration #
#---------------------------------#
artifacts:
- path: opus-tools.exe
name: exe
- path: opus-tools.exe.sha1
name: checksum