# # https://github.com/rusefi/rusefi/wiki/Dev-Quality-Control#hardware-continuous-integration # name: HW CI on: [push, pull_request] jobs: hardware-ci: strategy: # Let all builds finish even if one fails early fail-fast: false matrix: build-target: [f407-discovery, #proteus F7 HW CI is not 100% reliable #6002 proteus_f7, proteus_f4] include: - build-target: f407-discovery runs-on: hw-ci-f4-discovery # see HwCiF4Discovery.java or https://github.com/rusefi/rusefi/wiki/Dev-Quality-Control#stm32f407g-disc1 for wiring documentation test-suite: com.rusefi.HwCiF4Discovery folder: config/boards/f407-discovery openocd-script: .github/workflows/openocd_ci_f4_discovery.cfg serial-device: /dev/serial/by-id/usb-rusEFI_LLC_rusEFI_Engine_Management_ECU_2B003B000A51343033393930-if01 vbatt_supply: 12 stlink-serial: H?u\x06geVQ2S\x08g - build-target: proteus_f4 runs-on: hw-ci-proteus # see HwCiProteus which would point you at ProteusAnalogTest.java for wiring documentation test-suite: com.rusefi.HwCiProteus folder: config/boards/proteus openocd-script: .github/workflows/openocd_ci_proteus_f4.cfg serial-device: /dev/serial/by-id/usb-rusEFI_LLC_rusEFI_Engine_Management_ECU_41003D000451383037343335-if01 vbatt_supply: 12 stlink-serial: 004D00323137511133333639 # - build-target: proteus_f7 # runs-on: hw-ci-proteus-f7 # test-suite: com.rusefi.HwCiProteus # folder: config/boards/proteus # openocd-script: ../.github/workflows/openocd_ci_proteus_f7.cfg # serial-device: /dev/serial/by-id/usb-rusEFI_LLC_rusEFI_Engine_Management_ECU_38002D0005504B4634303120-if01 # # let's power Proteus from same DC adapter as Nuc PC # vbatt_supply: 12 runs-on: ${{matrix.runs-on}} steps: - uses: actions/setup-java@v4 with: distribution: 'zulu' java-version: '11' - uses: actions/checkout@v4 - name: Checkout Submodules run: | git submodule update --init --depth=1 .github/workflows/hw-ci/gethla 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/ext/openblt git submodule update --init --depth=1 firmware/controllers/lua/luaaa git submodule update --init --depth=1 firmware/controllers/can/wideband_firmware git submodule update --init --depth=1 java_console/peak-can-basic - name: Identify Agent run: | uname -a hostname - name: Acquire GCC uses: carlosperate/arm-none-eabi-gcc-action@v1 with: release: '12.3.Rel1' # Make sure the compiler works - name: Test/Identify Compiler run: arm-none-eabi-gcc -v - name: Build Firmware run: .github/workflows/hw-ci/build_for_hw_ci.sh ${{matrix.folder}} ${{matrix.build-target}} - name: Show USB status run: | lsusb -vvv - name: Check for STLINK run: lsusb | grep -i "st-\?link" # - name: Install tools # run: | # sudo apt-get install openocd libusb-1.0 # # - name: Build gethla # working-directory: .github/workflows/hw-ci/gethla # run: bash build.sh # # - name: List STLINK serials # working-directory: .github/workflows/hw-ci/gethla # run: ./gethla # ls -l /dev/serial/by-id/ # we specify power supply voltage to share power supply between NUC and ECU under test # java automated test suite picks ECU based on specified serial - name: Set EXTRA env run: | if [ "$(hostname)" == "rusefi-hw-ci-2" -o "$(hostname)" == "mck1117-github-actions-nuc" ]; then echo "HARDWARE_CI_SERIAL_DEVICE=${{matrix.serial-device}}" >> $GITHUB_ENV echo "HARDWARE_CI_VBATT=${{matrix.vbatt_supply}}" >> $GITHUB_ENV else cat $GITHUB_WORKSPACE/../../../rusefi-env >> $GITHUB_ENV fi - name: OpenOCD wipe & flash STM32 run: | if [ "$(hostname)" == "rusefi-hw-ci-2" -o "$(hostname)" == "mck1117-github-actions-nuc" ]; then (cat ${{matrix.openocd-script}}; echo "hla_serial ${{matrix.stlink-serial}}") \ | .github/workflows/hw-ci/openocd_wipe_and_flash.sh else (cat ${{matrix.openocd-script}}; echo "hla_serial $HARDWARE_CI_STLINK_SERIAL") \ | .github/workflows/hw-ci/openocd_wipe_and_flash.sh fi - name: Upload build bin artifact uses: actions/upload-artifact@v4 with: name: rusefi_hw-ci-${{matrix.build-target}}.bin path: ./firmware/build/rusefi*.bin # This both compiles and runs HW CI tests - name: Run Hardware CI run: .github/workflows/hw-ci/run_hw_ci.sh ${{matrix.test-suite}}