-
Notifications
You must be signed in to change notification settings - Fork 3
57 lines (51 loc) · 1.39 KB
/
rust.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
name: Rust
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: '34 11 * * 2'
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
# Make sure cargo commands not only fail on hard errors but also on warnings
# so we do not accidentally miss newly introduced warnings.
RUSTFLAGS: -D warnings
jobs:
build-and-test:
strategy:
fail-fast: false # Run against all versions even if one fails
matrix:
version:
- "1.75" # Yocto scarthgap
- "1.79" # Yocto styhead
- "1.81" # OSELAS.Toolchain v2024.11.0
- "stable"
- "nightly"
name: cargo build && cargo test
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- run: rustup toolchain install ${{ matrix.version }}
- run: rustup run ${{ matrix.version }} cargo build --verbose
- run: rustup run ${{ matrix.version }} cargo test --verbose
clippy:
strategy:
matrix:
features:
- ""
- "--tests"
name: cargo clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: rustup toolchain install stable
- run: cargo clippy ${{ matrix.features }}
fmt:
name: cargo fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: rustup toolchain install stable
- run: cargo fmt --all -- --check