forked from Try/OpenGothic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
146 lines (120 loc) · 4.78 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
configuration:
- release
environment:
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: macos-bigsur
GENERATOR: "Ninja"
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
GENERATOR: "Visual Studio 16 2019"
VCVARSALL: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Auxiliary/Build/vcvarsall.bat"
PLATFORM: x64
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 # used as mingw
GENERATOR: "Ninja"
CC: C:/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/gcc.exe
CXX: C:/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/g++.exe
- APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu2004
GENERATOR: ""
install:
- ps: >-
$VK_SDK = '1.2.170.0'
if($IsLinux) {
sudo apt-get update
sudo apt-get --yes install libvulkan-dev libasound2-dev libx11-dev libxcursor-dev
# Vulkan SDK
$env:VK_SDK_PATH = "$env:APPVEYOR_BUILD_FOLDER/VulkanSDK/$VK_SDK/x86_64"
$env:VK_LAYER_PATH = "$env:VK_SDK_PATH/etc/vulkan/explicit_layers.d"
$env:LD_LIBRARY_PATH = "$env:VK_SDK_PATH/lib"
Invoke-WebRequest -Uri https://sdk.lunarg.com/sdk/download/$VK_SDK/linux/vulkan_sdk.tar.gz -OutFile VulkanSDK.tar.gz
mkdir VulkanSDK
tar -xzf VulkanSDK.tar.gz -C ./VulkanSDK
}
if($IsWindows) {
# Vulkan SDK
$env:VK_SDK_PATH = "C:/VulkanSDK/$VK_SDK"
Invoke-WebRequest -Uri https://sdk.lunarg.com/sdk/download/$VK_SDK/windows/vulkan_sdk.exe -OutFile VulkanSDK.exe
./VulkanSDK.exe /S
}
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:/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/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($IsWindows) {
echo gothic-win64-v$env:appveyor_build_version | Out-File "VERSION" -Encoding utf8
cp "C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin\libgcc_s_seh-1.dll" "libgcc_s_seh-1.dll"
cp "C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin\libstdc++-6.dll" "libstdc++-6.dll"
cp "C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin\libwinpthread-1.dll" "libwinpthread-1.dll"
$NAME = 'opengothic_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 = 'opengothic_linux.zip'
7z a $NAME VERSION
7z a $NAME "*"
7z a $NAME "*"
7z a $NAME "Gothic2Notr.sh"
}
if($IsMacOS) {
echo gothic-osx-v$env:appveyor_build_version | Out-File "VERSION" -Encoding utf8
$NAME = 'opengothic_osx.zip'
7z a $NAME VERSION
7z a $NAME "*"
7z a $NAME "*"
7z a $NAME "Gothic2Notr.sh"
}
artifacts:
- path: build/opengothic/opengothic_win.zip
name: archive
deploy:
release: gothic-win64-v$(appveyor_build_version)
description: 'no release description'
provider: GitHub
auth_token:
secure: YLdtUMsAcc8FUr3kgwhQW7nkl5jDpLKbelvzWzzTWUfAiDd92Kd15rjlDJVEEFzo
artifact: archive
draft: true
force_update: false
prerelease: true
tag: gothic-win64-v$(appveyor_build_version)
on:
branch: $(APPVEYOR_REPO_TAG_NAME)
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 # mingw is default for now
appveyor_repo_tag: true # deploy on tag push only