-
Notifications
You must be signed in to change notification settings - Fork 70
78 lines (73 loc) · 2.22 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
name: Build and test
on:
push:
branches-ignore:
- '*.tmp'
tags:
- '*'
pull_request:
workflow_dispatch:
jobs:
fmt:
name: fmt
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/[email protected]
with:
components: rustfmt
- run: cargo fmt --all -- --check
test:
name: test
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/[email protected]
- run: cargo test --lib --target x86_64-unknown-linux-gnu
- run: cargo test --doc --target x86_64-unknown-linux-gnu
test-msrv:
name: build with MSRV
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.75
- run: cargo build --lib --target x86_64-unknown-linux-gnu
- run: cargo build --lib --target x86_64-unknown-linux-gnu --features async
- run: cargo doc --target x86_64-unknown-linux-gnu
- run: cargo doc --target x86_64-unknown-linux-gnu --features async
build:
strategy:
fail-fast: false
matrix:
target:
- arm-unknown-linux-gnueabi
# Raspberry Pi 2, 3, etc
- armv7-unknown-linux-gnueabihf
# Linux
- x86_64-unknown-linux-gnu
- x86_64-unknown-linux-musl
# Bare metal
- thumbv6m-none-eabi
include:
- target: thumbv7em-none-eabi
examples: true
- target: thumbv7em-none-eabihf
examples: true
- target: thumbv7m-none-eabi
examples: true
name: ${{matrix.target}}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/[email protected]
with:
components: rustfmt
- run: rustup target add ${{matrix.target}}
- run: cargo build --target ${{matrix.target}} --all-features --release
- if: ${{ matrix.examples }}
run: cargo build --target ${{matrix.target}} --examples --release
- if: ${{ matrix.examples }}
run: cargo build --target ${{matrix.target}} --all-features --examples --release
- run: cargo doc --all-features --target ${{matrix.target }}