-
Notifications
You must be signed in to change notification settings - Fork 19
264 lines (215 loc) · 7.71 KB
/
main.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
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
# This workflow will compile burrio_link.exe, the burrito binary, and any
# additional libraries needed to run. All these files will then be available
# as an artifact.
name: CI
env:
# The version of Godot to use
GODOT_VERSION: 3.3.2
# Used as a makeshift cache expiry
CACHE_STRING: "Zo6AbxJk4KQl0sGE"
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ "*" ]
pull_request:
branches: [ "*" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
Build-XMLConverter-Linux:
# The type of runner that the job will run on
runs-on: ubuntu-20.04
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout repository
uses: actions/checkout@v4
# IWYU is disabled for now due to noise. It will be re-enabled at a later date
# # `clang-9` must be installed here because of a weird unlisted dependency
# # on some sort of file that clang-9 installs. Without it iwyu would
# # complain about missing files and error out.
# - name: Install include-what-you-use
# run: |
# sudo apt-get install iwyu
# sudo apt-get install clang-9
- name: Install protoc
run: sudo apt-get install protobuf-compiler
- name: Install gtest
run: sudo apt-get install libgtest-dev
- name: Install cpplint
run: |
pip3 install cpplint==1.6.1
- name: Install xml_converter python Dependencies
run: |
cd xml_converter
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
- name: Build xml_converter
run: |
cd xml_converter
mkdir -v -p build
cd build
cmake ..
make
- name: Validate xml_converter
run: |
cd xml_converter
cp build/compile_commands.json ./compile_commands.json
./presubmit.sh
- name: Upload created file
uses: actions/upload-artifact@v3
with:
name: xml_converter
path: xml_converter/build/xml_converter
if-no-files-found: error
Build-BurritoLink-Linux:
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install mingw
run: sudo apt-get install gcc-mingw-w64
- name: Build Burrito Link
run: |
mkdir burrito_link/build
cd burrito_link/build
cmake ..
make
- name: Upload Standalone Executable Burrito Link
uses: actions/upload-artifact@v3
with:
name: burrito_link_exe
path: burrito_link/build/burrito_link.exe
if-no-files-found: error
- name: Upload Shared Library Burrito Link
uses: actions/upload-artifact@v3
with:
name: burrito_link_dll
path: burrito_link/build/d3d11.dll
if-no-files-found: error
Build-BurritoFG-Linux:
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build X11_FG
run: |
cd burrito-fg
cargo build --release
- name: Upload created file
uses: actions/upload-artifact@v3
with:
name: BurritoFG
path: burrito-fg/target/release/libburrito_fg.so
if-no-files-found: error
Build-TacoParser-Linux:
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build taco_parser
run: |
cd taco_parser
cargo build --release
- name: Upload created file
uses: actions/upload-artifact@v3
with:
name: TacoParser
path: taco_parser/target/release/libgw2_taco_parser.so
if-no-files-found: error
Build-BurritoUI-Linux:
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
# - name: Cache Godot
# id: cache-godot
# uses: actions/cache@v2
# with:
# path: ./Godot_v${GODOT_VERSION}-stable_linux_headless.64
# key: ${{ runner.os }}-godot-${GODOT_VERSION}-${CACHE_STRING}
- name: Download Godot
# if: steps.cache-godot.outputs.cache-hit != 'true'
run: |
wget -q https://github.com/godotengine/godot/releases/download/${GODOT_VERSION}-stable/Godot_v${GODOT_VERSION}-stable_linux_headless.64.zip
unzip Godot_v${GODOT_VERSION}-stable_linux_headless.64.zip
rm Godot_v${GODOT_VERSION}-stable_linux_headless.64.zip
# - name: Cache Godot Templates
# id: cache-godot-templates
# uses: actions/cache@v2
# with:
# path: ~/.local/share/godot/templates/${GODOT_VERSION}.stable/
# key: ${{ runner.os }}-godot-${GODOT_VERSION}-${CACHE_STRING}
- name: Download Godot Export Templates
# if: steps.cache-godot-templates.outputs.cache-hit != 'true'
run: |
mkdir -v -p ~/.local/share/godot/templates/${GODOT_VERSION}.stable/
wget -q https://github.com/godotengine/godot/releases/download/${GODOT_VERSION}-stable/Godot_v${GODOT_VERSION}-stable_export_templates.tpz
unzip Godot_v${GODOT_VERSION}-stable_export_templates.tpz
mv templates/* ~/.local/share/godot/templates/${GODOT_VERSION}.stable/
ls ~/.local/share/godot/templates/${GODOT_VERSION}.stable/
- name: Fake The GDNative Files
run: |
mkdir -p burrito-fg/target/release/
touch burrito-fg/target/release/libburrito_fg.so
mkdir -p taco_parser/target/release/
touch taco_parser/target/release/libgw2_taco_parser.so
- name: Build Burrito
run: |
mkdir -v -p build
./Godot_v${GODOT_VERSION}-stable_linux_headless.64 --export "Linux/X11"
chmod +x build/burrito.x86_64
- uses: actions/upload-artifact@v3
with:
name: Burrito_UI
path: build/burrito.x86_64
if-no-files-found: error
Package-Burrito-Linux:
runs-on: ubuntu-20.04
needs:
- Build-XMLConverter-Linux
- Build-BurritoLink-Linux
- Build-BurritoUI-Linux
- Build-BurritoFG-Linux
- Build-TacoParser-Linux
steps:
- name: Download Burrito UI
uses: actions/download-artifact@v3
with:
name: Burrito_UI
- name: Download Burrito FG
uses: actions/download-artifact@v3
with:
name: BurritoFG
- name: Download TacoParser
uses: actions/download-artifact@v3
with:
name: TacoParser
- name: Download XML Converter
uses: actions/download-artifact@v3
with:
name: xml_converter
- name: Download Burrito Link Exe
uses: actions/download-artifact@v3
with:
name: burrito_link_exe
- name: Download Burrito Link DLL
uses: actions/download-artifact@v3
with:
name: burrito_link_dll
- name: Move Burrito Link
run: |
mkdir burrito_link/
mv burrito_link.exe burrito_link/
mv d3d11.dll burrito_link/
- uses: actions/upload-artifact@v3
with:
# Artifact name
name: "Burrito_Linux" # optional, default is artifact
# A file, directory or wildcard pattern that describes what to upload
path: "./*"
# The desired behavior if no files are found using the provided path.
if-no-files-found: error