forked from rusefi/rusefi
-
Notifications
You must be signed in to change notification settings - Fork 0
315 lines (257 loc) · 11.4 KB
/
build-firmware.yaml
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
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
name: Build Firmware
on: [push, pull_request]
jobs:
build-firmware:
runs-on: ubuntu-latest
strategy:
# Let all builds finish even if one fails early
fail-fast: false
matrix:
# What boards should we build for? In the 'include' section below,
# set up what each of these boards needs to build.
#
# see also gen_config where we have a similar list for all boards!
#
build-target: [hellen72, hellenNA6, hellen128, hellen121vag, hellen121nissan, cypress, frankenso_na6, kinetis, mre_f4, mre_f4_recovery, mre_f4_hardware_QC_special_build, mre_f7, prometheus_405, prometheus_469, proteus_f4, proteus_f4_hardware_QC_special_build, proteus_f7, proteus_f7_hardware_QC_special_build, proteus_h7, proteus_legacy, stm32f767_nucleo, stm32h743_nucleo, subaru_eg33_f7]
include:
# Board configurations
- build-target: hellen72
folder: hellen/hellen72
ini-file: rusefi_hellen72.ini
- build-target: hellenNA6
folder: hellen/hellen64_miataNA6_94
ini-file: rusefi_hellenNA6.ini
- build-target: hellen128
folder: hellen/hellen128
ini-file: rusefi_hellen128mercedes.ini
- build-target: hellen121vag
folder: hellen/hellen121vag
ini-file: rusefi_hellen121vag.ini
- build-target: hellen121nissan
folder: hellen/hellen121nissan
ini-file: rusefi_hellen121nissan.ini
- build-target: cypress
folder: hellen
ini-file: rusefi_hellen_cypress.ini
- build-target: frankenso_na6
folder: frankenso
ini-file: rusefi_frankenso_na6.ini
- build-target: kinetis
folder: kinetis
ini-file: rusefi_kinetis.ini
- build-target: mre_f4
folder: microrusefi
ini-file: rusefi_mre_f4.ini
- build-target: mre_f4_recovery
folder: microrusefi
ini-file: rusefi_mre_f4.ini
- build-target: mre_f4_hardware_QC_special_build
folder: microrusefi
ini-file: rusefi_mre_f4.ini
- build-target: mre_f7
folder: microrusefi
ini-file: rusefi_mre_f7.ini
console-settings: firmware/config/boards/nucleo_f767/rusefi_console_properties.xml
- build-target: prometheus_405
folder: prometheus
ini-file: rusefi_prometheus_405.ini
- build-target: prometheus_469
folder: prometheus
ini-file: rusefi_prometheus_469.ini
- build-target: proteus_f4
folder: proteus
ini-file: rusefi_proteus_f4.ini
- build-target: proteus_f4_hardware_QC_special_build
folder: proteus
ini-file: rusefi_proteus_f4.ini
- build-target: proteus_f7
folder: proteus
ini-file: rusefi_proteus_f7.ini
- build-target: proteus_f7_hardware_QC_special_build
folder: proteus
ini-file: rusefi_proteus_f7.ini
- build-target: proteus_h7
folder: proteus
ini-file: rusefi_proteus_h7.ini
- build-target: proteus_legacy
folder: proteus
ini-file: rusefi_proteus_f7.ini
- build-target: stm32f767_nucleo
folder: nucleo_f767
ini-file: no
console-settings: firmware/config/boards/nucleo_f767/rusefi_console_properties.xml
skip-config: yes
- build-target: stm32h743_nucleo
folder: nucleo_h743
ini-file: no
skip-config: yes
- build-target: subaru_eg33_f7
folder: subaru_eg33
ini-file: rusefi_subaru_eg33_f7.ini
steps:
- uses: actions/checkout@v1
with:
submodules: recursive
- uses: actions/setup-java@v1
with:
java-version: '8'
- name: Install multilib, mingw, ncftp and mtools
run: |
sudo apt-get update
sudo apt-get install gcc-multilib g++-multilib g++-mingw-w64 gcc-mingw-w64 ncftp mtools
- name: Generate Configs
if: ${{ matrix.skip-config != 'yes' }}
working-directory: ./firmware/
run: |
if [ "${{ matrix.build-target }}" = "kinetis" ]; then
cd config/boards/kinetis/config
bash gen_config.sh
[ $? -eq 0 ] || { echo "ERROR generating board kinetis kin"; exit 1; }
elif [ "${{ matrix.build-target }}" = "cypress" ]; then
cd config/boards/hellen/cypress/config
bash gen_config.sh
[ $? -eq 0 ] || { echo "ERROR generating board hellen_cypress hellen_cypress"; exit 1; }
elif [ "${{ matrix.build-target }}" = "subaru_eg33_f7" ]; then
bash config/boards/subaru_eg33/config/gen_config.sh
[ $? -eq 0 ] || { echo "ERROR generating board subaru_eg33 subaru_eg33_f7"; exit 1; }
else
bash gen_config_board.sh ${{matrix.folder}} ${{matrix.build-target}}
fi
- name: Generate Enum Strings
working-directory: ./firmware/
run: bash gen_enum_to_string.sh
- name: Generate Default config
working-directory: ./firmware/
run: bash gen_config_default.sh
- name: Generate Live Documentation
working-directory: ./firmware/
run: bash gen_live_documentation.sh
# Build machines don't have arm-none-eabi gcc, so let's download it and put it on the path
- name: Download & Install GCC
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
run: | # Compiler hosted on our other git repo - avoids having to download from the nice folks at ARM every time
wget 'https://github.com/rusefi/build_support/raw/master/gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.xz' -O compiler.tar.xz
tar -xvf compiler.tar.xz
echo "::add-path::`pwd`/gcc-arm-none-eabi-9-2020-q2-update/bin"
# Make sure the compiler we just downloaded works - just print out the version
- name: Test Compiler
run: arm-none-eabi-gcc -v
- name: Configs Set FTP variables
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
run: |
if [ "${{github.event_name}}" = "push" ] && [ "${{github.ref}}" = "refs/heads/master" ]; then
echo "::set-env name=RUSEFI_FTP_SERVER::${{secrets.RUSEFI_FTP_SERVER}}";
echo "::set-env name=RUSEFI_BUILD_FTP_USER::${{secrets.RUSEFI_BUILD_FTP_USER}}";
echo "::set-env name=RUSEFI_BUILD_FTP_PASS::${{secrets.RUSEFI_BUILD_FTP_PASS}}";
fi
# Build rusEFI console
- name: Build console
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
run: bash misc/jenkins/build_java_console.sh
# Build the simulator
- name: Build simulator
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
run: OS="Windows_NT" bash misc/jenkins/build_simulator.sh
# Build the firmware!
- name: Build Firmware
run: bash misc/jenkins/compile_other_versions/compile.sh ${{matrix.folder}} ${{matrix.build-target}} ${{matrix.ini-file}} ${{matrix.console-settings}}
- name: Package Bundle
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
run: bash misc/jenkins/compile_other_versions/prepare_bundle.sh ${{matrix.build-target}} ${{matrix.ini-file}}
- name: Attach console junit results
if: always()
uses: actions/upload-artifact@v2
with:
name: console ${{matrix.build-target}} junit
path: ./java_console/build/*.txt
- name: Upload build bin
if: ${{ github.event_name != 'push' || github.ref != 'refs/heads/master' }}
uses: actions/upload-artifact@v2
with:
name: rusefi_${{matrix.build-target}}.bin
path: ./firmware/deliver/rusefi*.bin
- name: Upload build hex
if: ${{ github.event_name != 'push' || github.ref != 'refs/heads/master' }}
uses: actions/upload-artifact@v2
with:
name: rusefi_${{matrix.build-target}}.hex
path: ./firmware/deliver/rusefi*.hex
- name: Upload build dfu
if: ${{ github.event_name != 'push' || github.ref != 'refs/heads/master' }}
uses: actions/upload-artifact@v2
with:
name: rusefi_${{matrix.build-target}}.dfu
path: ./firmware/deliver/rusefi*.dfu
- name: Upload bundle
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
uses: actions/upload-artifact@v2
with:
name: rusefi_bundle_${{matrix.build-target}}.zip
path: ./artifacts/rusefi_bundle*.zip
- name: Upload autoupdate bundle
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
uses: actions/upload-artifact@v2
with:
name: rusefi_bundle_${{matrix.build-target}}_autoupdate.zip
path: ./artifacts/rusefi_bundle_${{matrix.build-target}}_autoupdate.zip
build-primary-bundle:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
submodules: recursive
- uses: actions/setup-java@v1
with:
java-version: '8'
- name: Generate Enum Strings
working-directory: ./firmware/
run: bash gen_enum_to_string.sh
- name: Generate Configs
working-directory: ./firmware/
run: bash gen_config_default.sh
- name: Generate Live Documentation
working-directory: ./firmware/
run: bash gen_live_documentation.sh
# Build machines don't have arm-none-eabi gcc, so let's download it and put it on the path
- name: Download & Install GCC
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
run: | # Compiler hosted on our other git repo - avoids having to download from the nice folks at ARM every time
wget 'https://github.com/rusefi/build_support/raw/master/gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.xz' -O compiler.tar.xz
tar -xvf compiler.tar.xz
echo "::add-path::`pwd`/gcc-arm-none-eabi-9-2020-q2-update/bin"
- name: Install multilib, mingw, and ncftp
run: |
sudo apt-get update
sudo apt-get install gcc-multilib g++-multilib g++-mingw-w64 gcc-mingw-w64 ncftp
# Make sure the compiler we just downloaded works - just print out the version
- name: Test Compiler
run: arm-none-eabi-gcc -v
- name: primary Set FTP variables
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
run: |
if [ "${{github.event_name}}" = "push" ] && [ "${{github.ref}}" = "refs/heads/master" ]; then
echo "::set-env name=RUSEFI_FTP_SERVER::${{secrets.RUSEFI_FTP_SERVER}}";
echo "::set-env name=RUSEFI_BUILD_FTP_USER::${{secrets.RUSEFI_BUILD_FTP_USER}}";
echo "::set-env name=RUSEFI_BUILD_FTP_PASS::${{secrets.RUSEFI_BUILD_FTP_PASS}}";
fi
- name: Build Primary Bundle
run: OS="Windows_NT" bash misc/jenkins/functional_test_and_build_bundle/build_current_bundle.sh
- name: Package Bundle
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
run: bash misc/jenkins/compile_other_versions/prepare_bundle.sh default
- name: Attach console junit results
if: always()
uses: actions/upload-artifact@v2
with:
name: console primary junit
path: ./java_console/build/*.txt
- name: Upload primary bundle
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
uses: actions/upload-artifact@v2
with:
name: rusefi_bundle.zip
path: ./artifacts/rusefi_bundle.zip