-
Notifications
You must be signed in to change notification settings - Fork 23
75 lines (73 loc) · 2.51 KB
/
build.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
name: Build
on:
- push
- pull_request
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Fix broken github setup
# https://github.com/actions/runner-images/issues/4589
run: >
sudo dpkg -l |
awk '/ii lib.*deb.sury.org/ {gsub(/:.*/, s, $2); print $2}' |
xargs apt show -a |
awk '/Package:/ {p=$2} /APT-Sources: .*focal\/main/ {print p"/focal"}' |
sudo xargs eatmydata apt install --allow-downgrades
- name: Setup repositories
run: |
sudo dpkg --add-architecture i386
sudo wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key
sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/focal/winehq-focal.sources
sudo apt-get update -y
- name: Install dependencies
run: >
sudo apt-get install -y
gcc-multilib
meson
winehq-stable=6.0.0~focal-1
wine-stable=6.0.0~focal-1
wine-stable-amd64=6.0.0~focal-1
wine-stable-i386=6.0.0~focal-1
wine-stable-dev=6.0.0~focal-1
libdrm-dev
libdrm-dev:i386
libx11-xcb-dev
libx11-xcb-dev:i386
libxcb-present-dev
libxcb-present-dev:i386
libxcb-dri3-dev
libxcb-dri3-dev:i386
libxcb-dri2-0-dev
libxcb-dri2-0-dev:i386
libegl1-mesa-dev
libegl1-mesa-dev:i386
libgl1-mesa-dev
libgl1-mesa-dev:i386
libd3dadapter9-mesa-dev
libd3dadapter9-mesa-dev:i386
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup environment
run: >
if test "${GITHUB_REF:0:10}" = "refs/tags/"; then
echo "RELEASE_TARBALL=/tmp/gallium-nine-standalone-${GITHUB_REF:10}.tar.gz" >> $GITHUB_ENV
else
echo "RELEASE_TARBALL=/tmp/gallium-nine-standalone-${GITHUB_SHA:0:8}.tar.gz" >> $GITHUB_ENV
fi
- name: Compile
run: ./release.sh -o "${RELEASE_TARBALL}" -- -Ddri2=true -Ddistro-independent=true
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: build
path: ${{ env.RELEASE_TARBALL }}
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: ${{ env.RELEASE_TARBALL }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}