rusefi-1/.github/workflows/hardware-ci-f4-discovery.yaml

54 lines
1.5 KiB
YAML

name: Firmware Hardware CI (F4 Discovery)
on: [push, pull_request]
jobs:
build-firmware:
runs-on: hw-ci-f4-discovery
steps:
- uses: actions/checkout@v1
with:
submodules: recursive
- name: Identify Agent
run: uname -a
- name: Generate Configs
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 Default config
working-directory: ./firmware/
run: bash gen_config_default.sh
- 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: Build Firmware
working-directory: ./firmware
run: make -j16 EXTRA_PARAMS="-DHARDWARE_CI"
- 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"
# This both compiles and runs HW CI tests
- name: Run Hardware CI
working-directory: ./java_console
run: ant hardware_ci_f4_discovery