2021-07-24 13:23:03 -07:00
|
|
|
name: HW CI
|
2021-01-31 14:35:12 -08:00
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build-firmware:
|
2021-06-21 05:56:23 -07:00
|
|
|
strategy:
|
|
|
|
# Let all builds finish even if one fails early
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2022-12-21 17:33:37 -08:00
|
|
|
build-target: [f407-discovery, proteus_f4]
|
2021-06-21 05:56:23 -07:00
|
|
|
|
|
|
|
include:
|
2022-12-21 17:33:37 -08:00
|
|
|
- build-target: f407-discovery
|
|
|
|
runs-on: hw-ci-f4-discovery
|
2023-01-23 09:19:21 -08:00
|
|
|
test-suite: com.rusefi.HwCiF4Discovery
|
2023-02-06 04:37:17 -08:00
|
|
|
folder: config/boards/f407-discovery
|
2022-12-21 17:33:37 -08:00
|
|
|
openocd-script: ../.github/workflows/openocd_ci_f4_discovery.cfg
|
|
|
|
serial-device: /dev/serial/by-id/usb-rusEFI_LLC_rusEFI_Engine_Management_ECU_2B003B000A51343033393930-if01
|
2021-06-21 05:56:23 -07:00
|
|
|
|
2022-10-17 12:36:02 -07:00
|
|
|
- build-target: proteus_f4
|
|
|
|
runs-on: hw-ci-proteus
|
2023-01-23 09:19:21 -08:00
|
|
|
test-suite: com.rusefi.HwCiF4Proteus
|
2023-02-06 04:37:17 -08:00
|
|
|
folder: config/boards/proteus
|
2022-12-21 09:46:25 -08:00
|
|
|
openocd-script: ../.github/workflows/openocd_ci_proteus.cfg
|
|
|
|
serial-device: /dev/serial/by-id/usb-rusEFI_LLC_rusEFI_Engine_Management_ECU_41003D000451383037343335-if01
|
2021-06-21 05:56:23 -07:00
|
|
|
|
|
|
|
runs-on: ${{matrix.runs-on}}
|
2021-01-31 14:35:12 -08:00
|
|
|
|
|
|
|
steps:
|
2023-07-02 15:51:45 -07:00
|
|
|
- uses: actions/setup-java@v3
|
|
|
|
with:
|
|
|
|
distribution: 'zulu'
|
|
|
|
java-version: '11'
|
|
|
|
|
2022-07-27 02:47:07 -07:00
|
|
|
- uses: actions/checkout@v3
|
2023-01-29 01:43:27 -08:00
|
|
|
|
|
|
|
- name: Checkout Submodules
|
|
|
|
run: |
|
|
|
|
git submodule update --init --depth=1 firmware/ChibiOS
|
|
|
|
git submodule update --init --depth=1 firmware/ChibiOS-Contrib
|
|
|
|
git submodule update --init --depth=1 firmware/libfirmware
|
|
|
|
git submodule update --init --depth=1 firmware/ext/lua
|
|
|
|
git submodule update --init --depth=1 firmware/ext/uzlib
|
|
|
|
git submodule update --init --depth=1 firmware/controllers/lua/luaaa
|
|
|
|
git submodule update --init --depth=1 firmware/controllers/can/wideband_firmware
|
2021-01-31 14:35:12 -08:00
|
|
|
|
|
|
|
- name: Identify Agent
|
|
|
|
run: uname -a
|
|
|
|
|
2023-06-25 08:03:46 -07:00
|
|
|
- name: Acquire GCC
|
|
|
|
working-directory: ./firmware/
|
|
|
|
run: ./provide_gcc.sh
|
|
|
|
|
2022-10-17 12:36:02 -07:00
|
|
|
- name: Add compiler to PATH
|
2023-06-25 08:03:46 -07:00
|
|
|
run: echo "${GITHUB_WORKSPACE}/firmware/gcc-arm-none-eabi/bin" >> $GITHUB_PATH
|
2022-10-17 12:36:02 -07:00
|
|
|
|
2021-01-31 14:35:12 -08:00
|
|
|
# Make sure the compiler works
|
2022-10-17 12:36:02 -07:00
|
|
|
- name: Test/Identify Compiler
|
2021-01-31 14:35:12 -08:00
|
|
|
run: arm-none-eabi-gcc -v
|
|
|
|
|
|
|
|
- name: Build Firmware
|
2023-07-03 21:05:54 -07:00
|
|
|
run: .github/workflows/hw-ci/build_for_hw_ci.sh ${{matrix.folder}} ${{matrix.build-target}}
|
2021-01-31 14:35:12 -08:00
|
|
|
|
2021-07-24 13:23:32 -07:00
|
|
|
- name: Check for STLINK
|
2021-07-24 13:54:44 -07:00
|
|
|
run: lsusb | grep 'ST-LINK\|STLINK'
|
2021-07-24 13:23:32 -07:00
|
|
|
|
2021-01-31 14:35:12 -08:00
|
|
|
- name: OpenOCD wipe & flash STM32
|
2023-07-04 06:49:16 -07:00
|
|
|
run: .github/workflows/hw-ci/openocd_wipe_and_flash.sh ${{matrix.openocd-script}}
|
2021-01-31 14:35:12 -08:00
|
|
|
|
2023-01-23 09:19:21 -08:00
|
|
|
- name: Generate Autotest Jar
|
|
|
|
working-directory: ./java_tools
|
|
|
|
run: ./gradlew :autotest:shadowJar
|
|
|
|
|
2023-07-03 21:05:54 -07:00
|
|
|
- name: Set EXTRA env
|
|
|
|
run: |
|
|
|
|
echo "HARDWARE_CI_SERIAL_DEVICE=${{matrix.serial-device}}" >> $GITHUB_ENV
|
|
|
|
|
2021-01-31 14:35:12 -08:00
|
|
|
# This both compiles and runs HW CI tests
|
|
|
|
- name: Run Hardware CI
|
2023-07-04 08:20:02 -07:00
|
|
|
run: java -cp java_console/autotest/build/libs/autotest-all.jar ${{matrix.test-suite}}
|
2022-05-25 10:52:35 -07:00
|
|
|
|