-
Notifications
You must be signed in to change notification settings - Fork 41
219 lines (210 loc) · 7.87 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
name: CI
on: [push, pull_request]
jobs:
Windows:
runs-on: windows-latest
env:
POWERSHELL_TELEMETRY_OPTOUT: 1
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Build
run: mingw32-make -j $env:NUMBER_OF_PROCESSORS -C bsnes
- name: Prepare artifacts
run: |
cp -R pack bsnes\out\
cp README.md bsnes\out\pack\readme.md
cp bsnes\out\bsnes.exe bsnes\out\pack\bsnes_hd.exe
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: bsnes_hd_beta_X_windows
path: bsnes\out\pack
if-no-files-found: error
Windows-libretro:
runs-on: windows-latest
env:
POWERSHELL_TELEMETRY_OPTOUT: 1
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Build
run: mingw32-make -j $env:NUMBER_OF_PROCESSORS -C bsnes target=libretro
- name: Prepare artifacts
run: |
mkdir bsnes/out/pack
cp README.md bsnes/out/pack
cp LICENSE bsnes/out/pack
cp -R bsnes/out/*bsnes* bsnes/out/pack
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: bsnes_hd_beta_X_windows_libretro
path: bsnes\out\pack
if-no-files-found: error
Linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup
run: |
sudo apt-get update
sudo apt-get -y install build-essential libgtk2.0-dev libpulse-dev mesa-common-dev libcairo2-dev libsdl2-dev libxv-dev libao-dev libopenal-dev libudev-dev
- name: Build
run: make -j $(nproc) -C bsnes
- name: Prepare artifacts
run: |
cp -R pack bsnes/out/
cp README.md bsnes/out/pack/readme.md
cp bsnes/out/bsnes bsnes/out/pack/bsnes_hd
chmod +x bsnes/out/pack/bsnes_hd
mkdir bsnes/out/tar
cd bsnes/out/pack
tar -jcvpf ../tar/bsnes_hd_beta_X_linux.tar.bz2 *
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: UNPACK-LINUX
path: bsnes/out/tar
if-no-files-found: error
Linux-libretro:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup
run: |
sudo apt-get update
sudo apt-get -y install build-essential libgtk2.0-dev libpulse-dev mesa-common-dev libcairo2-dev libsdl2-dev libxv-dev libao-dev libopenal-dev libudev-dev
- name: Build
run: make -j $(nproc) -C bsnes target=libretro
- name: Prepare artifacts
run: |
mkdir bsnes/out/pack
cp README.md bsnes/out/pack
cp LICENSE bsnes/out/pack
cp -R bsnes/out/*bsnes* bsnes/out/pack
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: bsnes_hd_beta_X_linux_libretro
path: bsnes/out/pack
if-no-files-found: error
Linux-ARM-libretro:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: add foreign arch
run: |
sudo dpkg --add-architecture arm64
sudo rm -rf /etc/apt/sources.list
echo "deb [arch=amd64] http://us.archive.ubuntu.com/ubuntu focal main restricted" | sudo tee -a /etc/apt/sources.list
echo "deb [arch=amd64] http://us.archive.ubuntu.com/ubuntu focal-updates main restricted" | sudo tee -a /etc/apt/sources.list
echo "deb [arch=amd64] http://us.archive.ubuntu.com/ubuntu focal universe" | sudo tee -a /etc/apt/sources.list
echo "deb [arch=amd64] http://us.archive.ubuntu.com/ubuntu focal-updates universe" | sudo tee -a /etc/apt/sources.list
echo "deb [arch=amd64] http://us.archive.ubuntu.com/ubuntu focal multiverse" | sudo tee -a /etc/apt/sources.list
echo "deb [arch=amd64] http://us.archive.ubuntu.com/ubuntu focal-updates multiverse" | sudo tee -a /etc/apt/sources.list
echo "deb [arch=amd64] http://us.archive.ubuntu.com/ubuntu focal-backports main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports focal main restricted" | sudo tee -a /etc/apt/sources.list
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports focal-updates main restricted" | sudo tee -a /etc/apt/sources.list
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports focal universe" | sudo tee -a /etc/apt/sources.list
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports focal-updates universe" | sudo tee -a /etc/apt/sources.list
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports focal multiverse" | sudo tee -a /etc/apt/sources.list
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports focal-updates multiverse" | sudo tee -a /etc/apt/sources.list
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports focal-backports main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list
- name: Install needed packages
run: sudo apt update && sudo apt install wget:amd64 git:amd64 build-essential:amd64 gcc:amd64 make:amd64 g++-aarch64-linux-gnu:amd64 gcc-aarch64-linux-gnu:amd64 binutils-aarch64-linux-gnu:amd64 libx11-dev:arm64 libxext-dev:arm64
- name: Build
run: |
make -j $(nproc) -C bsnes target=libretro compiler=/usr/bin/aarch64-linux-gnu-g++
wget https://raw.githubusercontent.com/libretro/libretro-super/master/retrolink.sh && chmod +x retrolink.sh && ./retrolink.sh bsnes/out/bsnes_hd_beta_libretro.so
- name: Prepare artifacts
run: |
mkdir bsnes/out/pack
cp README.md bsnes/out/pack
cp LICENSE bsnes/out/pack
cp -R bsnes/out/*bsnes* bsnes/out/pack
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: bsnes_hd_beta_X_linux_arm_libretro
path: bsnes/out/pack
if-no-files-found: error
macOS:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Build
run: |
export MACOSX_DEPLOYMENT_TARGET=10.14
make -j $(sysctl -n hw.ncpu) -C bsnes
- name: Prepare artifacts
run: |
mkdir bsnes/out/pack
cp LICENSE bsnes/out/pack
cp README.md bsnes/out/pack
cp -R bsnes/out/*bsnes* bsnes/out/pack
mv bsnes/out/pack/bsnes.app bsnes/out/pack/bsnes_hd.app
chmod +x bsnes/out/pack/bsnes_hd.app/Contents/MacOS/bsnes
mkdir bsnes/out/tar
cd bsnes/out/pack
tar -jcvpf ../tar/bsnes_hd_beta_X_mac.tar.bz2 *
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: UNPACK-MAC
path: bsnes/out/tar
if-no-files-found: error
macOS-libretro:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Build
run: |
export MACOSX_DEPLOYMENT_TARGET=10.14
make -j $(sysctl -n hw.ncpu) -C bsnes target=libretro
- name: Prepare artifacts
run: |
mkdir bsnes/out/pack
cp README.md bsnes/out/pack
cp LICENSE bsnes/out/pack
cp -R bsnes/out/*bsnes* bsnes/out/pack
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: bsnes_hd_beta_X_mac_libretro
path: bsnes/out/pack
if-no-files-found: error
Android-libretro:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: nttld/setup-ndk@v1
with:
ndk-version: r20b
- name: Build
run: |
cd bsnes/target-libretro/jni
ndk-build
cd ../../..
cp README.md bsnes/target-libretro/libs
cp LICENSE bsnes/target-libretro/libs
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: bsnes_hd_beta_X_android_libretro
path: bsnes/target-libretro/libs
if-no-files-found: error