-
Notifications
You must be signed in to change notification settings - Fork 195
/
appveyor.yml
171 lines (164 loc) · 5.79 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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
image: Visual Studio 2017
platform: x64
configuration: Release
clone_folder: C:\Projects\bsf
environment:
FTP_USER:
secure: 6/QO2m0slpHVIaSvCgshSQ==
FTP_PASSWORD:
secure: U9f97lumC+OyorutEQys4w==
FTP_HOST:
secure: vkR/qaZuHZ7k7iZQBfLlNYJzx/+rzkhRlOloJq7o0mk=
install:
# Install composer on tagged and scheduled builds (need it for documentation gen.)
- cmd: if "%APPVEYOR_REPO_TAG%" == "true" (choco install composer)
- cmd: if "%APPVEYOR_SCHEDULED_BUILD%" == "True" (choco install composer)
- cmd: refreshenv
# Install daux on tagged and scheduled builds (need it for documentation gen.)
- cmd: if "%APPVEYOR_REPO_TAG%" == "true" (composer global require daux/daux.io:0.8.1)
- cmd: if "%APPVEYOR_SCHEDULED_BUILD%" == "True" (composer global require daux/daux.io:0.8.1)
- cmd: refreshenv
build_script:
# Setup and CMake configure
- cmd: set INSTALL_DIR=C:/Projects/bsf/install/Release
- cmd: set INSTALL_DIR_DBG=C:/Projects/bsf/install/Debug
- cmd: mkdir "%INSTALL_DIR%"
- cmd: mkdir "%INSTALL_DIR_DBG%"
- cmd: mkdir Build
- cmd: cd Build
- cmd: cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_INSTALL_PREFIX:STRING=%INSTALL_DIR% ..
- cmd: cd ..
# Generate API documentation (only tagged and nightly builds)
- ps: |
if($env:APPVEYOR_REPO_TAG -eq "true" -or $env:APPVEYOR_SCHEDULED_BUILD -eq "true")
{
cd Documentation
mkdir Generated
cd Doxygen
Invoke-WebRequest https://data.banshee3d.com/doxygen-1.8.15.windows.x64.bin.zip -OutFile doxygen.zip
7z x doxygen.zip
./doxygen native.doxyconfig
./doxygen csharp.doxyconfig
cd ../Generated/native/html
Invoke-WebRequest https://data.banshee3d.com/SemanticUI.zip -OutFile SemanticUI.zip
7z x SemanticUI.zip
rm SemanticUI.zip
cd ../../csharp/html
Invoke-WebRequest https://data.banshee3d.com/SemanticUI.zip -OutFile SemanticUI.zip
7z x SemanticUI.zip
rm SemanticUI.zip
cd ../../../..
}
# Generate manuals (only tagged and nightly builds)
- cmd: cd Documentation/Manuals
- cmd: if "%APPVEYOR_REPO_TAG%" == "true" (daux generate)
- cmd: if "%APPVEYOR_SCHEDULED_BUILD%" == "True" (daux generate)
- cmd: cd ../..
# Package documentation (only tagged and nightly builds)
- ps: |
if($env:APPVEYOR_REPO_TAG -eq "true" -or $env:APPVEYOR_SCHEDULED_BUILD -eq "true")
{
cd Documentation/Manuals
mkdir Generated
Move-Item static Generated/nightly
cd Generated/nightly
mkdir csharp
cd ../../../Generated/native
Move-Item html ../../Manuals/Generated/nightly/api
cd ../csharp
Move-Item html ../../Manuals/Generated/nightly/csharp/api
cd ../../..
7z a bsfDocs.zip ./Documentation/Manuals/Generated/* -r
}
# Build and install
- cmd: cd Build
- cmd: cmake --build ./ --config Release
- cmd: cmake --build ./ --config Release --target INSTALL
# Build debug version as well, if building due to a tag
- cmd: if %APPVEYOR_REPO_TAG% == true (cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_INSTALL_PREFIX:STRING=%INSTALL_DIR_DBG% ..)
- cmd: if %APPVEYOR_REPO_TAG% == true (cmake --build ./ --config Debug)
- cmd: if %APPVEYOR_REPO_TAG% == true (cmake --build ./ --config Debug --target INSTALL)
after_build:
- ps: cd ..
- ps: mkdir packaged
- ps: cd packaged
- ps: >-
if($env:APPVEYOR_REPO_TAG -eq "true")
{
Move-Item -Path ../install/Release/include -Destination ./
mkdir bin
cd bin
Move-Item -Path ../../install/Release/bin/Data -Destination ./
Remove-Item ../../install/Debug/bin/Data -Force -Recurse
mkdir Release
Move-Item -Path ../../install/Release/bin/* -Destination ./Release
mkdir Debug
Move-Item -Path ../../install/Debug/bin/* -Destination ./Debug
cd ..
mkdir lib
cd lib
mkdir Release
Move-Item -Path ../../install/Release/lib/* -Destination ./Release
mkdir Debug
Move-Item -Path ../../install/Debug/lib/* -Destination ./Debug
cd ..
}
else
{
Move-Item -Path ../install/Release/* -Destination ./
}
- ps: cd ..
- ps: >-
if($env:APPVEYOR_REPO_TAG -eq "true")
{ $buildName = $env:APPVEYOR_REPO_TAG_NAME }
else
{ $buildName = "$(Get-Date -format yyyy.MM.dd)" }
- ps: Set-AppveyorBuildVariable "BSF_BUILD_NAME" "$buildName"
- cmd: 7z a bsf_%BSF_BUILD_NAME%_win64.zip ./packaged/* -xr!*pdb
- cmd: 7z a bsf_%BSF_BUILD_NAME%_win64_symbols.zip ./packaged/*pdb -r
artifacts:
- path: bsf_%BSF_BUILD_NAME%_win64.zip
name: bsfBinaries
type: zip
- path: bsf_%BSF_BUILD_NAME%_win64_symbols.zip
name: bsfSymbols
type: zip
- path: bsfDocs.zip
name: bsfDocs
type: zip
deploy:
- provider: S3
access_key_id:
secure: DjX7NEjBDYhAMURrE5ucaP95zFdO32Ep91oLWr++/WM=
secret_access_key:
secure: QtDQyveDiuE42QLzLmmaWltDOUgEB9eRzT0GicW4DIeWU+K5szFOkHLpCfL9ukRV
bucket: bsf-nightly
region: us-east-1
folder:
artifact: bsfBinaries,bsfSymbols
set_public: false
on:
APPVEYOR_SCHEDULED_BUILD: true
- provider: S3
access_key_id:
secure: DjX7NEjBDYhAMURrE5ucaP95zFdO32Ep91oLWr++/WM=
secret_access_key:
secure: QtDQyveDiuE42QLzLmmaWltDOUgEB9eRzT0GicW4DIeWU+K5szFOkHLpCfL9ukRV
bucket: bsf-nightly
region: us-east-1
folder:
artifact: bsfBinaries,bsfSymbols
set_public: false
on:
APPVEYOR_REPO_TAG: true
- provider: FTP
protocol: ftp
host: $(FTP_HOST)
username: $(FTP_USER)
password: $(FTP_PASSWORD)
folder: bsfRawDocs
artifact: bsfDocs
application:
active_mode: false
on:
APPVEYOR_SCHEDULED_BUILD: true