Create an issue when nightly-ci fails #177
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: CI - nightly | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 0 * * *" | ||
env: | ||
CARGO_TERM_COLOR: always | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
RUSTDOCFLAGS: -Dwarnings | ||
DEFMT_LOG: trace | ||
jobs: | ||
esp-hal-nightly: | ||
name: esp-hal | nightly (${{ matrix.device.soc }}) | ||
runs-on: ubuntu-latest | ||
env: | ||
SSID: SSID | ||
PASSWORD: PASSWORD | ||
STATIC_IP: 1.1.1.1 | ||
GATEWAY_IP: 1.1.1.1 | ||
HOST_IP: 1.1.1.1 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
device: [ | ||
# RISC-V devices: | ||
{ soc: "esp32c2", target: "riscv32imc-unknown-none-elf" }, | ||
{ soc: "esp32c3", target: "riscv32imc-unknown-none-elf" }, | ||
{ soc: "esp32c6", target: "riscv32imac-unknown-none-elf" }, | ||
{ soc: "esp32h2", target: "riscv32imac-unknown-none-elf" }, | ||
] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
# Install the Rust nightly toolchain for RISC-V devices: | ||
- uses: dtolnay/rust-toolchain@v1 | ||
with: | ||
target: riscv32imc-unknown-none-elf,riscv32imac-unknown-none-elf | ||
toolchain: nightly | ||
components: rust-src, clippy, rustfmt | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: Build and Check | ||
uses: ./.github/actions/check-esp-hal | ||
with: | ||
device: ${{ matrix.device.soc }} | ||
target: ${{ matrix.device.target }} | ||
toolchain: nightly | ||
create-issue-on-failure: | ||
name: Create Issue on Failure | ||
runs-on: ubuntu-latest | ||
needs: esp-hal-nightly | ||
if: failure() | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 # Ensures the repo is cloned before accessing the issue template | ||
- name: Create GitHub Issue | ||
uses: JasonEtco/create-an-issue@v2 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
update_existing: true |