-
Notifications
You must be signed in to change notification settings - Fork 211
96 lines (80 loc) · 2.39 KB
/
Copy pathrust.yml
File metadata and controls
96 lines (80 loc) · 2.39 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
name: Rust
on:
push:
branches: [v2]
pull_request:
merge_group:
types: [checks_requested]
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
build:
name: Build and test (${{ matrix.name }})
runs-on: ubuntu-latest
strategy:
matrix:
include:
- name: stable
toolchain: stable
fuzz: true
- name: beta
toolchain: beta
fuzz: true
- name: nightly
toolchain: nightly
nightly: true
- name: MSRV
toolchain: "1.86.0"
- name: no_std
toolchain: stable
target: thumbv7m-none-eabi
no_std: true
steps:
- uses: actions/checkout@v7
- name: Install packages for fuzzing
if: matrix.fuzz
run: sudo apt-get update -y && sudo apt-get install -y binutils-dev libunwind8-dev libcurl4-openssl-dev libelf-dev libdw-dev cmake gcc libiberty-dev
- name: Install toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
target: ${{ matrix.target }}
- name: Style check
if: matrix.nightly
run: rustup component add rustfmt && cargo fmt --all --check
- name: Clippy check
if: matrix.nightly
run: rustup component add clippy && cargo clippy --all-features --all-targets -- -D warnings
- name: Build
run: cargo build --verbose
- name: Run tests
if: ${{ !matrix.no_std }}
run: cargo test --verbose
- name: Cargo test all features
if: matrix.nightly
run: cargo test --verbose --all-features
- name: Cargo doc all features
if: matrix.nightly
run: cargo doc --all-features --verbose
- name: Cargo bench all features
if: matrix.nightly
run: cargo clean && cargo bench --verbose --all-features
- name: miri
if: matrix.nightly
run: rustup component add miri && cargo miri test --verbose --all-features
- name: fuzz
if: matrix.fuzz
working-directory: fuzz
run: ./travis-fuzz.sh
build_result:
name: homu build finished
runs-on: ubuntu-latest
needs: build
steps:
- name: Mark the job as successful
run: exit 0
if: success()
- name: Mark the job as unsuccessful
run: exit 1
if: "!success()"