hardware CI on github actions (#2252)

* test

* test

* s

* s

* g2 not g3

* s

* s

* use new pool

* identify step

* rename build

* clean first

* kick the hive

* apparently I have old openocd

* poke

* s

* s

* what if we force a port

* oh come on java

* that's all good now

* Revert "what if we force a port"

This reverts commit 64165ecf39c534bd6d4a54aa676be132760118d7.

* simplify

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
This commit is contained in:
Matthew Kennedy 2021-01-31 14:35:12 -08:00 committed by GitHub
parent dc7b94fe6c
commit c838539c2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 53 additions and 0 deletions

View File

@ -0,0 +1,53 @@
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
- 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 real_hardware_functional_test