Skip to content

add --monitor option to write-bin #608

add --monitor option to write-bin

add --monitor option to write-bin #608

Workflow file for this run

name: HIL
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
merge_group:
workflow_dispatch:
inputs:
repository:
description: "Owner and repository to test"
required: true
default: "esp-rs/espflash"
branch:
description: "Branch, tag or SHA to checkout."
required: true
default: "main"
env:
CARGO_TERM_COLOR: always
# Cancel any currently running workflows from the same PR, branch, or
# tag when a new workflow is triggered.
#
# https://stackoverflow.com/a/66336834
concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
jobs:
build-espflash:
name: Build espflash
runs-on: ubuntu-22.04
container:
image: ubuntu:20.04
steps:
- uses: actions/checkout@v4
with:
repository: ${{ github.event.inputs.repository || github.repository }}
ref: ${{ github.event.inputs.branch || github.ref }}
- name: Install dependencies
env:
DEBIAN_FRONTEND: noninteractive
run: apt-get update && apt-get -y install curl musl-tools pkg-config
- name: Install toolchain
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
- name: Build espflash
run: $HOME/.cargo/bin/cargo build --release
working-directory: espflash
- uses: actions/upload-artifact@v4
with:
name: espflash
path: target/release/espflash
if-no-files-found: error
run-target:
if: github.repository_owner == 'esp-rs'
name: ${{ matrix.board.mcu }}${{ matrix.board.freq }}
needs: build-espflash
runs-on:
[
self-hosted,
linux,
x64,
"${{ matrix.board.mcu }}${{ matrix.board.freq }}",
]
env:
ESPFLASH_PORT: /dev/serial_ports/${{ matrix.board.mcu }}
strategy:
fail-fast: false
matrix:
board:
- mcu: esp32
- mcu: esp32c2
freq: -26mhz
flag: -x 26mhz
- mcu: esp32c3
- mcu: esp32c6
- mcu: esp32h2
- mcu: esp32s2
- mcu: esp32s3
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: espflash
path: espflash_app
- name: Set up espflash binary
run: |
chmod +x espflash_app/espflash
echo "$PWD/espflash_app" >> "$GITHUB_PATH"
- name: board-info test
run: timeout 10 bash espflash/tests/scripts/board-info.sh
- name: flash test
run: timeout 25 bash espflash/tests/scripts/flash.sh ${{ matrix.board.mcu }}
- name: monitor test
run: timeout 10 bash espflash/tests/scripts/monitor.sh
- name: erase-flash test
run: timeout 60 bash espflash/tests/scripts/erase-flash.sh
- name: save-image/write-bin test
run: |
timeout 60 bash espflash/tests/scripts/save-image_write-bin.sh ${{ matrix.board.mcu }}
timeout 10 bash espflash/tests/scripts/monitor.sh
- name: erase-region test
run: timeout 10 bash espflash/tests/scripts/erase-region.sh
- name: hold-in-reset test
run: timeout 5 bash espflash/tests/scripts/hold-in-reset.sh
- name: reset test
run: timeout 5 bash espflash/tests/scripts/reset.sh
- name: checksum-md5 test
run: timeout 40 bash espflash/tests/scripts/checksum-md5.sh
- name: list-ports test
run: timeout 10 bash espflash/tests/scripts/list-ports.sh
- name: write-bin test
run: timeout 20 bash espflash/tests/scripts/write-bin.sh