This repository has been archived by the owner on Jul 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
88 lines (76 loc) · 2.4 KB
/
ci.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: CI
on:
pull_request:
paths-ignore:
- "**/README.md"
push:
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, 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 }}
jobs:
# --------------------------------------------------------------------------
# Check Packages
xtensa-lx:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: esp-rs/[email protected]
with:
default: true
ldproxy: false
- uses: Swatinem/rust-cache@v2
# Build the 'xtensa-lx' package:
- name: check (no features)
run: cd xtensa-lx/ && cargo build
- name: check (all features)
run: cd xtensa-lx/ && cargo build --features=spin
# xtensa-lx-rt:
# runs-on: ubuntu-latest
#
# strategy:
# fail-fast: false
# matrix:
# chip: ["esp32", "esp32s2", "esp32s3"]
#
# steps:
# - uses: actions/checkout@v4
# - uses: esp-rs/[email protected]
# with:
# default: true
# ldproxy: false
# - uses: Swatinem/rust-cache@v2
#
# # Build the 'xtensa-lx-rt' package:
# - name: check (${{ matrix.chip }}, no features)
# run: cd xtensa-lx-rt/ && cargo build --features=${{ matrix.chip }}
# - name: check (${{ matrix.chip }}, all features)
# run: cd xtensa-lx-rt/ && cargo build --features=${{ matrix.chip }},float-save-restore
# --------------------------------------------------------------------------
# Lint
rustfmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Some of the configuration items in 'rustfmt.toml' require the 'nightly'
# release channel:
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: nightly
components: rustfmt
- uses: Swatinem/rust-cache@v2
# Check the formatting of all packages:
- name: rustfmt (xtensa-lx)
run: cargo fmt --all --manifest-path=xtensa-lx/Cargo.toml -- --check
- name: rustfmt (xtensa-lx-rt)
run: cargo fmt --all --manifest-path=xtensa-lx-rt/Cargo.toml -- --check