forked from GabLeRoux/macos-crossover-wine-cloud-builder
-
Notifications
You must be signed in to change notification settings - Fork 0
293 lines (239 loc) · 10.2 KB
/
build_monolithic.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
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
name: Wine-Crossover-MacOS
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
env:
# avoid weird linker errors with Xcode 10 and later
MACOSX_DEPLOYMENT_TARGET: 10.14
# directories / files inside the downloaded tar file directory structure
WINE_CONFIGURE: ${{ github.workspace }}/sources/wine/configure
DXVK_BUILDSCRIPT: ${{ github.workspace }}/sources/dxvk/package-release.sh
# build directories
BUILDROOT: ${{ github.workspace }}/build
LLVM_BUILDDIR: ${{ github.workspace }}/build/llvm
CLANG_BUILDDIR: ${{ github.workspace }}/build/clang
# target directory for installation
INSTALLROOT: ${{ github.workspace }}/install
TOOLS_INSTALLATION: build-tools-cx
jobs:
llvm-clang:
runs-on: macos-10.15
env:
# crossover source code to be downloaded
CROSS_OVER_SOURCE_URL: https://media.codeweavers.com/pub/crossover/source/crossover-sources-21.1.0.tar.gz
CROSS_OVER_LOCAL_FILE: crossover-21.1.0
steps:
- name: Checkout
uses: actions/checkout@v2
############ Restore LLVM / Clang from cache ##############
- name: Restore LLVM / Clang from cache
uses: actions/cache@v2
id: cache_llvm_clang
with:
path: ${{ env.INSTALLROOT }}/${{ env.TOOLS_INSTALLATION }}
key: llvm_clang
############ Build LLVM / Clang (if restore from cache failed) ##############
- name: Get and Extract Source
if: steps.cache_llvm_clang.outputs.cache-hit != 'true'
run: |
curl -o ${{ env.CROSS_OVER_LOCAL_FILE }}.tar.gz ${{ env.CROSS_OVER_SOURCE_URL }}
tar xf ${{ env.CROSS_OVER_LOCAL_FILE }}.tar.gz
- name: Build / Install LLVM and Clang (if restore from cache failed)
if: steps.cache_llvm_clang.outputs.cache-hit != 'true'
uses: ./.github/actions/build_llvm_clang
with:
install-prefix: ${{ env.INSTALLROOT }}/${{ env.TOOLS_INSTALLATION }}
llvm-makedir: ${{ github.workspace }}/sources/clang/llvm
clang-makedir: ${{ github.workspace }}/sources/clang/clang
############ Upload LLVM / Clang to be used in subsequent job steps ##############
- name: Tar Build Tools
run: |
set -x
pushd ${{ env.INSTALLROOT }}
tar -czf ${{ env.TOOLS_INSTALLATION }}.tar.gz ${{ env.TOOLS_INSTALLATION }}
ls -alt
popd
- name: Upload Build Tools
uses: actions/upload-artifact@v2
with:
name: ${{ env.TOOLS_INSTALLATION }}
path: ${{ env.INSTALLROOT }}/${{ env.TOOLS_INSTALLATION }}.tar.gz
wine-crossover:
needs: llvm-clang
strategy:
fail-fast: false
matrix:
CROSS_OVER_VERSION: [21.1.0, 20.0.4, 19.0.2] # 21.0.0, 20.0.2, 20.0.1, 20.0.0
runs-on: macos-10.15
env:
# crossover source code to be downloaded
CROSS_OVER_SOURCE_URL: https://media.codeweavers.com/pub/crossover/source/crossover-sources-${{ matrix.CROSS_OVER_VERSION }}.tar.gz
CROSS_OVER_LOCAL_FILE: crossover-${{ matrix.CROSS_OVER_VERSION }}
# artifact names
WINE_INSTALLATION: wine-cx${{ matrix.CROSS_OVER_VERSION }}
DXVK_INSTALLATION: dxvk-cx${{ matrix.CROSS_OVER_VERSION }}
steps:
############ Prepare Workspace / Environment ##############
- name: Checkout
uses: actions/checkout@v2
- name: Install Wine Dependencies
run: |
brew install freetype \
bison \
krb5 \
faudio \
sdl2 \
gphoto2 \
sane-backends \
gst-plugins-base \
mpg123 \
little-cms2 \
libpng \
mingw-w64 \
molten-vk
- name: Add bison & krb5 to $PATH
run: |
set -x
echo "$(brew --prefix bison)/bin" >> $GITHUB_PATH
echo "$(brew --prefix krb5)/bin" >> $GITHUB_PATH
- name: Download llvm/clang (from previous job)
uses: actions/download-artifact@v2
with:
name: ${{ env.TOOLS_INSTALLATION }}
path: ${{ env.INSTALLROOT }}
- name: Unpack llvm/clang
run: |
set -x
pushd ${{ env.INSTALLROOT }}
ls -al
tar -xvf ${{ env.TOOLS_INSTALLATION }}.tar.gz
ls -alt
popd
- name: Add llvm/clang to $PATH
run: |
set -x
echo "${{ env.INSTALLROOT }}/${{ env.TOOLS_INSTALLATION }}/bin" >> $GITHUB_PATH
############ Download and Prepare Source Code ##############
- name: Get Source
run: |
curl -o ${{ env.CROSS_OVER_LOCAL_FILE }}.tar.gz ${{ env.CROSS_OVER_SOURCE_URL }}
- name: Extract Source
run: |
tar xf ${{ env.CROSS_OVER_LOCAL_FILE }}.tar.gz
- name: Patch Add missing distversion.h
# Patch provided by Josh Dubois, CrossOver product manager, CodeWeavers.
run: |
pushd sources/wine
patch -p1 < ${{ github.workspace }}/distversion.patch
popd
- name: Patch ntdll/wcstring.c to prevent crash if a nullptr is supplied to the function
# Hack by dasmy
if: startsWith(matrix.CROSS_OVER_VERSION, '20')
run: |
pushd sources/wine
patch -p1 < ${{ github.workspace }}/wcstring.patch
popd
- name: Patch msvcrt to export the missing sincos function
# https://github.com/wine-mirror/wine/commit/f0131276474997b9d4e593bbf8c5616b879d3bd5
if: startsWith(matrix.CROSS_OVER_VERSION, '20')
run: |
pushd sources/wine
patch -p1 < ${{ github.workspace }}/msvcrt-sincos.patch
popd
- name: Patch DXVK
if: startsWith(matrix.CROSS_OVER_VERSION, '20')
run: patch sources/dxvk/src/util/rc/util_rc_ptr.h < dxvk_util_rc_ptr.patch
############ Build DXVK ##############
#- name: Install Dependencies for DXVK
# run: |
# brew install coreutils \
# meson \
# glslang
#- name: Build DXVK
# if: startsWith(matrix.CROSS_OVER_VERSION, '20')
# run: |
# set -x
# PATH="$(brew --prefix coreutils)/libexec/gnubin:${PATH}" ${{ env.DXVK_BUILDSCRIPT }} master ${{ env.INSTALLROOT }}/${{ env.DXVK_INSTALLATION }} --no-package
#- name: Tar DXVK
# if: startsWith(matrix.CROSS_OVER_VERSION, '20')
# run: |
# set -x
# pushd ${{ env.INSTALLROOT }}
# tar -czf ${{ env.DXVK_INSTALLATION }}.tar.gz ${{ env.DXVK_INSTALLATION }}
# popd
#- name: Upload DXVK
# if: startsWith(matrix.CROSS_OVER_VERSION, '20')
# uses: actions/upload-artifact@v2
# with:
# name: ${{ env.DXVK_INSTALLATION }}
# path: ${{ env.INSTALLROOT }}/${{ env.DXVK_INSTALLATION }}.tar.gz
############ Configure 64bit Version ##############
- name: Configure wine64 (specific to 2x)
if: startsWith(matrix.CROSS_OVER_VERSION, '2')
uses: ./.github/actions/configure_wine
with:
winearch: "wine64"
build-dir: "${{ env.BUILDROOT }}/wine64"
crossflags: "-g -O2"
configure-params: "--enable-win64 --with-vulkan"
- name: Configure wine64 (specific to 19)
if: startsWith(matrix.CROSS_OVER_VERSION, '19')
uses: ./.github/actions/configure_wine
with:
winearch: "wine64"
build-dir: "${{ env.BUILDROOT }}/wine64"
crossflags: "-g -O2 -fcommon"
configure-params: "--enable-win64 --with-vulkan"
############ Build 64bit Version ##############
- name: Build wine64
uses: ./.github/actions/make
with:
build-dir: "${{ env.BUILDROOT }}/wine64"
############ Configure 32on64bit Version ##############
- name: Configure wine32on64 (specific to 2x)
if: startsWith(matrix.CROSS_OVER_VERSION, '2')
uses: ./.github/actions/configure_wine
with:
winearch: "wine32on64"
build-dir: "${{ env.BUILDROOT }}/wine32on64"
crossflags: "-g -O2"
configure-params: "--enable-win32on64 --with-wine64=${{ env.BUILDROOT }}/wine64 --without-cms --without-gstreamer --without-gphoto --without-sane --without-krb5 --disable-winedbg --without-vkd3d --without-vulkan --disable-vulkan_1 --disable-winevulkan"
- name: Configure wine32on64 (specific to 19)
if: startsWith(matrix.CROSS_OVER_VERSION, '19')
uses: ./.github/actions/configure_wine
with:
winearch: "wine32on64"
build-dir: "${{ env.BUILDROOT }}/wine32on64"
crossflags: "-g -O2 -fcommon"
configure-params: "--enable-win32on64 --with-wine64=${{ env.BUILDROOT }}/wine64 --without-cms --without-gstreamer --without-gphoto --without-sane --without-krb5 --disable-winedbg --without-vkd3d --without-vulkan --disable-vulkan_1 --disable-winevulkan"
############ Build 32on64bit Version ##############
- name: Build wine32on64
uses: ./.github/actions/make
with:
build-dir: "${{ env.BUILDROOT }}/wine32on64"
############ Install wine ##############
- name: Install wine32on64
uses: ./.github/actions/install
with:
build-dir: "${{ env.BUILDROOT }}/wine32on64"
install-dir: "${{ env.INSTALLROOT }}/${{ env.WINE_INSTALLATION }}"
- name: Install wine64
uses: ./.github/actions/install
with:
build-dir: "${{ env.BUILDROOT }}/wine64"
install-dir: "${{ env.INSTALLROOT }}/${{ env.WINE_INSTALLATION }}"
############ Bundle and Upload Deliverable ##############
- name: Tar Wine
run: |
set -x
pushd ${{ env.INSTALLROOT }}
tar -czvf ${{ env.WINE_INSTALLATION }}.tar.gz ${{ env.WINE_INSTALLATION }}
popd
- name: Upload Wine
uses: actions/upload-artifact@v2
with:
name: ${{ env.WINE_INSTALLATION }}
path: ${{ env.INSTALLROOT }}/${{ env.WINE_INSTALLATION }}.tar.gz