-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (70 loc) · 3.8 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Rust
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -Dwarnings
jobs:
build:
name: Build ${{matrix.rust}}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
rust: [stable, nightly]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{matrix.rust}}
- name: Build no_std${{matrix.rust == 'nightly' && ' + unstable' || ''}}
run: cargo build --verbose --no-default-features ${{matrix.rust == 'nightly' && '--features unstable' || ''}}
- name: Build alloc${{matrix.rust == 'nightly' && ' + unstable' || ''}}
run: cargo build --verbose --no-default-features --features alloc${{matrix.rust == 'nightly' && ',unstable' || ''}}
- name: Build utf8${{matrix.rust == 'nightly' && ' + unstable' || ''}}
run: cargo build --verbose --no-default-features --features utf8${{matrix.rust == 'nightly' && ',unstable' || ''}}
- name: Build alloc + utf8${{matrix.rust == 'nightly' && ' + unstable' || ''}}
run: cargo build --verbose --no-default-features --features alloc,utf8${{matrix.rust == 'nightly' && ',unstable' || ''}}
- name: Build std + alloc${{matrix.rust == 'nightly' && ' + unstable' || ''}}
run: cargo build --verbose --no-default-features --features std,alloc${{matrix.rust == 'nightly' && ',unstable' || ''}}
- name: Build std + utf8${{matrix.rust == 'nightly' && ' + unstable' || ''}}
run: cargo build --verbose --no-default-features --features std,utf8${{matrix.rust == 'nightly' && ',unstable' || ''}}
- name: Build std + alloc + utf8${{matrix.rust == 'nightly' && ' + unstable' || ''}}
run: cargo build --verbose --no-default-features --features std,alloc,utf8${{matrix.rust == 'nightly' && ',unstable' || ''}}
clippy:
name: Clippy ${{matrix.rust}}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
rust: [stable, nightly]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{matrix.rust}}
components: clippy
- name: Clippy no_std${{matrix.rust == 'nightly' && ' + unstable' || ''}}
run: cargo clippy --verbose --no-default-features ${{matrix.rust == 'nightly' && '--features unstable' || ''}}
- name: Clippy alloc${{matrix.rust == 'nightly' && ' + unstable' || ''}}
run: cargo clippy --verbose --no-default-features --features alloc${{matrix.rust == 'nightly' && ',unstable' || ''}}
- name: Clippy utf8${{matrix.rust == 'nightly' && ' + unstable' || ''}}
run: cargo clippy --verbose --no-default-features --features utf8${{matrix.rust == 'nightly' && ',unstable' || ''}}
- name: Clippy alloc + utf8${{matrix.rust == 'nightly' && ' + unstable' || ''}}
run: cargo clippy --verbose --no-default-features --features alloc,utf8${{matrix.rust == 'nightly' && ',unstable' || ''}}
- name: Clippy std + alloc${{matrix.rust == 'nightly' && ' + unstable' || ''}}
run: cargo clippy --verbose --no-default-features --features std,alloc${{matrix.rust == 'nightly' && ',unstable' || ''}}
- name: Clippy std + utf8${{matrix.rust == 'nightly' && ' + unstable' || ''}}
run: cargo clippy --verbose --no-default-features --features std,utf8${{matrix.rust == 'nightly' && ',unstable' || ''}}
- name: Clippy std + alloc + utf8${{matrix.rust == 'nightly' && ' + unstable' || ''}}
run: cargo clippy --verbose --no-default-features --features std,alloc,utf8${{matrix.rust == 'nightly' && ',unstable' || ''}}
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- run: cargo test --verbose --all-features