forked from AttorneyOnline/AO2-Client
-
Notifications
You must be signed in to change notification settings - Fork 1
197 lines (171 loc) Β· 6.65 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
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
name: CI build
on: [push]
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
jobs:
build:
strategy:
fail-fast: false
matrix:
version:
- 5.15.2
platform:
- linux
- windows
include:
- platform: linux
os: ubuntu-latest
target: desktop
make: make
- platform: windows
os: windows-2019
target: desktop
make: nmake
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@master
with:
submodules: recursive
- uses: actions/setup-python@master
with:
python-version: '3.10'
- name: Add msbuild to PATH
if: matrix.platform == 'windows'
uses: microsoft/setup-msbuild@main
- name: Downgrade Android NDK
if: matrix.platform == 'android'
run: |
ANDROID_ROOT=/usr/local/lib/android
ANDROID_SDK_ROOT=${ANDROID_ROOT}/sdk
ANDROID_NDK_ROOT=${ANDROID_SDK_ROOT}/ndk-bundle
SDKMANAGER=${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager
echo "y" | $SDKMANAGER "ndk;21.4.7075529"
echo "y" | $SDKMANAGER "platforms;android-24"
# this is so stupid but i can't find anything else that works
rm -rf $ANDROID_HOME/ndk/25.2.9519653
ln -sf $ANDROID_HOME/ndk/21.4.7075529 $ANDROID_HOME/ndk/25.2.9519653
- uses: jurplel/install-qt-action@v3
id: qt
with:
version: ${{matrix.version}}
target: ${{matrix.target}}
arch: ${{matrix.arch}}
tools: ${{matrix.tools}}
cache: true
cache-key-prefix: qt
- name: Configure MSVC (Windows)
if: contains(matrix.platform, 'windows')
uses: ilammy/msvc-dev-cmd@v1
- name: Install QtApng
run: |
git clone https://github.com/Skycoder42/QtApng.git
cd QtApng
cd src/3rdparty
chmod +x get_libs.sh
./get_libs.sh 1.3.1 1.6.40
cd ../..
qmake CONFIG+=install_ok QMAKE_CXXFLAGS+="-fno-sized-deallocation" QT_PLATFORM=${{matrix.platform}}
${{matrix.make}}
${{matrix.make}} INSTALL_ROOT="${Qt5_DIR}" install
- name: Install Windows Discord RPC
if: contains(matrix.os, 'windows')
env:
ARCH: ${{ matrix.platform == 'windows' && '64' || '32'}}
shell: bash
run: |
curl -L https://github.com/discordapp/discord-rpc/releases/download/v3.4.0/discord-rpc-win.zip -o discord_rpc.zip
unzip discord_rpc.zip
cp ./discord-rpc/win${ARCH}-dynamic/lib/discord-rpc.lib ./lib/
cp ./discord-rpc/win${ARCH}-dynamic/bin/discord-rpc.dll ./bin/
cp ./discord-rpc/win${ARCH}-dynamic/include/discord*.h ./include/
- name: Install Linux Discord RPC
if: matrix.platform == 'linux'
run: |
curl -L https://github.com/discordapp/discord-rpc/releases/download/v3.4.0/discord-rpc-linux.zip -o discord_rpc.zip
unzip discord_rpc.zip
cp ./discord-rpc/linux-dynamic/lib/libdiscord-rpc.so ./lib/
cp ./discord-rpc/linux-dynamic/lib/libdiscord-rpc.so ./bin/
cp ./discord-rpc/linux-dynamic/include/discord*.h ./include/
- name: Install Windows BASS
if: contains(matrix.os, 'windows')
env:
ARCH: ${{ matrix.platform == 'windows' && '/x64/' || ''}}
shell: bash
run: |
curl http://www.un4seen.com/files/bass24.zip -o bass.zip
unzip -d bass -o bass.zip
cp ./bass/c/${ARCH}bass.lib ./lib/
cp ./bass/${ARCH}bass.dll ./bin/
curl http://www.un4seen.com/files/bassmidi24.zip -o bassmidi.zip
unzip -d bass -o bassmidi.zip
cp ./bass/c/${ARCH}bassmidi.lib ./lib/
cp ./bass/${ARCH}bassmidi.dll ./bin/
curl http://www.un4seen.com/files/bassopus24.zip -o bassopus.zip
unzip -d bass -o bassopus.zip
cp ./bass/c/${ARCH}bassopus.lib ./lib/
cp ./bass/${ARCH}bassopus.dll ./bin/
- name: Install Linux BASS
if: matrix.platform == 'linux'
run: |
curl http://www.un4seen.com/files/bass24-linux.zip -o bass.zip
unzip -d bass -o bass.zip
cp ./bass/libs/x86_64/libbass.so ./lib/
cp ./bass/libs/x86_64/libbass.so ./bin/
curl http://www.un4seen.com/files/bassmidi24-linux.zip -o bassmidi.zip
unzip -d bass -o bassmidi.zip
cp ./bass/libs/x86_64/libbassmidi.so ./lib/
cp ./bass/libs/x86_64/libbassmidi.so ./bin/
curl http://www.un4seen.com/files/bassopus24-linux.zip -o bassopus.zip
unzip -d bass -o bassopus.zip
cp ./bass/libs/x86_64/libbassopus.so ./lib/
cp ./bass/libs/x86_64/libbassopus.so ./bin/
- name: qmake
if: matrix.platform != 'android'
run: |
qmake QMAKE_CXXFLAGS+="-fno-sized-deallocation" DEFINES+=DISCORD CONFIG+=install_ok QT_PLATFORM=${{matrix.platform}}
- name: Copy libssl DLL (Windows)
if: contains(matrix.os, 'windows')
shell: bash
run: |
curl https://file.garden/ZVDWuDYwl0xAoRs4/libssl%203.4.1%20win32.zip -o libssl.zip
unzip -o libssl.zip -d ./bin/
- name: build
run: |
${{matrix.make}}
- name: Deploy Windows
if: contains(matrix.os, 'windows')
working-directory: ${{github.workspace}}/bin/
shell: bash
run: |
windeployqt --no-quick-import --no-translations --no-virtualkeyboard --no-compiler-runtime --no-webkit2 --no-opengl-sw .
cp ../QtApng/plugins/imageformats/qapng.dll ./imageformats/
rm ./imageformats/qtiff.dll
rm ./imageformats/qicns.dll
rm ./imageformats/qico.dll
rm ./imageformats/qsvg.dll
rm ./imageformats/qtga.dll
rm ./imageformats/qwbmp.dll
rm ./Qt5Svg.dll
rm -r iconengines
rm -r bearer
rm -r base
- name: Deploy Linux
if: matrix.platform == 'linux'
working-directory: ${{github.workspace}}/bin/
shell: bash
run: |
cp ../scripts/launch.sh .
mkdir -p imageformats
cp ../QtApng/plugins/imageformats/libqapng.so ./imageformats/libqapng.so
chmod +x launch.sh
chmod +x Attorney_Online
tar -cf Attorney_Online.tar ./*
rm -rf imageformats
rm *.so
rm *.sh
rm Attorney_Online
- name: Upload Artifact
uses: actions/upload-artifact@master
with:
name: Attorney_Online-${{matrix.os}}-${{matrix.platform}}
path: ${{github.workspace}}/bin/