-
Notifications
You must be signed in to change notification settings - Fork 262
71 lines (61 loc) · 2.18 KB
/
ci_nightly.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
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
- name: Create or Update GitHub Issue
if: failure()
run: |
sudo apt-get install gh -y
ISSUE_NAME=$(gh issue list --state open --search "Nightly CI Failure in:title" --json number --jq '.[0].number')
if [[ -n "$ISSUE_NAME" ]]; then
gh issue comment "$ISSUE_NAME" \
--body "Another CI failure detected! [View the failed job](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})."
else
gh issue create \
--title "Nightly CI Failure" \
--body "Nightly CI Workflow Failed! [View the failed job](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})." \
--label "ci-nightly"
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}