-
Notifications
You must be signed in to change notification settings - Fork 936
264 lines (214 loc) · 8.55 KB
/
openmw.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
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
name: CMake
on:
- push
- pull_request
env:
BUILD_TYPE: RelWithDebInfo
VCPKG_DEPS_TAG: 2024-11-10
jobs:
Ubuntu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Add OpenMW PPA Dependencies
run: sudo add-apt-repository ppa:openmw/openmw; sudo apt-get update
- name: Install Building Dependencies
run: sudo CI/install_debian_deps.sh gcc openmw-deps openmw-deps-dynamic
- name: Prime ccache
uses: hendrikmuhs/ccache-action@v1
with:
key: ${{ matrix.os }}-${{ env.BUILD_TYPE }}
max-size: 1000M
- name: Configure
run: >
cmake .
-D CMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-D OPENMW_USE_SYSTEM_RECASTNAVIGATION=ON
-D USE_SYSTEM_TINYXML=ON
-D BUILD_COMPONENTS_TESTS=ON
-D BUILD_OPENMW_TESTS=ON
-D BUILD_OPENCS_TESTS=ON
-D CMAKE_INSTALL_PREFIX=install
- name: Build
run: cmake --build . -- -j$(nproc)
- name: Run components tests
run: ./components-tests
- name: Run OpenMW tests
run: ./openmw-tests
- name: Run OpenMW-CS tests
run: ./openmw-cs-tests
# - name: Install
# shell: bash
# run: cmake --install .
# - name: Create Artifact
# shell: bash
# working-directory: install
# run: |
# ls -laR
# 7z a ../build_artifact.7z .
# - name: Upload Artifact
# uses: actions/upload-artifact@v1
# with:
# path: ./build_artifact.7z
# name: build_artifact.7z
MacOS:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Install Building Dependencies
run: CI/before_install.osx.sh
- name: Prime ccache
uses: hendrikmuhs/ccache-action@v1
with:
key: ${{ matrix.os }}-${{ env.BUILD_TYPE }}
max-size: 1000M
- name: Configure
run: CI/before_script.osx.sh
- name: Build
run: |
cd build
make -j $(sysctl -n hw.logicalcpu) package
Windows:
strategy:
fail-fast: true
matrix:
image:
- "2019"
- "2022"
name: windows-${{ matrix.image }}
runs-on: windows-${{ matrix.image }}
env:
archive: FAILEDTODOWNLOAD
steps:
- uses: actions/checkout@v2
- name: Create directories for dependencies
run: |
mkdir -p ${{ github.workspace }}/deps
mkdir -p ${{ github.workspace }}/deps/Qt
- name: Download prebuilt vcpkg packages
working-directory: ${{ github.workspace }}/deps
run: |
$MANIFEST = "vcpkg-x64-${{ matrix.image }}-${{ env.VCPKG_DEPS_TAG }}.txt"
curl --fail --retry 3 -L -o "$MANIFEST" "https://gitlab.com/OpenMW/openmw-deps/-/raw/main/windows/$MANIFEST"
$lines = Get-Content "$MANIFEST"
$URL = $lines[0]
$split = -split $lines[1]
$HASH = $split[0]
$FILE = $split[1]
curl --fail --retry 3 -L -o "$FILE" "$URL"
$filehash = Get-FileHash "$FILE" -Algorithm SHA512
if ( $filehash.hash -ne "$HASH" ) {
exit 1
}
echo "archive=$FILE" >> $env:GITHUB_ENV
- name: Extract archived prebuilt vcpkg packages
working-directory: ${{ github.workspace }}/deps
run: 7z x -y -ovcpkg-x64-${{ matrix.image }}-${{ env.VCPKG_DEPS_TAG }} ${{ env.archive }}
- name: Cache Qt
id: qt-cache
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/deps/Qt/6.6.3/msvc2019_64
key: qt-cache-6.6.3-msvc2019_64-v1
- name: Download aqt
if: steps.qt-cache.outputs.cache-hit != 'true'
working-directory: ${{ github.workspace }}/deps/Qt
run: >
curl --fail --retry 3 -L
-o aqt_x64.exe
https://github.com/miurahr/aqtinstall/releases/download/v3.1.15/aqt_x64.exe
- name: Install Qt with aqt
if: steps.qt-cache.outputs.cache-hit != 'true'
working-directory: ${{ github.workspace }}/deps/Qt
run: .\aqt_x64.exe install-qt windows desktop 6.6.3 win64_msvc2019_64
- uses: ilammy/msvc-dev-cmd@v1
- uses: seanmiddleditch/gha-setup-ninja@master
- name: Configure OpenMW
run: >
cmake
-S .
-B ${{ github.workspace }}/build
-G Ninja
-D CMAKE_BUILD_TYPE=RelWithDebInfo
-D CMAKE_TOOLCHAIN_FILE='${{ github.workspace }}/deps/vcpkg-x64-${{ matrix.image }}-${{ env.VCPKG_DEPS_TAG }}/scripts/buildsystems/vcpkg.cmake'
-D CMAKE_PREFIX_PATH='${{ github.workspace }}/deps/Qt/6.6.3/msvc2019_64'
-D LuaJit_INCLUDE_DIR='${{ github.workspace }}/deps/vcpkg-x64-${{ matrix.image }}-${{ env.VCPKG_DEPS_TAG }}/installed/x64-windows/include/luajit'
-D LuaJit_LIBRARY='${{ github.workspace }}/deps/vcpkg-x64-${{ matrix.image }}-${{ env.VCPKG_DEPS_TAG }}/installed/x64-windows/lib/lua51.lib'
-D BUILD_BENCHMARKS=ON
-D BUILD_COMPONENTS_TESTS=ON
-D BUILD_OPENMW_TESTS=ON
-D BUILD_OPENCS_TESTS=ON
-D OPENMW_USE_SYSTEM_SQLITE3=OFF
-D OPENMW_USE_SYSTEM_YAML_CPP=OFF
-D OPENMW_LTO_BUILD=ON
- name: Build OpenMW
run: cmake --build ${{ github.workspace }}/build
- name: Install OpenMW
run: cmake --install ${{ github.workspace }}/build --prefix ${{ github.workspace }}/install
- name: Copy missing DLLs
run: |
cp ${{ github.workspace }}/deps/vcpkg-x64-${{ matrix.image }}-${{ env.VCPKG_DEPS_TAG }}/installed/x64-windows/bin/Release/MyGUIEngine.dll ${{ github.workspace }}/install
cp -Filter *.dll -Recurse ${{ github.workspace }}/deps/vcpkg-x64-${{ matrix.image }}-${{ env.VCPKG_DEPS_TAG }}/installed/x64-windows/bin/osgPlugins-3.6.5 ${{ github.workspace }}/install
cp ${{ github.workspace }}/deps/vcpkg-x64-${{ matrix.image }}-${{ env.VCPKG_DEPS_TAG }}/installed/x64-windows/bin/*.dll ${{ github.workspace }}/install
- name: Copy Qt DLLs
working-directory: ${{ github.workspace }}/deps/Qt/6.6.3/msvc2019_64
run: |
cp bin/Qt6Core.dll ${{ github.workspace }}/install
cp bin/Qt6Gui.dll ${{ github.workspace }}/install
cp bin/Qt6Network.dll ${{ github.workspace }}/install
cp bin/Qt6OpenGL.dll ${{ github.workspace }}/install
cp bin/Qt6OpenGLWidgets.dll ${{ github.workspace }}/install
cp bin/Qt6Widgets.dll ${{ github.workspace }}/install
cp bin/Qt6Svg.dll ${{ github.workspace }}/install
mkdir ${{ github.workspace }}/install/styles
cp plugins/styles/qwindowsvistastyle.dll ${{ github.workspace }}/install/styles
mkdir ${{ github.workspace }}/install/platforms
cp plugins/platforms/qwindows.dll ${{ github.workspace }}/install/platforms
mkdir ${{ github.workspace }}/install/imageformats
cp plugins/imageformats/qsvg.dll ${{ github.workspace }}/install/imageformats
mkdir ${{ github.workspace }}/install/iconengines
cp plugins/iconengines/qsvgicon.dll ${{ github.workspace }}/install/iconengines
- name: Move pdb files
run: |
robocopy install pdb *.pdb /MOVE
if ($lastexitcode -lt 8) {
$global:LASTEXITCODE = $null
}
- name: Remove extra pdb files
shell: bash
run: |
rm -rf install/bin
rm -rf install/_deps
- name: Generate CI-ID.txt
shell: bash
env:
GH_TOKEN: ${{ github.token }}
run: |
job_url=$(gh run --repo ${{ github.repository }} view ${{ github.run_id }} --json jobs --jq '.jobs[] | select(.name == "windows-${{ matrix.image }}") | .url')
printf "Ref ${{ github.ref }}\nJob ${job_url}\nCommit ${{ github.sha }}\n" > install/CI-ID.txt
cp install/CI-ID.txt pdb/CI-ID.txt
- name: Store OpenMW archived pdb files
uses: actions/upload-artifact@v4
with:
name: openmw-windows-${{ matrix.image }}-pdb-${{ github.sha }}
path: ${{ github.workspace }}/pdb/*
- name: Store OpenMW build artifacts
uses: actions/upload-artifact@v4
with:
name: openmw-windows-${{ matrix.image }}-${{ github.sha }}
path: ${{ github.workspace }}/install/*
- name: Add install directory to PATH
shell: bash
run: echo '${{ github.workspace }}/install' >> ${GITHUB_PATH}
- name: Run components tests
run: build/components-tests.exe
- name: Run OpenMW tests
run: build/openmw-tests.exe
- name: Run OpenMW-CS tests
run: build/openmw-cs-tests.exe
- name: Run detournavigator navmeshtilescache benchmark
run: build/openmw_detournavigator_navmeshtilescache_benchmark.exe
- name: Run settings access benchmark
run: build/openmw_settings_access_benchmark.exe
- name: Run esm refid benchmark
run: build/openmw_esm_refid_benchmark.exe