-
-
Notifications
You must be signed in to change notification settings - Fork 1
250 lines (218 loc) · 8.24 KB
/
ci.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
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
on: push
jobs:
win64:
runs-on: ubuntu-22.04
env:
makeOptions: -j4
makeVariables: local=false build=performance platform=windows arch=x86_64
#nightly: bsnes-as-win64-${{github.run_number}}
nightly: bsnes-as-win64
buildVersion: ${{github.run_id}}
platformOptions: platform=windows compiler="x86_64-w64-mingw32-g++-posix" windres="x86_64-w64-mingw32-windres"
steps:
- run: |
echo 'win64'
set -e
sudo apt-get update
sudo apt-get -qq install -y --no-install-recommends ca-certificates make g++-mingw-w64-x86-64
shell: bash
name: 'setup'
- uses: actions/checkout@v4
name: Checkout
with:
fetch-depth: 0
- run: |
echo '#define BSNES_BUILD_NUMBER "'"${{env.buildVersion}}"'"' > bsnes/emulator/version.generated.hpp
make ${{env.makeOptions}} -C bsnes target=bsnes ${{env.makeVariables}} ${{env.platformOptions}}
shell: bash
name: 'make bsnes'
# - run: |
# rm -f bsnes/obj/sfc-*.o bsnes/obj/core.o bsnes/obj/emulator.o || true
# make ${{env.makeOptions}} -C bsnes target=libretro ${{env.makeVariables}} ${{env.platformOptions}} || true
# shell: bash
# name: 'make libretro'
- run: |
mkdir ${{env.nightly}}
mkdir ${{env.nightly}}/Database
mkdir ${{env.nightly}}/Firmware
cp -a bsnes/out/bsnes.exe ${{env.nightly}}/bsnes.exe
#cp -a bsnes/out/bsnes_libretro.dll ${{env.nightly}}/ || true
cp -a bsnes/out/discord_game_sdk.dll ${{env.nightly}}/
cp -a bsnes/Database/* ${{env.nightly}}/Database
cp -a shaders ${{env.nightly}}/Shaders
cp -a scripts ${{env.nightly}}/scripts
cp -a GPLv3.txt ${{env.nightly}}
shell: bash
name: 'package'
- run: Compress-Archive -Path ${{env.nightly}}/* -Destination ${{env.nightly}}.zip
shell: pwsh
name: 'archive'
- uses: actions/upload-artifact@v4
with:
name: '${{env.nightly}}.zip'
path: '${{env.nightly}}.zip'
- name: release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: '${{env.nightly}}.zip'
# NOTE: disabled due to compilation failures with angelscript/source/as_callfunc_x86.cpp
# win32:
# runs-on: ubuntu-22.04
#
# env:
# makeOptions: -j4
# makeVariables: local=false build=performance
# nightly: bsnes-as-win32-${{github.run_number}}
# buildVersion: ${{github.run_id}}
# platformOptions: platform=windows arch=x86 compiler="i686-w64-mingw32-g++-posix" windres="i686-w64-mingw32-windres"
#
# steps:
# - run: |
# echo 'win64'
# set -e
# sudo apt-get update
# sudo apt-get -qq install -y --no-install-recommends ca-certificates make g++-mingw-w64-i686
# shell: bash
# name: 'setup'
#
# - uses: actions/checkout@v4
# name: Checkout
# with:
# fetch-depth: 0
#
# - run: |
# echo '#define BSNES_BUILD_NUMBER "'"${{env.buildVersion}}"'"' > bsnes/emulator/version.generated.hpp
# make ${{env.makeOptions}} -C bsnes target=bsnes ${{env.makeVariables}} ${{env.platformOptions}}
# shell: bash
# name: 'make bsnes'
#
# - run: |
# rm -f bsnes/obj/sfc-*.o bsnes/obj/core.o bsnes/obj/emulator.o || true
# make ${{env.makeOptions}} -C bsnes target=libretro ${{env.makeVariables}} ${{env.platformOptions}} || true
# shell: bash
# name: 'make libretro'
#
# - run: |
# mkdir ${{env.nightly}}
# mkdir ${{env.nightly}}/Database
# mkdir ${{env.nightly}}/Firmware
# cp -a bsnes/out/bsnes.exe ${{env.nightly}}/bsnes.exe
# cp -a bsnes/out/bsnes_libretro.dll ${{env.nightly}}/ || true
# cp -a bsnes/out/discord_game_sdk.dll ${{env.nightly}}/
# cp -a bsnes/Database/* ${{env.nightly}}/Database
# cp -a shaders ${{env.nightly}}/Shaders
# cp -a scripts ${{env.nightly}}/scripts
# cp -a GPLv3.txt ${{env.nightly}}
# shell: bash
# name: 'package'
#
# - uses: actions/upload-artifact@v4
# with:
# name: '${{env.nightly}}'
# path: '${{env.nightly}}'
macos:
runs-on: macos-14
env:
makeOptions: -j12
makeVariables: local=false build=performance platform=macos arch=arm64
#nightly: bsnes-as-macos-${{github.run_number}}
nightly: bsnes-as-macos
buildVersion: ${{github.run_id}}
platformOptions:
steps:
- run: |
echo 'macos'
shell: bash
name: 'setup'
- uses: actions/checkout@v4
name: Checkout
with:
fetch-depth: 0
- run: |
echo '#define BSNES_BUILD_NUMBER "'"${{env.buildVersion}}"'"' > bsnes/emulator/version.generated.hpp
make ${{env.makeOptions}} -C bsnes target=bsnes ${{env.makeVariables}} ${{env.platformOptions}}
shell: bash
name: 'make bsnes'
# - run: |
# rm -f bsnes/obj/sfc-*.o bsnes/obj/core.o bsnes/obj/emulator.o || true
# make ${{env.makeOptions}} -C bsnes target=libretro ${{env.makeVariables}} ${{env.platformOptions}} || true
# shell: bash
# name: 'make libretro'
- run: |
mkdir ${{env.nightly}}
cp -a bsnes/out/bsnes.app ${{env.nightly}}/
#cp -a bsnes/out/bsnes_libretro.dylib ${{env.nightly}}/ || true
cp -a scripts ${{env.nightly}}/scripts
cp -a GPLv3.txt ${{env.nightly}}/
shell: bash
name: 'package'
- run: tar cJf ${{env.nightly}}.tar.xz ${{env.nightly}}/*
shell: bash
name: 'archive'
- uses: actions/upload-artifact@v4
with:
name: '${{env.nightly}}.tar.xz'
path: '${{env.nightly}}.tar.xz'
- name: release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: '${{env.nightly}}.tar.xz'
linux:
runs-on: ubuntu-22.04
env:
makeOptions: -j4
makeVariables: local=false build=performance platform=linux arch=x86_64
#nightly: bsnes-as-linux-${{github.run_number}}
nightly: bsnes-as-linux
buildVersion: ${{github.run_id}}
platformOptions:
steps:
- run: |
echo 'linux'
set -e
sudo apt-get update
# libgtksourceview2.0-dev
sudo apt-get -y install --no-upgrade --no-install-recommends build-essential libgtk2.0-dev libpulse-dev mesa-common-dev libcairo2-dev libsdl2-dev libxv-dev libao-dev libopenal-dev libudev-dev
shell: bash
name: 'setup'
- uses: actions/checkout@v4
name: Checkout
with:
fetch-depth: 0
- run: |
echo '#define BSNES_BUILD_NUMBER "'"${{env.buildVersion}}"'"' > bsnes/emulator/version.generated.hpp
make ${{env.makeOptions}} -C bsnes target=bsnes ${{env.makeVariables}} ${{env.platformOptions}}
shell: bash
name: 'make bsnes'
# - run: |
# rm -f bsnes/obj/sfc-*.o bsnes/obj/core.o bsnes/obj/emulator.o || true
# make ${{env.makeOptions}} -C bsnes target=libretro ${{env.makeVariables}} ${{env.platformOptions}} || true
# shell: bash
# name: 'make libretro'
- run: |
mkdir ${{env.nightly}}
mkdir ${{env.nightly}}/Database
mkdir ${{env.nightly}}/Firmware
cp -a bsnes/out/bsnes ${{env.nightly}}/bsnes
#cp -a bsnes/out/bsnes_libretro.so ${{env.nightly}}/ || true
cp -a bsnes/out/discord_game_sdk.so ${{env.nightly}}/
cp -a bsnes/Database/* ${{env.nightly}}/Database
cp -a shaders ${{env.nightly}}/Shaders
cp -a scripts ${{env.nightly}}/scripts
cp -a GPLv3.txt ${{env.nightly}}
shell: bash
name: 'package'
- run: tar cJf ${{env.nightly}}.tar.xz ${{env.nightly}}/*
shell: bash
name: 'archive'
- uses: actions/upload-artifact@v4
with:
name: '${{env.nightly}}.tar.xz'
path: '${{env.nightly}}.tar.xz'
- name: release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: '${{env.nightly}}.tar.xz'