Repository navigation
123 lines (108 loc) · 3.14 KB
/
Copy pathci-nightly.yml
File metadata and controls
123 lines (108 loc) · 3.14 KB
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
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:
chips:
runs-on: ubuntu-latest
outputs:
riscv: ${{ steps.resolve.outputs.riscv }}
xtensa: ${{ steps.resolve.outputs.xtensa }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 1
- id: resolve
run: |
for arch in riscv xtensa; do
echo "$arch=$(jq -c --arg a "$arch" \
'[.[] | select(.arch == $a) | .soc]' .github/chips.json)" >> "$GITHUB_OUTPUT"
done
esp-hal-riscv-nightly:
name: esp-hal | nightly (${{ matrix.device }})
needs: chips
runs-on: ubuntu-latest
env:
CI: 1
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: ${{ fromJSON(needs.chips.outputs.riscv) }}
steps:
- uses: actions/checkout@v6
# Install the Rust nightly toolchain for RISC-V devices:
- uses: ./.github/actions/setup-nightly
with:
targets: all
components: rust-src, clippy, rustfmt
alias: "true"
- name: Build and Check
shell: bash
run: cargo xtask ci ${{ matrix.device }} --toolchain nightly
esp-hal-xtensa-clippy:
name: esp-hal | xtensa clippy (${{ matrix.device }})
needs: chips
runs-on: ubuntu-latest
env:
CI: 1
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: ${{ fromJSON(needs.chips.outputs.xtensa) }}
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/setup-toolchains
with:
xtensa: "true"
- name: Lint esp-hal on Xtensa chip
run: cargo xtask lint ${{ matrix.device }} --toolchain esp
check-global-symbols:
name: Check Global Symbols in esp-hal
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/setup-toolchains
with:
xtensa: "true"
# Check all chips at once only for esp-hal
- name: Run check-global-symbols
run: cargo xtask check-global-symbols
create-issue:
name: Create GitHub Issue if any job failed
runs-on: ubuntu-latest
needs:
[
chips,
esp-hal-riscv-nightly,
esp-hal-xtensa-clippy,
check-global-symbols,
]
if: ${{ failure() }}
steps:
- uses: actions/checkout@v6
- 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 [[ -z "$ISSUE_NAME" ]];
then
gh issue create \
--title "Nightly CI Failure" \
--body "One or more jobs failed! [View the failed workflow](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})." \
--assignee JurajSadel
fi