-
Notifications
You must be signed in to change notification settings - Fork 82
/
appveyor.yml
163 lines (135 loc) · 5.14 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
configuration:
- release
environment:
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 # used as mingw
GENERATOR: "Ninja"
RELEASABLE: true
CC: C:/msys64/mingw64/bin/gcc.exe
CXX: C:/msys64/mingw64/bin/g++.exe
- APPVEYOR_BUILD_WORKER_IMAGE: macos-sonoma
GENERATOR: "Ninja"
RELEASABLE: true
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
GENERATOR: "Ninja"
RELEASABLE: false
VCVARSALL: "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Auxiliary/Build/vcvarsall.bat"
PLATFORM: x64
- APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu2004
GENERATOR: ""
RELEASABLE: true
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) {
# debug
# $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
# 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"
}
echo '#pragma once' | Out-File "game/build.h" -Encoding utf8
echo "static const char* appBuild = `"OpenGothic v$env:APPVEYOR_BUILD_VERSION`";" | Out-File "game/build.h" -Encoding utf8 -Append
build_script:
- cmake --version
- cmd: if NOT "%VCVARSALL%" == "" call "%VCVARSALL%" %PLATFORM%
- cmd: cmake -H. -Bbuild -G "%GENERATOR%" -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo -DCMAKE_SH=CMAKE_SH-NOTFOUND
- sh: cmake -H. -Bbuild -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo
- cmake --build ./build --target Gothic2Notr
after_build:
- ps: >-
cd build
cd opengothic
if($env:RELEASABLE) {
$BASE_NAME = 'opengothic'
} else {
$BASE_NAME = 'devbuild'
}
if($IsWindows) {
echo gothic-win64-v$env:APPVEYOR_BUILD_VERSION | Out-File "VERSION" -Encoding utf8
cp "C:\msys64\mingw64\bin\libgcc_s_seh-1.dll" "libgcc_s_seh-1.dll"
cp "C:\msys64\mingw64\bin\libstdc++-6.dll" "libstdc++-6.dll"
cp "C:\msys64\mingw64\bin\libwinpthread-1.dll" "libwinpthread-1.dll"
$NAME = $BASE_NAME + '_win.zip'
7z a $NAME VERSION
7z a $NAME -r "*.exe"
7z a $NAME -r "*.dll"
7z a $NAME -r "*.bat"
}
if($IsLinux) {
echo gothic-linux-v$env:APPVEYOR_BUILD_VERSION | Out-File "VERSION" -Encoding utf8
$NAME = $BASE_NAME + '_linux.zip'
7z a $NAME VERSION
7z a $NAME "*.so"
7z a $NAME "Gothic2Notr"
7z a $NAME "Gothic2Notr.sh"
}
if($IsMacOS) {
echo gothic-osx-v$env:APPVEYOR_BUILD_VERSION | Out-File "VERSION" -Encoding utf8
$NAME = $BASE_NAME + '_osx.zip'
7z a $NAME VERSION
7z a $NAME "*.dylib"
7z a $NAME "Gothic2Notr"
7z a $NAME "Gothic2Notr.sh"
}
artifacts:
- path: build/opengothic/opengothic_win.zip
name: archive_win
- path: build/opengothic/devbuild_win.zip
name: devbuild_win_vs2022
- path: build/opengothic/opengothic_linux.zip
name: archive_linux
- path: build/opengothic/opengothic_osx.zip
name: archive_osx
deploy:
release: opengothic-v${APPVEYOR_BUILD_VERSION}
description: 'no release description'
provider: GitHub
auth_token:
secure: YLdtUMsAcc8FUr3kgwhQW7nkl5jDpLKbelvzWzzTWUfAiDd92Kd15rjlDJVEEFzo
artifact: /archive.*/
draft: true
force_update: false
prerelease: true
tag: opengothic-v${APPVEYOR_BUILD_VERSION}
on:
appveyor_repo_tag: true # deploy on tag push only