Repository navigation
87 lines (72 loc) · 2.5 KB
/
Copy pathci.yml
File metadata and controls
87 lines (72 loc) · 2.5 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
name: CI
on:
pull_request:
paths-ignore:
- "**/README.md"
merge_group:
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Cancel any currently running workflows from the same PR or merge queue
# entry 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:
# --------------------------------------------------------------------------
# Packages are grouped by the target they build for, so that each runner only
# has to install a single toolchain. All Xtensa packages share a group, since
# the Xtensa toolchain covers every Xtensa chip and is expensive to install.
check:
name: check (${{ matrix.build.name }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
build:
- name: xtensa
arch: xtensa
packages: "esp32 esp32s2 esp32s3"
- name: riscv32imc
arch: riscv
target: riscv32imc-unknown-none-elf
packages: "esp32c2 esp32c3 esp32s2-ulp esp32s3-ulp"
- name: riscv32imac
arch: riscv
target: riscv32imac-unknown-none-elf
packages: "esp32c5 esp32c6 esp32c61 esp32h2 esp32c6-lp"
- name: riscv32imafc
arch: riscv
target: riscv32imafc-unknown-none-elf
packages: "esp32p4 esp32s31"
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/check
with:
msrv: "1.76.0"
packages: ${{ matrix.build.packages }}
arch: ${{ matrix.build.arch }}
target: ${{ matrix.build.target }}
# --------------------------------------------------------------------------
# This is the only job that should be marked as a required status check.
# Every other job must be listed in `needs` so that adding, removing or
# renaming a job never requires touching the branch protection settings.
ci:
name: CI
runs-on: ubuntu-latest
if: always()
needs:
- check
steps:
- name: Check that all jobs succeeded
env:
RESULTS: ${{ toJSON(needs) }}
run: |
echo "$RESULTS" | jq -r 'to_entries[] | "\(.key): \(.value.result)"'
if echo "$RESULTS" | jq -e 'any(.[].result; . != "success")' > /dev/null; then
echo "::error::One or more jobs did not succeed"
exit 1
fi