-
Notifications
You must be signed in to change notification settings - Fork 55
142 lines (133 loc) · 5.61 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
name: RMG
on: [push, pull_request]
jobs:
build-linux:
runs-on: ubuntu-20.04
strategy:
matrix:
cmake_args: [-DDISCORD_RPC=ON -DDRAG_DROP=ON -DNETPLAY=ON -DVRU=ON -DUSE_ANGRYLION=ON, -DDISCORD_RPC=OFF -DDRAG_DROP=OFF -DNETPLAY=OFF -DVRU=OFF -DUSE_ANGRYLION=OFF]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: hendrikmuhs/[email protected]
with:
key: Linux
- name: Install Packages
run: |
sudo add-apt-repository ppa:okirby/qt6-backports --yes
sudo apt-get -y install cmake ninja-build libhidapi-dev libsamplerate0-dev libspeex-dev libminizip-dev libsdl2-dev libsdl2-net-dev libfreetype6-dev libgl1-mesa-dev libglu1-mesa-dev pkg-config zlib1g-dev binutils-dev libspeexdsp-dev qt6-base-dev libqt6svg6-dev libqt6websockets6-dev libvulkan-dev build-essential nasm git zip appstream
- name: Prepare Environment
run: |
echo "GIT_REVISION=$(git describe --tags --always)" >> $GITHUB_ENV
- name: Build RMG (AppImage)
run: |
export src_dir="$(pwd)"
if [ "${{ matrix.cmake_args }}" == "-DDISCORD_RPC=ON -DDRAG_DROP=ON -DNETPLAY=ON -DVRU=ON -DUSE_ANGRYLION=ON" ]
then
export build_dir="$(pwd)/Build/AppImage"
export bin_dir="$(pwd)/Bin/AppImage"
else
export build_dir="$(pwd)/Build/CI"
export bin_dir="$(pwd)/Bin/CI"
fi
mkdir $build_dir Bin/ -p
cmake -S "$src_dir" -B "$build_dir" -DCMAKE_BUILD_TYPE="Release" \
${{ matrix.cmake_args }} \
-DCMAKE_INSTALL_PREFIX="/usr" \
-DCMAKE_INSTALL_LIBDIR="lib" \
-DPORTABLE_INSTALL="OFF" \
-DUPDATER=ON -DAPPIMAGE_UPDATER=ON \
-G "Ninja"
cmake --build "$build_dir"
cmake --install "$build_dir" --strip --prefix="$bin_dir/usr"
shell: bash
- name: Create AppImage
if: ${{ matrix.cmake_args == '-DDISCORD_RPC=ON -DDRAG_DROP=ON -DNETPLAY=ON -DVRU=ON -DUSE_ANGRYLION=ON' }}
run: |
./Package/AppImage/Create.sh
shell: bash
- name: Upload RMG (AppImage)
if: ${{ matrix.cmake_args == '-DDISCORD_RPC=ON -DDRAG_DROP=ON -DNETPLAY=ON -DVRU=ON -DUSE_ANGRYLION=ON' }}
uses: actions/upload-artifact@v4
with:
name: RMG-Portable-Linux64-${{ env.GIT_REVISION }}
path: Bin/*.AppImage
build-windows:
runs-on: windows-2019
strategy:
matrix:
cmake_args: [-DDISCORD_RPC=ON -DDRAG_DROP=ON -DNETPLAY=ON -DVRU=ON -DUSE_ANGRYLION=ON, -DDISCORD_RPC=OFF -DDRAG_DROP=OFF -DNETPLAY=OFF -DVRU=OFF -DUSE_ANGRYLION=OFF]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: hendrikmuhs/[email protected]
with:
key: Windows
- uses: msys2/setup-msys2@v2
with:
path-type: inherit
update: true
install: >-
make
mingw-w64-x86_64-cmake
mingw-w64-x86_64-ninja
mingw-w64-x86_64-gcc
mingw-w64-x86_64-hidapi
mingw-w64-x86_64-freetype
mingw-w64-x86_64-libpng
mingw-w64-x86_64-SDL2
mingw-w64-x86_64-SDL2_net
mingw-w64-x86_64-qt6
mingw-w64-x86_64-SDL2
mingw-w64-x86_64-hidapi
mingw-w64-x86_64-speexdsp
mingw-w64-x86_64-libsamplerate
mingw-w64-x86_64-nasm
mingw-w64-x86_64-minizip
mingw-w64-x86_64-vulkan-headers
git
- name: Prepare Environment
run: |
$env:revision = git describe --tags --always
echo "GIT_REVISION=$env:revision" >> $env:GITHUB_ENV
shell: pwsh
- name: Build RMG (Portable)
run: |
export src_dir="$(pwd)"
if [ "${{ matrix.cmake_args }}" == "-DDISCORD_RPC=ON -DDRAG_DROP=ON -DNETPLAY=ON -DVRU=ON -DUSE_ANGRYLION=ON" ]
then
export build_dir="$(pwd)/Build/Release"
else
export build_dir="$(pwd)/Build/CI"
fi
cmake -S "$src_dir" -B "$build_dir" -DCMAKE_BUILD_TYPE="Release" \
${{ matrix.cmake_args }} \
-DPORTABLE_INSTALL=ON -DUPDATER=ON
cmake --build "$build_dir"
if [ "${{ matrix.cmake_args }}" == "-DDISCORD_RPC=ON -DDRAG_DROP=ON -DNETPLAY=ON -DVRU=ON -DUSE_ANGRYLION=ON" ]
then
cmake --install "$build_dir" --strip --prefix="$src_dir"
cmake --build "$build_dir" --target=bundle_dependencies
fi
shell: msys2 {0}
- name: Create Installer
if: ${{ matrix.cmake_args == '-DDISCORD_RPC=ON -DDRAG_DROP=ON -DNETPLAY=ON -DVRU=ON -DUSE_ANGRYLION=ON' }}
run: .\Build\Release\Source\Installer\CreateInstaller.bat
- name: Configure RMG (Portable)
if: ${{ matrix.cmake_args == '-DDISCORD_RPC=ON -DDRAG_DROP=ON -DNETPLAY=ON -DVRU=ON -DUSE_ANGRYLION=ON' }}
run: touch Bin/Release/portable.txt
shell: msys2 {0}
- name: Upload RMG (Portable)
if: ${{ matrix.cmake_args == '-DDISCORD_RPC=ON -DDRAG_DROP=ON -DNETPLAY=ON -DVRU=ON -DUSE_ANGRYLION=ON' }}
uses: actions/upload-artifact@v4
with:
name: RMG-Portable-Windows64-${{ env.GIT_REVISION }}
path: Bin/Release/*
- name: Upload RMG (Installer)
if: ${{ matrix.cmake_args == '-DDISCORD_RPC=ON -DDRAG_DROP=ON -DNETPLAY=ON -DVRU=ON -DUSE_ANGRYLION=ON' }}
uses: actions/upload-artifact@v4
with:
name: RMG-Setup-Windows64-${{ env.GIT_REVISION }}
path: Bin/*.exe