-
Notifications
You must be signed in to change notification settings - Fork 7
162 lines (126 loc) 路 4.71 KB
/
Copy pathci.yaml
File metadata and controls
162 lines (126 loc) 路 4.71 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
CI: true
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
rust: [stable, nightly]
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up Rust
uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c
with:
toolchain: ${{ matrix.rust }}
components: rustfmt, clippy
- name: Format check
run: cargo fmt --all -- --check
- name: Clippy check
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Build all features
run: cargo build --verbose --all-features
- name: Check no_std core
run: cargo check --verbose --no-default-features
- name: Check no_std feature matrix
run: cargo check --verbose --no-default-features --features serde,bytes,simd
- name: Test all features
run: cargo test --verbose --all-features
- name: Test doctests
run: cargo test --doc --all-features
- name: Verify layout snapshot
run: cargo test --test layout_snapshot --all-features -- --nocapture
- name: Upload layout artifacts
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: layout-${{ matrix.os }}-${{ matrix.rust }}
path: target/layout-artifacts
if-no-files-found: ignore
msrv:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up Rust 1.95
uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c
with:
toolchain: 1.95
- name: Check packaged consumer matrix
shell: bash
run: bash scripts/check-msrv-package.sh 1.95
documentation:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up stable Rust
uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c
with:
toolchain: stable
- name: Build default documentation
run: RUSTDOCFLAGS="-D warnings" cargo doc --lib --no-deps
- name: Build all-feature documentation
run: RUSTDOCFLAGS="-D warnings" cargo doc --lib --no-deps --all-features
repository-contracts:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Run repository contracts
run: python -m unittest discover -s scripts/tests -v
performance-contracts:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up stable Rust
uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c
with:
toolchain: stable
- name: Verify allocation contracts
run: cargo test --test allocation_contract --all-features -- --test-threads=1
- name: Capture shared-backing evidence
shell: bash
run: |
cargo bench --bench shared_backing -- __allocation_evidence_only__ --noplot 2>&1 |
tee target/allocation-evidence.log
- name: Verify shared-backing evidence
run: python scripts/verify-allocation-evidence.py target/allocation-evidence.log
layout-32-bit:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up stable Rust with 32-bit target
uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c
with:
toolchain: stable
targets: i686-pc-windows-msvc
- name: Verify 32-bit compact layout
run: cargo test --target i686-pc-windows-msvc --test layout_snapshot --all-features -- --nocapture
dependency-audit:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up stable Rust
uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c
with:
toolchain: stable
- name: Install dependency auditor
run: cargo install cargo-audit --version 0.22.2 --locked
- name: Audit locked dependencies
run: cargo audit -D warnings