mirror of https://github.com/rusefi/rusefi-1.git
83 lines
2.3 KiB
YAML
83 lines
2.3 KiB
YAML
name: HW CI
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
build-firmware:
|
|
strategy:
|
|
# Let all builds finish even if one fails early
|
|
fail-fast: false
|
|
matrix:
|
|
build-target: [f4-disco, proteus]
|
|
|
|
include:
|
|
- build-target: f4-disco
|
|
script: hardware_ci_f4_discovery
|
|
runs-on: hw-ci-f4-discovery
|
|
folder: f407-discovery
|
|
config-name: all
|
|
|
|
- build-target: proteus_f4
|
|
script: hardware_ci_proteus
|
|
runs-on: hw-ci-proteus
|
|
folder: proteus
|
|
config-name: proteus_f4
|
|
|
|
runs-on: ${{matrix.runs-on}}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Identify Agent
|
|
run: uname -a
|
|
|
|
- name: Generate Configs for HW CI
|
|
working-directory: ./firmware/
|
|
run: bash gen_config_default.sh
|
|
|
|
- name: Generate Enum Strings
|
|
working-directory: ./firmware/
|
|
run: bash gen_enum_to_string.sh
|
|
|
|
- name: Generate Board config
|
|
working-directory: ./firmware/
|
|
run: bash gen_config_board.sh ${{matrix.folder}} ${{matrix.config-name}}
|
|
|
|
- name: Generate Live Documentation
|
|
working-directory: ./firmware/
|
|
run: bash gen_live_documentation.sh
|
|
|
|
# Make sure the compiler works
|
|
- name: Test Compiler
|
|
run: arm-none-eabi-gcc -v
|
|
|
|
# We aren't guaranteed a clean machine every time, so manually clean the output
|
|
- name: Clean Build
|
|
working-directory: ./firmware
|
|
run: make clean
|
|
|
|
- name: Set EXTRA env
|
|
run: echo "EXTRA_2_PARAMS=-DHARDWARE_CI" >> $GITHUB_ENV
|
|
|
|
- name: Build Firmware
|
|
working-directory: ./firmware
|
|
run: make -j6 PROJECT_BOARD=${{matrix.folder}}
|
|
|
|
- name: Check for STLINK
|
|
run: lsusb | grep 'ST-LINK\|STLINK'
|
|
|
|
- name: OpenOCD wipe & flash STM32
|
|
working-directory: ./firmware
|
|
run: openocd -f "interface/stlink.cfg" -f "target/stm32f4x.cfg" -c init -c targets -c "reset halt" -c "flash erase_sector 0 0 11" -c "flash write_image "build/rusefi.bin" 0x08000000" -c "reset run" -c "shutdown"
|
|
|
|
- name: Generate Java (Antlr)
|
|
working-directory: ./java_tools/configuration_definition
|
|
run: ant antlr
|
|
|
|
# This both compiles and runs HW CI tests
|
|
- name: Run Hardware CI
|
|
working-directory: ./java_console
|
|
run: ant ${{matrix.script}}
|