-
Notifications
You must be signed in to change notification settings - Fork 8
233 lines (224 loc) · 11.5 KB
/
nightly_win_lin.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
name: RetroArch Nightly Build
on:
schedule:
- cron: "0 5 * * *" # build every night at midnight Eastern
watch: # this is a hack that lets repo owners trigger a build by starring
types: [started]
if: github.actor == github.event.repository.owner.login
jobs:
Assets:
name: Collect and bundle assets
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: |
git clone https://github.com/libretro/retroarch-assets.git && mv retroarch-assets assets && rm -rf assets/branding assets/wallpaper/* assets/src assets/.git
git clone https://github.com/libretro/common-overlays.git && mv common-overlays overlays && rm -rf overlays/.git
git clone https://github.com/libretro/retroarch-joypad-autoconfig.git && mv retroarch-joypad-autoconfig autoconfig && rm -rf autoconfig/.git
git clone https://github.com/libretro/libretro-super.git && mv libretro-super/dist/info ./ && rm -rf libretro-super
mkdir shaders
- name: fetch shaders
working-directory: shaders
run: |
git clone https://github.com/libretro/glsl-shaders.git && mv glsl-shaders shaders_glsl && rm -rf shaders_glsl/.git
git clone https://github.com/libretro/slang-shaders.git && mv slang-shaders shaders_slang && rm -rf shaders_slang/.git
- run: |
git clone https://github.com/libretro/libretro-database.git && mv libretro-database/rdb ./database && mv libretro-database/cht ./cheats && rm -rf libretro-database
git clone https://github.com/libretro/RetroArch.git
mkdir -p filters/audio && mkdir -p filters/video
- name: Build audio filters
working-directory: RetroArch/libretro-common/audio/dsp_filters
run: make && mv *so ../../../../filters/audio && mv *dsp ../../../../filters/audio
- name: Build video filters
working-directory: RetroArch/gfx/video_filters
run: make && mv *so ../../../filters/video && mv *filt ../../../filters/video
- run: rm -rf RetroArch
- name: Zip it up!
run: 7z a -mx=9 -x'!README.md' -x'!LICENSE' assets.7z *
- name: Upload Windows assets bundle
uses: actions/upload-artifact@v2
with:
name: assets.7z
path: assets.7z
- run: |
mkdir retroarch
mv assets retroarch/
mv overlays retroarch/overlay
mv autoconfig retroarch/
mv info retroarch/cores
mv shaders retroarch/
mv filters retroarch/
mkdir retroarch/database && mv database retroarch/database/rdb
mv cheats retroarch/
mkdir RetroArch-Linux-x86_64-Nightly.AppImage.home
mv retroarch/ RetroArch-Linux-x86_64-Nightly.AppImage.home
7z a -mx=9 RetroArch-Linux-x86_64-Nightly.AppImage.home.7z RetroArch-Linux-x86_64-Nightly.AppImage.home
- name: Upload Linux AppImage assets bundle
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: RetroArch-Linux-x86_64-Nightly.AppImage.home.7z
tag: Nightlies
asset_name: RetroArch-Linux-x86_64-Nightly.AppImage.home.7z
overwrite: true
Linux:
name: Build RetroArch Linux AppImage Nightly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Fetch dependencies
run: sudo apt-get update ; sudo apt-get install libasound2-dev libavcodec-dev libavdevice-dev libavformat-dev libavutil-dev libc6-dev libdbus-1-dev libdrm-dev libegl1-mesa-dev libfreetype6-dev nvidia-cg-toolkit libgbm-dev libglm-dev libjack-jackd2-dev libopenal-dev libpulse-dev libsdl2-dev libswscale-dev libudev-dev libusb-1.0-0-dev libv4l-dev libvulkan-dev libxinerama-dev libxml2-dev libxv-dev libxxf86vm-dev pkg-config python3-dev qt5-default qtbase5-dev qt5dxcb-plugin wayland-protocols x11proto-xext-dev zlib1g-dev
- name: Fetch linuxdeploy
run: wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage && chmod +x linuxdeploy-x86_64.AppImage
- name: Fetch RetroArch source tree
run: git clone https://github.com/libretro/RetroArch.git
- name: Build RetroArch
run: cd RetroArch && mkdir AppDir && ./configure --prefix=/usr && make -j8 && make install DESTDIR=AppDir prefix=/usr && ../linuxdeploy-x86_64.AppImage --appdir AppDir --output appimage && mv RetroArch*.AppImage ../RetroArch-Linux-x86_64-Nightly.AppImage
- name: Check AppImage for common issues
run: wget https://github.com/TheAssassin/appimagelint/releases/download/continuous/appimagelint-x86_64.AppImage && chmod +x appimagelint-x86_64.AppImage && ./appimagelint-x86_64.AppImage RetroArch-Linux-x86_64-Nightly.AppImage
- name: Upload RetroArch AppImage
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: RetroArch-Linux-x86_64-Nightly.AppImage
tag: Nightlies
asset_name: RetroArch-Linux-x86_64-Nightly.AppImage
overwrite: true
Linux_LTS:
name: Build RetroArch LTS Linux AppImage Nightly
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Fetch dependencies
run: sudo apt-get update ; sudo apt-get install libasound2-dev libavcodec-dev libavdevice-dev libavformat-dev libavutil-dev libc6-dev libdbus-1-dev libdrm-dev libegl1-mesa-dev libfreetype6-dev nvidia-cg-toolkit libgbm-dev libglm-dev libjack-jackd2-dev libopenal-dev libpulse-dev libsdl2-dev libswscale-dev libudev-dev libusb-1.0-0-dev libv4l-dev libvulkan-dev libxinerama-dev libxml2-dev libxv-dev libxxf86vm-dev pkg-config python3-dev qt5-default qtbase5-dev wayland-protocols x11proto-xext-dev zlib1g-dev
- name: Fetch linuxdeploy
run: wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage && chmod +x linuxdeploy-x86_64.AppImage
- name: Fetch RetroArch source tree
run: git clone https://github.com/libretro/RetroArch.git
- name: Build RetroArch
run: cd RetroArch && mkdir AppDir && ./configure --prefix=/usr && make -j8 && make install DESTDIR=AppDir prefix=/usr && ../linuxdeploy-x86_64.AppImage --appdir AppDir --output appimage && mv RetroArch*.AppImage ../RetroArch-Linux-x86_64-Nightly.AppImage
- name: Check AppImage for common issues
run: wget https://github.com/TheAssassin/appimagelint/releases/download/continuous/appimagelint-x86_64.AppImage && chmod +x appimagelint-x86_64.AppImage && ./appimagelint-x86_64.AppImage RetroArch-Linux-x86_64-Nightly.AppImage
- name: Upload RetroArch AppImage
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: RetroArch-Linux-x86_64-Nightly.AppImage
tag: Linux_LTS_Nightlies
asset_name: RetroArch-Linux-x86_64-Nightly.AppImage
overwrite: true
# Windows:
# name: Build RetroArch Nightly Windows
# needs: Assets
# runs-on: windows-latest
# steps:
# - uses: msys2/setup-msys2@v2
# with:
# update: true
# install: >-
# base-devel
# git
# wget
# make
# mingw-w64-x86_64-binutils
# mingw-w64-x86_64-toolchain
# mingw-w64-x86_64-ntldd
# mingw-w64-x86_64-zlib
# mingw-w64-x86_64-pkg-config
# mingw-w64-x86_64-SDL2
# mingw-w64-x86_64-libxml2
# mingw-w64-x86_64-freetype
# mingw-w64-x86_64-python3
# mingw-w64-x86_64-ffmpeg
# mingw-w64-x86_64-drmingw
# mingw-w64-x86_64-qt5
# mingw-w64-x86_64-openssl
# mingw-w64-x86_64-nvidia-cg-toolkit
# unzip
# p7zip
# - uses: actions/checkout@v2
# - name: Fetch the source
# run: git clone https://github.com/libretro/RetroArch.git
# - shell: msys2 {0}
# working-directory: RetroArch
# run: |
# ./configure --enable-qt
# make -j8
# - name: Setup working dir
# run: mkdir working_dir
# - name: Gather Qt libs
# working-directory: RetroArch
# run: ForEach ($l in $(msys2 -c ntldd.exe -R 'imageformats/*dll' | grep mingw64 | sed -e 's/^[ \t]*//'|cut -d' ' -f3)){cp "$l" ../working_dir}
# - name: Gather the other libs
# working-directory: RetroArch
# run: ForEach ($l in $(msys2 -c ntldd.exe -R '*.exe'|grep mingw64|sed -e 's/^[ \t]*//'|cut -d' ' -f3)){cp "$l" ../working_dir}
# - shell: msys2 {0}
# working-directory: RetroArch/libretro-common/audio/dsp_filters
# run: make
# - shell: msys2 {0}
# working-directory: RetroArch/gfx/video_filters
# run: make
## - name: Free up some disk space
## working-directory: RetroArch
## run: rm -rf .git && pacman -Rsu --noconfirm mingw-w64-x86_64-toolchain mingw-w64-x86_64-openssl
# - name: Create debug exe and strip regular exe
# working-directory: RetroArch
# run: cp retroarch.exe retroarch_debug.exe && strip.exe -s retroarch.exe
# - name: Move executables to working dir (libs are already there)
# working-directory: RetroArch
# run: mv *.exe ../working_dir
# - shell: msys2 {0}
# working-directory: working_dir
# run: windeployqt --debug --no-patchqt --no-translations retroarch.exe
# - name: Zip just the executables and libs
# working-directory: working_dir
# run: 7z a -mx=9 RetroArch-Win-x86_64-Nightly_Update-Pack.7z *.exe *dll
# - name: Upload Update Pack
# uses: svenstaro/upload-release-action@v2
# with:
# repo_token: ${{ secrets.GITHUB_TOKEN }}
# file: working_dir/RetroArch-Win-x86_64-Nightly_Update-Pack.7z
# tag: Nightlies
# asset_name: RetroArch-Win-x86_64-Nightly_Update-Pack.7z
# overwrite: true
# - name: Download assets package from previous job
# uses: actions/download-artifact@v2
# with:
# name: assets.7z
# - shell: msys2 {0}
# working-directory: working_dir
# run: mv ../assets.7z ./ && 7z x assets.7z && rm -rf assets.7z RetroArch-Win-x86_64-Nightly_Update-Pack.7z filters/audio/*.so filters/video/*.so
# - name: Copy filters to assets dir
# run: mv RetroArch/libretro-common/audio/dsp_filters/*dll working_dir/filters/audio && mv RetroArch/gfx/video_filters/*dll working_dir/filters/video
# - name: Zip the full release
# working-directory: working_dir
# run: 7z a -mx=9 RetroArch-Win-x86_64-Nightly_Full.7z *
# - name: Upload RetroArch release bundle
# uses: svenstaro/upload-release-action@v2
# with:
# repo_token: ${{ secrets.GITHUB_TOKEN }}
# file: working_dir/RetroArch-Win-x86_64-Nightly_Full.7z
# tag: Nightlies
# asset_name: RetroArch-Win-x86_64-Nightly_Full.7z
# overwrite: true
# - shell: msys2 {0}
# run: rm -rf working_dir && mkdir RetroArch/angle
## - name: Reinstall necessary packages
## run: msys2do pacman -S --noconfirm --disable-download-timeout --needed mingw-w64-x86_64-toolchain mingw-w64-x86_64-openssl
# - shell: msys2 {0}
# working-directory: RetroArch
# run: ./configure --enable-angle --enable-dynamic_egl && make
# - name: Gather resources
# working-directory: RetroArch/angle
# run: mv ../retroarch_angle.exe ./ && mv ../pkg/windows/x86_64/libEGL.dll ./ && mv ../pkg/windows/x86_64/libGLESv2.dll ./
# - name: Zip the ANGLE bundle
# working-directory: RetroArch/angle
# run: 7z a -mx=9 RetroArch-ANGLE-x86_64-Nightly_Add-on.7z *
# - name: Upload ANGLE release bundle
# uses: svenstaro/upload-release-action@v2
# with:
# repo_token: ${{ secrets.GITHUB_TOKEN }}
# file: RetroArch/angle/RetroArch-ANGLE-x86_64-Nightly_Add-on.7z
# tag: Nightlies
# asset_name: RetroArch-ANGLE-x86_64-Nightly_Add-on.7z
# overwrite: true