Improve HIL #449
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
repository: ${{ github.event.inputs.repository || github.repository }} | |
ref: ${{ github.event.inputs.branch || github.ref }} | |
- uses: ./.github/actions/setup-target | |
with: | |
arch: x86_64 | |
target: x86_64-unknown-linux-gnu | |
- name: Build espflash | |
run: 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: | |
name: ${{ matrix.board.mcu }}${{ matrix.board.freq }} | |
if: github.repository_owner == 'esp-rs' | |
needs: build-espflash | |
runs-on: [self-hosted, linux, x64, "${{ matrix.board.mcu }}${{ matrix.board.freq }}"] | |
strategy: | |
matrix: | |
board: | |
- mcu: esp32 | |
- mcu: esp32c2 | |
freq: -26mhz | |
flag: -x 26mhz | |
- mcu: esp32c3 | |
- mcu: esp32c6 | |
- mcu: esp32h2 | |
- mcu: esp32s2 | |
- mcu: esp32s3 | |
fail-fast: false | |
env: | |
ESPFLASH_PORT: /dev/serial_ports/${{ matrix.board.mcu }} | |
ESPFLASH_APP: espflash/tests/data/${{ matrix.board.mcu }} | |
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: bash espflash/tests/scripts/board-info.sh | |
- name: flash test | |
run: bash espflash/tests/scripts/flash.sh ${{ env.ESPFLASH_APP }} | |
- name: monitor test | |
run: bash espflash/tests/scripts/monitor.sh | |
- name: erase-flash test | |
run: bash espflash/tests/scripts/erase-flash.sh | |
- name: save-image/write-bin test | |
run: | | |
bash espflash/tests/scripts/save-image_write-bin.sh ${{ matrix.board.mcu }} ${{ env.ESPFLASH_APP }} | |
bash espflash/tests/scripts/monitor.sh | |
- name: erase-region test | |
run: bash espflash/tests/scripts/erase-region.sh | |
- name: hold-in-reset test | |
run: bash espflash/tests/scripts/hold-in-reset.sh | |
- name: reset test | |
run: bash espflash/tests/scripts/reset.sh | |
- name: checksum-md5 test | |
run: bash espflash/tests/scripts/checksum-md5.sh |