forked from rust-embedded/rust-sysfs-pwm
-
Notifications
You must be signed in to change notification settings - Fork 0
105 lines (90 loc) · 2.62 KB
/
Copy pathci.yml
File metadata and controls
105 lines (90 loc) · 2.62 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
on:
push: # Run CI for all branches except GitHub merge queue tmp branches
branches-ignore:
- "gh-readonly-queue/**"
pull_request: # Run CI for PRs on any branch
merge_group: # Run CI for the GitHub merge queue
name: CI
env:
RUSTFLAGS: '--deny warnings'
jobs:
ci-linux:
name: CI
runs-on: ubuntu-latest
strategy:
matrix:
rust: [stable]
TARGET:
- aarch64-unknown-linux-gnu
- aarch64-unknown-linux-musl
- arm-unknown-linux-gnueabi
# - arm-unknown-linux-gnueabihf # not supported by the CI at the moment
- armv7-unknown-linux-gnueabihf
- i686-unknown-linux-gnu
- i686-unknown-linux-musl
# - loongarch64-unknown-linux-gnu
- powerpc-unknown-linux-gnu
# - powerpc64-unknown-linux-gnu
- powerpc64le-unknown-linux-gnu
- riscv64gc-unknown-linux-gnu
- s390x-unknown-linux-gnu
- x86_64-unknown-linux-gnu
- x86_64-unknown-linux-musl
include:
# Test nightly but don't fail
- rust: nightly
TARGET: x86_64-unknown-linux-gnu
experimental: true
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
- run: cargo build --target=${{ matrix.TARGET }}
- name: Test
uses: taiki-e/setup-cross-toolchain-action@v1
with:
target: ${{ matrix.TARGET }}
- run: cargo test --target=${{ matrix.TARGET }}
ci-linux-msrv:
name: CI-MSRV
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@1.28.0
- run: cargo build
- run: cargo test
ci-macos:
name: CI-macOS
runs-on: macos-latest
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
- run: cargo build
ci-macos-msrv:
name: CI-macOS-MSRV
runs-on: macos-13 # Latest for Intel-based CPUs
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@1.28.0
- run: cargo build
checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- run: cargo doc
- run: cargo fmt --all -- --check
clippy:
runs-on: ubuntu-latest
env:
RUSTFLAGS: '--allow warnings'
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@1.91.1
with:
components: clippy
- run: cargo clippy --all-targets