-
Notifications
You must be signed in to change notification settings - Fork 11
222 lines (216 loc) · 7.34 KB
/
release.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
name: release
on:
push:
env:
CACHE_VERSION: 5
DEBIAN_FRONTEND: noninteractive
PAWPAW_SKIP_LTO: 1
jobs:
# macOS native intel build
macos:
runs-on: macos-10.15
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up cache
uses: actions/cache@v3
id: cache
with:
path: |
~/PawPawBuilds
key: macos-v${{ env.CACHE_VERSION }}
- name: Set up dependencies
run: |
brew install cmake jq meson
- name: Bootstrap macOS intel
shell: bash
run: |
./PawPaw/bootstrap-jack2.sh macos && ./PawPaw/bootstrap-qt.sh macos && ./PawPaw/.cleanup.sh macos
- name: Build macOS intel
shell: bash
if: steps.cache.outputs.cache-hit == 'true'
run: |
./pack-jack2-version.sh macos
- name: Set sha8
id: slug
run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
- uses: actions/upload-artifact@v3
with:
name: jack2-macOS-intel-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
path: PawPaw/jack2-macOS-*.tar.gz
- uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
draft: false
prerelease: false
files: |
path: PawPaw/jack2-macOS-*.tar.gz
# macOS native universal build
macos_universal:
runs-on: macos-10.15
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up cache
uses: actions/cache@v3
id: cache
with:
path: |
~/PawPawBuilds
key: macos-universal-v${{ env.CACHE_VERSION }}
- name: Set up dependencies
run: |
brew install cmake jq meson
- name: Fix up Xcode
run: |
sudo rm -Rf /Library/Developer/CommandLineTools/SDKs/*
sudo xcode-select -s "/Applications/Xcode_12.3.app"
- name: Bootstrap macOS universal
shell: bash
run: |
./PawPaw/bootstrap-jack2.sh macos-universal && ./PawPaw/bootstrap-qt.sh macos-universal && ./PawPaw/.cleanup.sh macos-universal
- name: Build macOS universal
shell: bash
if: steps.cache.outputs.cache-hit == 'true'
run: |
./pack-jack2-version.sh macos-universal
- name: Set sha8
id: slug
run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
- uses: actions/upload-artifact@v3
with:
name: jack2-macOS-universal-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
path: PawPaw/jack2-macOS-*.tar.gz
- uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
draft: false
prerelease: false
files: |
path: PawPaw/jack2-macOS-*.tar.gz
# linux with win32 cross-compilation
win32:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up cache
uses: actions/cache@v3
id: cache
with:
path: |
~/PawPawBuilds
key: win32-v${{ env.CACHE_VERSION }}
- name: Restore debian packages cache
run: |
if [ -d ~/PawPawBuilds/debs ] && [ "$(ls ~/PawPawBuilds/debs | wc -l)" -ne 0 ]; then \
sudo cp ~/PawPawBuilds/debs/*.deb /var/cache/apt/archives/; \
fi
- name: Fix GitHub's mess
run: |
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get update -qq
sudo apt-get install -yqq --allow-downgrades libgd3/jammy
sudo apt-get purge -yqq libmono* moby* mono* msbuild* php* libgdiplus libpcre2-posix3 nuget
- name: Set up dependencies
run: |
sudo dpkg --add-architecture i386
sudo apt-get update -qq
sudo apt-get install -y autopoint build-essential curl cmake jq llvm meson mingw-w64 qttools5-dev qttools5-dev-tools xvfb \
binutils-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64 wine-stable:i386
- name: Cache debian packages
run: |
mkdir -p ~/PawPawBuilds/debs
sudo mv /var/cache/apt/archives/*.deb ~/PawPawBuilds/debs/
- name: Bootstrap win32 cross-compiled
shell: bash
run: |
./PawPaw/bootstrap-jack2.sh win32 && ./PawPaw/bootstrap-qt.sh win32 && ./PawPaw/.cleanup.sh win32
- name: Build win32 cross-compiled
shell: bash
if: steps.cache.outputs.cache-hit == 'true'
run: |
xvfb-run ./pack-jack2-version.sh win32
- name: Set sha8
id: slug
run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
- uses: actions/upload-artifact@v3
with:
name: jack2-win32-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
path: PawPaw/jack2-win*.exe
- uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
draft: false
prerelease: false
files: |
path: PawPaw/jack2-win*.exe
# linux with win64 cross-compilation
win64:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up cache
uses: actions/cache@v3
id: cache
with:
path: |
~/PawPawBuilds
key: win64-v${{ env.CACHE_VERSION }}
- name: Restore debian packages cache
run: |
if [ -d ~/PawPawBuilds/debs ] && [ "$(ls ~/PawPawBuilds/debs | wc -l)" -ne 0 ]; then \
sudo cp ~/PawPawBuilds/debs/*.deb /var/cache/apt/archives/; \
fi
- name: Fix GitHub's mess
run: |
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get update -qq
sudo apt-get install -yqq --allow-downgrades libgd3/jammy
sudo apt-get purge -yqq libmono* moby* mono* msbuild* php* libgdiplus libpcre2-posix3 nuget
- name: Set up dependencies
run: |
sudo dpkg --add-architecture i386
sudo apt-get update -qq
sudo apt-get install -y autopoint build-essential curl cmake jq llvm meson mingw-w64 qttools5-dev qttools5-dev-tools xvfb \
binutils-mingw-w64-x86-64 g++-mingw-w64-x86-64 mingw-w64 wine-stable
- name: Cache debian packages
run: |
mkdir -p ~/PawPawBuilds/debs
sudo mv /var/cache/apt/archives/*.deb ~/PawPawBuilds/debs/
- name: Bootstrap win64 cross-compiled
shell: bash
run: |
./PawPaw/bootstrap-jack2.sh win64 && ./PawPaw/bootstrap-qt.sh win64 && ./PawPaw/.cleanup.sh win64
- name: Build win64 cross-compiled
shell: bash
if: steps.cache.outputs.cache-hit == 'true'
run: |
xvfb-run ./pack-jack2-version.sh win64
- name: Set sha8
id: slug
run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
- uses: actions/upload-artifact@v3
with:
name: jack2-win64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
path: PawPaw/jack2-win*.exe
- uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
draft: false
prerelease: false
files: |
path: PawPaw/jack2-win*.exe