From c838539c2eeba993d9abce5ed389b51d3ffa8a31 Mon Sep 17 00:00:00 2001 From: Matthew Kennedy Date: Sun, 31 Jan 2021 14:35:12 -0800 Subject: [PATCH] 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 --- .../workflows/hardware-ci-f4-discovery.yaml | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/hardware-ci-f4-discovery.yaml diff --git a/.github/workflows/hardware-ci-f4-discovery.yaml b/.github/workflows/hardware-ci-f4-discovery.yaml new file mode 100644 index 0000000000..829b078d1c --- /dev/null +++ b/.github/workflows/hardware-ci-f4-discovery.yaml @@ -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