forked from Shpoike/Quakespasm
-
Notifications
You must be signed in to change notification settings - Fork 8
53 lines (45 loc) · 1.62 KB
/
windows.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
name: Windows CI (MinGW Linux Cross)
on: [push, pull_request]
jobs:
build:
name: ${{ matrix.platform }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
platform: [w64, w32]
steps:
- uses: actions/checkout@v3
- name: Install Dependencies
run: |
sudo apt-get update
sudo gem install apt-spy2
sudo apt-spy2 check
mirrors=$(apt-spy2 list | awk '{print $1}')
for mirror in $mirrors; do
echo "Trying mirror: $mirror"
sudo apt-spy2 select --mirror=$mirror --commit
# Run 'apt-get update' for the selected mirror
if sudo apt-get update; then
# Try to install dependencies. If successful, break out of the loop.
if sudo apt-get install -y mingw-w64 libsdl2-dev libmad0-dev libopus-dev libvorbis-dev zlib1g-dev libvorbisfile3 libopusfile-dev libz-mingw-w64 libz-mingw-w64-dev libcurl4-openssl-dev zip; then
echo "Dependencies successfully installed using mirror: $mirror"
break
else
echo "Failed to install dependencies from mirror: $mirror. Trying next mirror."
fi
else
echo "Failed to update using mirror: $mirror. Trying next mirror."
fi
done
continue-on-error: false
- name: Build
run: |
chmod 755 build-${{ matrix.platform }}.sh
sudo ./build-${{ matrix.platform }}.sh
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: QSS-M ${{ matrix.platform }}
path: |
Quake/QSS-M-w*.zip