forked from KhronosGroup/KTX-Software
-
Notifications
You must be signed in to change notification settings - Fork 4
/
.appveyor.yml
195 lines (172 loc) · 6.89 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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
# Copyright 2015-2020 The Khronos Group Inc.
# SPDX-License-Identifier: Apache-2.0
version: "{build}"
image:
- Visual Studio 2015
- Visual Studio 2017
- Visual Studio 2019
configuration:
- Debug
- Release
platform:
- x64
# - Win32
environment:
BUILD_DIR: build
CMAKE_GEN: Visual Studio 15 2017
GIT_TRACE: 0
OPENGL_ES_EMULATOR: C:/Imagination/Windows_x86_64
OPENGL_ES_EMULATOR_WIN: C:\Imagination\Windows_x86_64
PVR_SDK_GH_VER: 4.3
PVR_SDK_DL_VER: 2020_R1
VULKAN_SDK_VER: 1.2.176.1
branches:
except:
- /^subrepo\/.+/
# Do not skip tags. Deploy will not be run either.
skip_tags: false
for:
- matrix:
only:
- image: Visual Studio 2015
environment:
CMAKE_GEN: Visual Studio 14 2015
- matrix:
only:
- image: Visual Studio 2017
environment:
CMAKE_GEN: Visual Studio 15 2017
- matrix:
only:
- image: Visual Studio 2019
environment:
CMAKE_GEN: Visual Studio 16 2019
build:
verbosity: detailed
# Following is for GIT_TRACE: 1 above.
#on_failure:
# - ps: Get-ChildItem .\.git\lfs\objects\logs\*.log | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
# Following is for when we want to stop RDP exiting at end of build.
#on_finish:
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
clone_folder: c:\projects\ktx
init:
# Set to match Git for Windows default so files with have the line endings we
# expect on Windows. Why Appveyor changed it, I have no idea.
- git config --global core.autocrlf true
# This ps command enables RDP and provides the login details. blockRdp variant stops the
# build proceeding until RDP is connected.
# - ps: '$blockRdp = $true; iex ((new-object net.webclient).DownloadString(''https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1''))'
# - ps: | #iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
# N.B.: for some reason indenting "- cmd" on the following lines causes syntax errors.
# Not using PS for downloads because its curl is completely different.
install:
- if not "%appveyor_build_worker_image%" == "Visual Studio 2019" cinst doxygen.install
#- ps: |
#run mkversion
#Update-AppveyorBuild -Version "$($env:ospsuite_version).$($env:appveyor_build_version)"
- cmd: |
REM Download PowerVR OpenGL ES Emulator libraries (latest version).
md %OPENGL_ES_EMULATOR_WIN%
cd %OPENGL_ES_EMULATOR_WIN%
curl -L -O https://github.com/powervr-graphics/Native_SDK/raw/master/lib/Windows_x86_64/libGLES_CM.dll
curl -L -O https://github.com/powervr-graphics/Native_SDK/raw/master/lib/Windows_x86_64/libGLES_CM.lib
curl -L -O https://github.com/powervr-graphics/Native_SDK/raw/master/lib/Windows_x86_64/libGLESv2.dll
curl -L -O https://github.com/powervr-graphics/Native_SDK/raw/master/lib/Windows_x86_64/libGLESv2.lib
curl -L -O https://github.com/powervr-graphics/Native_SDK/raw/master/lib/Windows_x86_64/libEGL.dll
curl -L -O https://github.com/powervr-graphics/Native_SDK/raw/master/lib/Windows_x86_64/libEGL.lib
REM Install VulkanSDK
cd C:\
curl -o VulkanSDK-Installer.exe https://sdk.lunarg.com/sdk/download/%VULKAN_SDK_VER%/windows/VulkanSDK-%VULKAN_SDK_VER%-Installer.exe?Human=true
.\VulkanSDK-Installer.exe /S
REM refresh the environment to pick up VulkanSDK changes.
refreshenv
REM cd back to cloned repo.
cd C:\projects\ktx
REM Pull only Windows binaries.
git lfs pull --include=other_lib/win
# # One-line install/build zlib (for loadtests) into C:\Program Files\zlib
# - ps: |
# Invoke-WebRequest -Uri https://raw.githubusercontent.com/horta/zlib.install/master/install.bat -OutFile install.bat
# ./install.bat
#cache:
# - other_lib
before_build:
# Expand date keywords. -q is because the VS2019 image has a more
# recent git version (2.21.0) in which git checkout writes to StdErr
# which PS treats as an exception causing the build to fail, if checkout
# is the last command in this shell. The write is an innocuous message
# about the number of paths updated.
- ps: |
./install-gitconfig.bat
rm TODO.md, lib/mainpage.md, pkgdoc/pages.md
git checkout -q TODO.md lib/mainpage.md pkgdoc/pages.md
git status
build_script:
- ps: |
# Pick up PATH changes made by Doxygen installer.
refreshenv
$ErrorActionPreference = 'Stop'
# Configure and build with SSE support (default).
$env:KTX_BUILD_DIR = "$env:BUILD_DIR"
echo "Build via $env:CMAKE_GEN Arch:$env:PLATFORM dir:$env:KTX_BUILD_DIR"
cmake -G "$env:CMAKE_GEN" -A $env:PLATFORM . -B $env:KTX_BUILD_DIR -DKTX_FEATURE_LOADTEST_APPS=ON -DKTX_FEATURE_DOC=ON -DOPENGL_ES_EMULATOR="$env:OPENGL_ES_EMULATOR"
pushd $env:KTX_BUILD_DIR
cmake --build . --config $env:CONFIGURATION
cmake --build . --config $env:CONFIGURATION --target PACKAGE
#echo "***** toktx version.h *****"
#pwd
#cat ../tools/toktx/version.h
#echo "****** toktx version ******"
## Because toktx prints version to stderr.
#$ErrorActionPreference = 'SilentlyContinue'
#& $env:CONFIGURATION/toktx --version
#$ErrorActionPreference = 'Stop'
#echo "***************************"
popd
$env:KTX_BUILD_DIR_NOSSE = "$env:BUILD_DIR\nosse"
echo "Build without SSE support via $env:CMAKE_GEN Arch:$env:PLATFORM dir:$env:KTX_BUILD_DIR_NOSSE"
cmake -G "$env:CMAKE_GEN" -A $env:PLATFORM . -B $env:KTX_BUILD_DIR_NOSSE -DBASISU_SUPPORT_SSE=OFF
pushd $env:KTX_BUILD_DIR_NOSSE
cmake --build . --config $env:CONFIGURATION
popd
echo "Done Building"
test_script:
- ps: |
$ErrorActionPreference = 'Stop'
$env:KTX_BUILD_DIR = "$env:BUILD_DIR"
pushd $env:KTX_BUILD_DIR
ctest -C $env:CONFIGURATION
popd
$env:KTX_BUILD_DIR_NOSSE = "$env:BUILD_DIR\nosse"
pushd $env:KTX_BUILD_DIR_NOSSE
ctest -C $env:CONFIGURATION
popd
artifacts:
# Save in cloud storage so we can deploy it. Will be kept unnecessarily for 6 months.
# Would be nice to avoid saving artifacts from every build in the matrix. No info
# in Appveyor docs.
- path: '$(BUILD_DIR)/KTX-Software-*.exe'
name: WindowsInstaller
- path: '$(BUILD_DIR)/KTX-Software-*.exe.sha1'
name: WindowsInstallerSha1
before_deploy:
- ps: |
foreach ($artifactName in $artifacts.keys) {
$artifacts[$artifactName]
}
deploy:
# Deploy to GitHub Releases
provider: GitHub
auth_token:
secure: ZEoxs4bA/iVAEfPdQOVDq0fyKA6eyecgyvQ0/1kMu6ic2+H6Aua6kPk2hNvWG4tM
# Don't set so tag name will be used as release name.
#release:
# Can't get this to work using artifact.path so use artifact.name set above.
artifact: WindowsInstaller,WindowsInstallerSha1
draft: true
#prerelease: true
on:
APPVEYOR_REPO_TAG: true # deploy on tag push only
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
CONFIGURATION: Release