2019-11-20 20:34:55 -08:00
|
|
|
name: Firmware CI
|
|
|
|
|
|
|
|
on: [push,pull_request]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
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.
|
2019-12-05 17:25:23 -08:00
|
|
|
build-target: [frankenso, frankenso-pal, mre-f4, mre-f7, prometheus-405, prometheus-469, proteus, kinetis]
|
2019-11-20 20:34:55 -08:00
|
|
|
build-type: [debug, release]
|
|
|
|
|
|
|
|
include:
|
|
|
|
# Board configurations
|
|
|
|
- build-target: frankenso
|
|
|
|
efi-cpu: ARCH_STM32F4
|
|
|
|
efi-board: st_stm32f4
|
|
|
|
|
2019-12-05 17:25:23 -08:00
|
|
|
- build-target: frankenso-pal
|
|
|
|
efi-cpu: ARCH_STM32F4
|
|
|
|
efi-board: st_stm32f4
|
2019-12-05 18:10:29 -08:00
|
|
|
target-extra-params: -DHAL_TRIGGER_USE_PAL=TRUE -DHAL_USE_ICU=FALSE -DEFI_VEHICLE_SPEED=FALSE -DEFI_LOGIC_ANALYZER=FALSE
|
2019-12-05 17:25:23 -08:00
|
|
|
|
2019-11-20 20:34:55 -08:00
|
|
|
- build-target: mre-f4
|
|
|
|
efi-cpu: ARCH_STM32F4
|
|
|
|
efi-board: microrusefi
|
|
|
|
|
|
|
|
- build-target: mre-f7
|
|
|
|
efi-cpu: ARCH_STM32F7
|
|
|
|
efi-board: microrusefi
|
|
|
|
|
2019-11-28 23:39:30 -08:00
|
|
|
- build-target: prometheus-405
|
|
|
|
efi-cpu: ARCH_STM32F4
|
|
|
|
efi-board: prometheus/f405
|
|
|
|
|
|
|
|
- build-target: prometheus-469
|
|
|
|
efi-cpu: ARCH_STM32F4
|
|
|
|
efi-board: prometheus/f469
|
|
|
|
|
2019-12-02 20:54:40 -08:00
|
|
|
- build-target: proteus
|
|
|
|
efi-cpu: ARCH_STM32F7
|
|
|
|
efi-board: proteus
|
|
|
|
|
2019-12-04 05:48:51 -08:00
|
|
|
- build-target: kinetis
|
|
|
|
efi-cpu: kinetis
|
|
|
|
efi-board: kinetis
|
2019-12-05 18:04:24 -08:00
|
|
|
target-extra-params: -DCPU_MKE16F512VLH16 -DCPU_MKE16F512VLH16_cm4 -D__USE_CMSI -DDEFAULT_ENGINE_TYPE=MINIMAL_PINS
|
2019-12-04 12:16:26 -08:00
|
|
|
extra-options: USE_FATFS=no USE_BOOTLOADER=no
|
2019-12-04 05:48:51 -08:00
|
|
|
|
2019-11-20 20:34:55 -08:00
|
|
|
# Debug vs. release configuration
|
|
|
|
- build-type: debug
|
2019-12-05 18:04:24 -08:00
|
|
|
type-extra-params: -DDUMMY
|
2019-11-20 20:34:55 -08:00
|
|
|
build-debug-level-opt: -O0 -ggdb -g3
|
|
|
|
|
|
|
|
- build-type: release
|
2019-12-05 18:04:24 -08:00
|
|
|
type-extra-params: -DEFI_ENABLE_ASSERTS=FALSE -DCH_DBG_ENABLE_TRACE=FALSE -DCH_DBG_ENABLE_ASSERTS=FALSE -DCH_DBG_ENABLE_STACK_CHECK=FALSE -DCH_DBG_FILL_THREADS=FALSE -DCH_DBG_THREADS_PROFILING=FALSE
|
2019-11-20 20:34:55 -08:00
|
|
|
build-debug-level-opt: -O2 -ggdb -g3
|
2019-12-04 12:16:26 -08:00
|
|
|
|
2020-02-04 18:30:45 -08:00
|
|
|
# We don't need debug builds for every board...
|
2019-12-04 12:16:26 -08:00
|
|
|
exclude:
|
2020-02-04 18:30:45 -08:00
|
|
|
- build-target: frankenso-pal
|
|
|
|
build-type: debug
|
|
|
|
- build-target: mre-f4
|
|
|
|
build-type: debug
|
|
|
|
- build-target: mre-f7
|
|
|
|
build-type: debug
|
|
|
|
- build-target: prometheus-405
|
|
|
|
build-type: debug
|
|
|
|
- build-target: prometheus-469
|
|
|
|
build-type: debug
|
|
|
|
- build-target: proteus
|
|
|
|
build-type: debug
|
2019-12-04 12:16:26 -08:00
|
|
|
- build-target: kinetis
|
|
|
|
build-type: debug
|
|
|
|
|
2019-11-20 20:34:55 -08:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
|
|
|
|
# Build machines don't have arm-none-eabi gcc, so let's download it and put it on the path
|
|
|
|
- name: Download & Install GCC
|
2020-02-06 16:18:35 -08:00
|
|
|
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-2019-q4-major-x86_64-linux.tar.xz' -O compiler.tar.xz
|
|
|
|
tar -xvf compiler.tar.xz
|
2019-11-20 20:34:55 -08:00
|
|
|
echo "::add-path::`pwd`/gcc-arm-none-eabi-9-2019-q4-major/bin"
|
|
|
|
|
|
|
|
# Make sure the compiler we just downloaded works - just print out the version
|
|
|
|
- name: Test Compiler
|
|
|
|
run: arm-none-eabi-gcc -v
|
|
|
|
|
|
|
|
# Build the firmware!
|
|
|
|
- name: Build Firmware
|
|
|
|
working-directory: ./firmware/
|
2019-12-05 18:04:24 -08:00
|
|
|
run: make -j4 PROJECT_BOARD=${{matrix.efi-board}} PROJECT_CPU=${{matrix.efi-cpu}} EXTRA_PARAMS="${{matrix.type-extra-params}} ${{matrix.target-extra-params}}" DEBUG_LEVEL_OPT='${{matrix.build-debug-level-opt}}' ${{matrix.extra-options}}
|
2019-11-20 20:34:55 -08:00
|
|
|
|
|
|
|
# The next two steps upload the bin and elf as build artifacts
|
|
|
|
- name: Upload elf
|
|
|
|
uses: actions/upload-artifact@v1
|
|
|
|
with:
|
|
|
|
name: firmware-${{matrix.build-target}}-${{matrix.build-type}}-elf
|
|
|
|
path: ./firmware/build/rusefi.elf
|
|
|
|
|
|
|
|
- name: Upload bin
|
|
|
|
uses: actions/upload-artifact@v1
|
|
|
|
with:
|
|
|
|
name: firmware-${{matrix.build-target}}-${{matrix.build-type}}-bin
|
|
|
|
path: ./firmware/build/rusefi.bin
|