-
Notifications
You must be signed in to change notification settings - Fork 177
167 lines (165 loc) · 7.74 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
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
name: Build RSDKv4
on:
push:
branches:
- master
- main
- win-actions
- linux-actions
jobs:
v4-windows:
runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@v1
with:
submodules: recursive
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1
- name: Download libogg and libvorbis for easier includes
run: |
Invoke-WebRequest -Uri "https://ftp.osuosl.org/pub/xiph/releases/ogg/libogg-1.3.5.zip" -OutFile "libogg.zip"
Expand-Archive -Path libogg.zip -DestinationPath ./dependencies/windows/
Rename-Item ./dependencies/windows/libogg-1.3.5 libogg
Invoke-WebRequest -Uri "https://ftp.osuosl.org/pub/xiph/releases/vorbis/libvorbis-1.3.7.zip" -OutFile "libvorbis.zip"
Expand-Archive -Path libvorbis.zip -DestinationPath ./dependencies/windows/
Rename-Item ./dependencies/windows/libvorbis-1.3.7 libvorbis
- name: Download GLEW
run: |
Invoke-WebRequest -Uri "https://github.com/nigels-com/glew/releases/download/glew-2.2.0/glew-2.2.0-win32.zip" -OutFile "GLEW.zip"
Expand-Archive -Path GLEW.zip -DestinationPath ./dependencies/windows/
Rename-Item ./dependencies/windows/glew-2.2.0 glew
- name: Download SDL2
run: |
Invoke-WebRequest -Uri "https://libsdl.org/release/SDL2-devel-2.0.14-VC.zip" -OutFile "SDL2.zip"
Expand-Archive -Path SDL2.zip -DestinationPath ./dependencies/windows/
Rename-Item ./dependencies/windows/SDL2-2.0.14 SDL2
- name: Run vcpkg
run: |
vcpkg install libogg:x86-windows-static-md libvorbis:x86-windows-static-md
vcpkg integrate install
- name: Build RSDKv4
run: |
msbuild RSDKv4.sln /p:Configuration=Release /p:Platform=x86 /p:ForceImportBeforeCppTargets="$env:GITHUB_WORKSPACE/props/winactions.props"
- name: Move artifacts
run: |
mkdir artifacts
move ./build/Win32/Release/*.dll ./artifacts
move ./build/Win32/Release/*.exe ./artifacts
- name: Upload artifacts
uses: actions/[email protected]
with:
name: v4-windows
path: artifacts
v4-windows-x64:
runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@v1
with:
submodules: recursive
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1
- name: Download libogg and libvorbis for easier includes
run: |
Invoke-WebRequest -Uri "https://ftp.osuosl.org/pub/xiph/releases/ogg/libogg-1.3.5.zip" -OutFile "libogg.zip"
Expand-Archive -Path libogg.zip -DestinationPath ./dependencies/windows/
Rename-Item ./dependencies/windows/libogg-1.3.5 libogg
Invoke-WebRequest -Uri "https://ftp.osuosl.org/pub/xiph/releases/vorbis/libvorbis-1.3.7.zip" -OutFile "libvorbis.zip"
Expand-Archive -Path libvorbis.zip -DestinationPath ./dependencies/windows/
Rename-Item ./dependencies/windows/libvorbis-1.3.7 libvorbis
- name: Download GLEW
run: |
Invoke-WebRequest -Uri "https://github.com/nigels-com/glew/releases/download/glew-2.2.0/glew-2.2.0-win32.zip" -OutFile "GLEW.zip"
Expand-Archive -Path GLEW.zip -DestinationPath ./dependencies/windows/
Rename-Item ./dependencies/windows/glew-2.2.0 glew
- name: Download SDL2
run: |
Invoke-WebRequest -Uri "https://libsdl.org/release/SDL2-devel-2.0.14-VC.zip" -OutFile "SDL2.zip"
Expand-Archive -Path SDL2.zip -DestinationPath ./dependencies/windows/
Rename-Item ./dependencies/windows/SDL2-2.0.14 SDL2
- name: Run vcpkg
run: |
vcpkg install libogg:x64-windows-static-md libvorbis:x64-windows-static-md
vcpkg integrate install
- name: Build RSDKv4
run: |
msbuild RSDKv4.sln /p:Configuration=Release /p:Platform=x64 /p:ForceImportBeforeCppTargets="$env:GITHUB_WORKSPACE/props/winactions_x64.props"
- name: Move artifacts
run: |
mkdir artifacts
move ./build/x64/Release/*.dll ./artifacts
move ./build/x64/Release/*.exe ./artifacts
- name: Upload artifacts
uses: actions/[email protected]
with:
name: v4-windows-x64
path: artifacts
v4-android:
runs-on: windows-latest
steps:
- name: Checkout repository Android
uses: actions/checkout@v2
with:
submodules: recursive
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1
- name: Download libogg, libvorbis, and libtheora for easier includes
run: |
Invoke-WebRequest -Uri "https://ftp.osuosl.org/pub/xiph/releases/vorbis/libvorbis-1.3.7.zip" -OutFile "libvorbis.zip"
Expand-Archive -Path libvorbis.zip -DestinationPath ./dependencies/android/
Rename-Item ./dependencies/android/libvorbis-1.3.7 libvorbis
Invoke-WebRequest -Uri "https://ftp.osuosl.org/pub/xiph/releases/ogg/libogg-1.3.5.zip" -OutFile "libogg.zip"
Expand-Archive -Path libogg.zip -DestinationPath ./dependencies/android/app/jni/src/dependencies/android/
Rename-Item ./dependencies/android/app/jni/src/dependencies/android/libogg-1.3.5 libogg
Invoke-WebRequest -Uri "https://ftp.osuosl.org/pub/xiph/releases/vorbis/libvorbis-1.3.7.zip" -OutFile "libvorbis.zip"
Expand-Archive -Path libvorbis.zip -DestinationPath ./dependencies/android/app/jni/src/dependencies/android/
Rename-Item ./dependencies/android/app/jni/src/dependencies/android/libvorbis-1.3.7 libvorbis
- name: Download GLEW
run: |
Invoke-WebRequest -Uri "https://github.com/nigels-com/glew/releases/download/glew-2.2.0/glew-2.2.0-win32.zip" -OutFile "GLEW.zip"
Expand-Archive -Path GLEW.zip -DestinationPath ./dependencies/android/
Rename-Item ./dependencies/android/glew-2.2.0 glew
- name: Download SDL2
run: |
Invoke-WebRequest -Uri "https://libsdl.org/release/SDL2-2.0.16.zip" -OutFile "SDL2.zip"
Expand-Archive -Path SDL2.zip -DestinationPath ./dependencies/android/
Rename-Item ./dependencies/android/SDL2-2.0.16 SDL
- name: Move & Copy stuff
run: |
Copy-Item -Path ./dependencies/android/app/jni/src/dependencies/android\* -Destination ./dependencies/
Copy-Item -Path ./dependencies/android/app/jni/src/dependencies/android/libogg/ -Destination ./dependencies/android/ -recurse
Copy-Item -Path ./dependencies/android/config_types.h -Destination ./dependencies/android/libogg/include/ogg/
- name: Set up Java
uses: actions/setup-java@v2
with:
distribution: "zulu"
java-version: 11
- name: Build RSDKv4 Android
working-directory: ./android
run: |
./gradlew.bat Build --no-daemon -PABIFILTERS="armeabi-v7a;arm64-v8a"
- name: Upload artifact Android
uses: actions/upload-artifact@v2
with:
name: v4-android
path: ./android/app/build/outputs/apk
v4-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
submodules: recursive
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install libogg-dev libvorbis-dev libsdl1.2-dev libsdl2-dev libglew-dev
ls ./dependencies/all
- name: Build RSDKv4
run: make
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: v4-linux
path: bin