forked from Try/Tempest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
134 lines (116 loc) · 4.6 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
configuration:
- release
environment:
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
GENERATOR: "Ninja"
VCVARSALL: "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Auxiliary/Build/vcvarsall.bat"
PLATFORM: x64
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 # used as mingw
GENERATOR: "Ninja"
CC: C:/msys64/mingw64/bin/gcc.exe
CXX: C:/msys64/mingw64/bin/g++.exe
- APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu2004
GENERATOR: ""
- APPVEYOR_BUILD_WORKER_IMAGE: macos-bigsur
GENERATOR: "Ninja"
install:
- ps: >-
$VK_SDK = '1.3.231.1'
if($IsLinux) {
sudo apt-get update
sudo apt-get --yes install libvulkan-dev libasound2-dev libx11-dev libxcursor-dev
# Vulkan SDK
$env:VULKAN_SDK = "$env:APPVEYOR_BUILD_FOLDER/VulkanSDK/$VK_SDK/x86_64"
$env:VK_LAYER_PATH = "$env:VULKAN_SDK/etc/vulkan/explicit_layers.d"
$env:LD_LIBRARY_PATH = "$env:VULKAN_SDK/lib"
Invoke-WebRequest -Uri https://sdk.lunarg.com/sdk/download/$VK_SDK/linux/vulkansdk-linux-x86_64-$VK_SDK.tar.gz -OutFile VulkanSDK.tar.gz
mkdir VulkanSDK
tar -xzf VulkanSDK.tar.gz -C ./VulkanSDK
}
if($IsWindows) {
# Vulkan SDK
$env:VULKAN_SDK = "C:/VulkanSDK/$VK_SDK"
Invoke-WebRequest -Uri https://sdk.lunarg.com/sdk/download/$VK_SDK/windows/VulkanSDK-$VK_SDK-Installer.exe -OutFile VulkanSDK.exe
./VulkanSDK.exe --accept-licenses --default-answer --confirm-command install
}
if($IsLinux) {
# GLSL compiller
mkdir glslang
cd glslang
Invoke-WebRequest -Uri https://github.com/KhronosGroup/glslang/releases/download/master-tot/glslang-master-linux-Release.zip -OutFile glslang-master.zip
7z x glslang-master.zip
cd ..
$env:PATH += ":$env:APPVEYOR_BUILD_FOLDER/glslang/bin"
}
if($IsWindows) {
mkdir glslang
cd glslang
Invoke-WebRequest -Uri https://github.com/KhronosGroup/glslang/releases/download/master-tot/glslang-master-windows-x64-Release.zip -OutFile glslang-master.zip
7z x glslang-master.zip
cd ..
$env:PATH += ";$env:APPVEYOR_BUILD_FOLDER\glslang\bin"
}
if($IsMacOS) {
brew install glslang
}
before_build:
- ps: >-
git submodule -q update --init --recursive
mkdir build
if($IsWindows) {
$env:PATH += ";C:/msys64/mingw64/bin;C:/Qt/Tools/QtCreator/bin"
}
build_script:
- cmake --version
- cmd: if "%GENERATOR%" == "MinGW Makefiles" gcc --version
- cmd: if "%GENERATOR%" == "MinGW Makefiles" g++ --version
- cd Tests/tests
- cmd: if NOT "%VCVARSALL%" == "" call "%VCVARSALL%" %PLATFORM%
- cmd: cmake -H. -B../../build -G "%GENERATOR%" -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo -DCMAKE_SH=CMAKE_SH-NOTFOUND
- sh: cmake -H. -B../../build -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
- cmake --build ../../build --target TempestTests
test_script:
- ps: >-
if($IsWindows) {
$env:PATH += ";C:/msys64/mingw64/bin;C:/Qt/Tools/QtCreator/bin"
cd $env:APPVEYOR_BUILD_FOLDER\build\testsuite
# Download vulkan-1.dll
$VULKAN_RUNTIME_URL = "https://sdk.lunarg.com/sdk/download/$VK_SDK/windows/vulkan-runtime-components.zip?Human=true"
Start-FileDownload "$VULKAN_RUNTIME_URL" -FileName "vulkan-runtime.zip"
7z e "vulkan-runtime.zip" "*/x64"
if("Visual Studio 16 2019" -eq $env:GENERATOR) {
cp ".\Debug\TempestTests.exe" "TempestTests.exe";
cp ".\Debug\Tempest.dll" "Tempest.dll";
}
./TempestTests.exe
# $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
}
if($IsLinux) {
printenv
cd $env:APPVEYOR_BUILD_FOLDER/build/testsuite
./TempestTests
}
if($IsMacOS) {
printenv
cd $env:APPVEYOR_BUILD_FOLDER/build/testsuite
lldb -o run -o quit -- ./TempestTests
}
artifacts:
- path: build/tempest/tempest.zip
name: archive
deploy:
release: tempest-win32-v$(appveyor_build_version)
description: 'no release description'
provider: GitHub
auth_token:
secure: 9IgewrZL7gvgL+SofpEkJ6ERQDcsfVBHMUv5qhkj00wfELRiYVJtudQzPVDFE8cq
artifact: archive
draft: true
force_update: true
prerelease: true
on:
branch: master # release from master branch only
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
appveyor_repo_tag: true # deploy on tag push only