-
Notifications
You must be signed in to change notification settings - Fork 4
132 lines (122 loc) · 3.74 KB
/
wine.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
name: Build Wine
on:
push:
permissions:
contents: read
env:
WINE_VERSION: 9.2
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 'Setup environment'
run: |
echo "WINE_ARCHIVE=${{ github.workspace }}/wine-vinegarhq-build-${{ env.WINE_VERSION }}.tar.xz" >> $GITHUB_ENV
echo "WINE_PREFIX=${{ github.workspace }}/wine-vinegarhq-build-${{ env.WINE_VERSION }}" >> $GITHUB_ENV
echo "PATH=/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" >> $GITHUB_ENV
sudo apt update -y
sudo apt install \
git \
build-essential \
curl \
mingw-w64 \
libasound2-dev \
libpulse-dev \
libdbus-1-dev \
libfontconfig-dev \
libfreetype-dev \
libgl-dev \
libunwind-dev \
libx11-dev \
libxcomposite-dev \
libxcursor-dev \
libxfixes-dev \
libxi-dev \
libxrandr-dev \
libxrender-dev \
libxext-dev \
libgstreamer1.0-dev \
libgstreamer-plugins-base1.0-dev \
libosmesa6-dev \
libudev-dev \
libvulkan-dev \
libkrb5-dev \
libusb-1.0-0-dev \
libv4l-dev \
libxkbcommon-dev \
libxkbregistry-dev \
libwayland-dev \
ccache
- name: 'Configure ccache'
uses: hendrikmuhs/ccache-action@v1.2
- name: 'Checkout Repository'
uses: actions/checkout@v3
- name: 'Fetch Wine'
run: |
git clone https://gitlab.winehq.org/wine/wine.git --depth 1 \
--branch wine-${{ env.WINE_VERSION }}
- name: 'Apply Wine Staging patchset'
run: |
git clone https://gitlab.winehq.org/wine/wine-staging.git --depth 1 \
--branch v${{ env.WINE_VERSION }}
wine-staging/staging/patchinstall.py --destdir=wine --all
- name: 'Apply local patches'
working-directory: wine
run: |
for p in ../*.patch; do
echo $p
patch -p1 < $p
done
- name: 'Configure Wine'
working-directory: wine
run: |
mkdir -p ${{ env.WINE_PREFIX }}
./configure \
CC='ccache gcc' \
x86_64_CC='ccache x86_64-w64-mingw32-gcc' \
CFLAGS='-O3 -pipe -march=x86-64-v2' \
CXXFLAGS='-O3 -pipe -march=x86-64-v2' \
--prefix=${{ env.WINE_PREFIX }} \
--enable-win64 \
--host=x86_64 \
--build=x86_64 \
--with-mingw=ccache x86_64-w64-mingw64-gcc \
--disable-win16 \
--disable-tests \
--with-alsa \
--with-pulse \
--with-dbus \
--with-fontconfig \
--with-freetype \
--with-opengl \
--with-wayland \
--with-x \
--with-xcomposite \
--with-xfixes \
--with-xinput2 \
--with-xrandr \
--with-xrender \
--with-gstreamer \
--with-vulkan \
--with-krb5 \
--with-usb \
--with-v4l2
- name: 'Build Wine'
working-directory: wine
run: make -j$(($(nproc) + 1))
- name: 'Install Wine'
working-directory: wine
run: make install LDCONFIG=/bin/true UPDATE_DESKTOP_DATABASE=/bin/true
- name: 'Strip Wine'
working-directory: ${{ env.WINE_PREFIX }}
run: |
x86_64-w64-mingw32-strip --strip-unneeded lib/wine/x86_64-windows/*.dll
- name: Make artifacts
run: |
cd $(dirname ${{ env.WINE_PREFIX }})
XZ_OPT=-9 tar -Jcf ${{ env.WINE_ARCHIVE }} $(basename ${{ env.WINE_PREFIX }})
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: wine-vinegarhq-build-${{ env.WINE_VERSION }}
path: ${{ env.WINE_ARCHIVE }}