Skip to content

Commit

Permalink
Run HIL tests as part of PR checks (#1959)
Browse files Browse the repository at this point in the history
* Run HIL tests as part of PR checks

* Cancel pending HIL runs

* Only run for ready PRs
  • Loading branch information
bugadani authored Aug 20, 2024
1 parent 41f9925 commit 686037b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 45 deletions.
45 changes: 0 additions & 45 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,48 +164,3 @@ jobs:

# Check the formatting of all packages:
- run: cargo xtask fmt-packages --check

# --------------------------------------------------------------------------
# Tests

hil:
name: HIL Test | ${{ matrix.target.soc }}
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
target:
# RISC-V devices:
- soc: esp32c2
rust-target: riscv32imc-unknown-none-elf
- soc: esp32c3
rust-target: riscv32imc-unknown-none-elf
- soc: esp32c6
rust-target: riscv32imac-unknown-none-elf
- soc: esp32h2
rust-target: riscv32imac-unknown-none-elf
# Xtensa devices:
- soc: esp32
- soc: esp32s2
- soc: esp32s3

steps:
- uses: actions/checkout@v4

# Install the Rust toolchain for RISC-V devices:
- if: ${{ !contains(fromJson('["esp32", "esp32s2", "esp32s3"]'), matrix.target.soc) }}
uses: dtolnay/rust-toolchain@v1
with:
target: ${{ matrix.target.rust-target }}
toolchain: stable
components: rust-src
# Install the Rust toolchain for Xtensa devices:
- if: contains(fromJson('["esp32", "esp32s2", "esp32s3"]'), matrix.target.soc)
uses: esp-rs/[email protected]
with:
buildtargets: ${{ matrix.target.soc }}
ldproxy: false

- uses: Swatinem/rust-cache@v2
- run: cargo xtask build-tests ${{ matrix.target.soc }}
10 changes: 10 additions & 0 deletions .github/workflows/hil.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: HIL

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
merge_group:
workflow_dispatch:
inputs:
Expand All @@ -13,6 +15,14 @@ on:
required: true
default: "main"

# 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 }}

env:
CARGO_TERM_COLOR: always
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit 686037b

Please sign in to comment.