-
Notifications
You must be signed in to change notification settings - Fork 8
127 lines (122 loc) · 4.55 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
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
name: build
on: [push, pull_request]
env:
CACHE_VERSION: 3
PAWPAW_SKIP_LTO: 1
jobs:
linux-x86_64:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up cache
id: cache
uses: actions/cache@v3
with:
path: |
~/PawPawBuilds
key: linux-x86_64-v${{ env.CACHE_VERSION }}
- name: Set sha8
run: |
echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV
- name: Set up dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -yqq --allow-downgrades gperf libasound2-dev libdbus-1-dev libgl1-mesa-dev libglib2.0-dev libpcre3-dev libqt5svg5-dev libxcb1-dev libxcursor-dev libxext-dev libxfixes-dev libxrandr-dev libxrender-dev meson uuid-dev
- name: Build dependencies
run: |
./PawPaw/bootstrap-mod.sh linux-x86_64 && ./PawPaw/.cleanup.sh linux-x86_64
- name: Build
if: steps.cache.outputs.cache-hit == 'true'
run: |
make PAWPAW_TARGET=linux-x86_64
- name: Pack
if: steps.cache.outputs.cache-hit == 'true'
run: |
mkdir mod-app-${{ github.event.pull_request.number || env.SHA8 }}-linux-x86_64
mv build mod-app-${{ github.event.pull_request.number || env.SHA8 }}-linux-x86_64/mod-app
cp utils/mod-app.desktop utils/mod-app.run mod-app-${{ github.event.pull_request.number || env.SHA8 }}-linux-x86_64/
tar chJf mod-app-${{ github.event.pull_request.number || env.SHA8 }}-linux-x86_64.tar.xz mod-app-${{ github.event.pull_request.number || env.SHA8 }}-linux-x86_64
- uses: actions/upload-artifact@v3
with:
name: ${{ github.event.repository.name }}-win64-${{ github.event.pull_request.number || env.SHA8 }}
path: |
*.tar.xz
macos:
runs-on: macos-11
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up cache
id: cache
uses: actions/cache@v3
with:
path: |
~/PawPawBuilds
key: macos-v${{ env.CACHE_VERSION }}
- name: Set sha8
run: |
echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV
- name: Set up dependencies
run: |
brew install autoconf automake cmake gnu-sed make meson
- name: Build dependencies
run: |
./PawPaw/bootstrap-mod.sh macos-universal-10.15 && ./PawPaw/.cleanup.sh macos-universal-10.15
- name: Build
if: steps.cache.outputs.cache-hit == 'true'
run: |
make PAWPAW_TARGET=macos-universal-10.15
- name: Pack
if: steps.cache.outputs.cache-hit == 'true'
run: |
./utils/macos-dmg.sh
mv mod-app-*.dmg mod-app-${{ github.event.pull_request.number || env.SHA8 }}-macOS.dmg
- uses: actions/upload-artifact@v3
with:
name: ${{ github.event.repository.name }}-macOS-${{ github.event.pull_request.number || env.SHA8 }}
path: |
*.dmg
windows:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up cache
id: cache
uses: actions/cache@v3
with:
path: |
~/PawPawBuilds
key: win64-v${{ env.CACHE_VERSION }}
- name: Set sha8
run: |
echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV
- name: Fix GitHub's mess
run: |
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
sudo dpkg --add-architecture i386
sudo apt-get update -qq
- name: Set up dependencies
run: |
sudo apt-get install -yqq --allow-downgrades autopoint binutils-mingw-w64-x86-64 libc6:i386 libgcc-s1:i386 libstdc++6:i386 g++-mingw-w64-x86-64 gperf meson mingw-w64 wine-stable xvfb
- name: Build dependencies
run: |
./PawPaw/bootstrap-mod.sh win64 && ./PawPaw/.cleanup.sh win64
- name: Build
if: steps.cache.outputs.cache-hit == 'true'
run: |
make PAWPAW_TARGET=win64
- name: Pack
if: steps.cache.outputs.cache-hit == 'true'
run: |
xvfb-run ./utils/win64-installer.sh
mv mod-app-*.exe mod-app-${{ github.event.pull_request.number || env.SHA8 }}-win64.exe
- uses: actions/upload-artifact@v3
with:
name: ${{ github.event.repository.name }}-win64-${{ github.event.pull_request.number || env.SHA8 }}
path: |
*.exe