forked from algesten/str0m
-
Notifications
You must be signed in to change notification settings - Fork 0
183 lines (170 loc) · 5.57 KB
/
cargo.yml
File metadata and controls
183 lines (170 loc) · 5.57 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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
name: CI
on:
push:
branches: ["main"]
pull_request:
schedule:
- cron: "22 3 * * 5"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
strategy:
matrix:
rust: [stable, beta, 1.81.0]
crypto:
- name: openssl
os: ubuntu-latest
- name: openssl
os: macos-latest
- name: aws-lc-rs
os: ubuntu-latest
- name: aws-lc-rs
os: macos-latest
- name: aws-lc-rs
os: windows-latest
- name: rust-crypto
os: ubuntu-latest
- name: rust-crypto
os: macos-latest
- name: rust-crypto
os: windows-latest
- name: wincrypto
os: windows-latest
- name: apple-crypto
os: macos-latest
runs-on: ${{ matrix.crypto.os }}
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@master
id: toolchain
with:
toolchain: ${{ matrix.rust }}
- uses: Swatinem/rust-cache@v2
- name: Test with ${{ matrix.crypto.name }}
run: cargo +${{steps.toolchain.outputs.name}} test --no-default-features --features ${{ matrix.crypto.features || matrix.crypto.name }}
snowflake:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Martin's snowflake formatting rules
uses: algesten/snowflake@v1.1.0
with:
check_diff: true
line_width_rules: "CHANGELOG.md:120;c_cpp_properties.json:160;Cargo.toml:150;README.md:180;README.tpl:180;*.md:110;*.rs:110;*.toml:110;*.lock:200;*.svg:1000;*.txt:9999;DEFAULT=110"
pii:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
id: toolchain
with:
toolchain: stable
- uses: Swatinem/rust-cache@v1
- name: Test pii
run: cargo +${{steps.toolchain.outputs.name}} test --test pii --features pii
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@master
id: toolchain
with:
toolchain: stable
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v1
- name: fmt
run: cargo +${{steps.toolchain.outputs.name}} fmt --all -- --check
- name: clippy (default features)
run: cargo +${{steps.toolchain.outputs.name}} clippy -- -D warnings
- name: clippy (all crypto backends)
run: |
cargo +${{steps.toolchain.outputs.name}} clippy --no-default-features --features openssl -- -D warnings
cargo +${{steps.toolchain.outputs.name}} clippy --no-default-features --features aws-lc-rs -- -D warnings
cargo +${{steps.toolchain.outputs.name}} clippy --no-default-features --features rust-crypto -- -D warnings
- name: doc
run: cargo doc --no-deps
env:
RUSTDOCFLAGS: -Dwarnings
fuzz-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
components: rust-src
- name: Install cargo-fuzz
run: cargo install cargo-fuzz
- name: Build fuzz targets
run: cargo fuzz build
related-crates:
strategy:
matrix:
rust: [stable, beta, 1.81.0]
dir:
- name: proto
os: ubuntu-latest
- name: netem
os: ubuntu-latest
- name: crypto/apple-crypto
os: macos-latest
- name: crypto/aws-lc-rs
os: ubuntu-latest
- name: crypto/openssl
os: ubuntu-latest
- name: crypto/rust-crypto
os: ubuntu-latest
- name: crypto/wincrypto
os: windows-latest
runs-on: ${{ matrix.dir.os }}
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@master
id: toolchain
with:
toolchain: ${{ matrix.rust }}
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- name: fmt
if: matrix.rust == 'stable'
run: cargo +${{steps.toolchain.outputs.name}} fmt --manifest-path ${{ matrix.dir.name }}/Cargo.toml -- --check
- name: clippy
if: matrix.rust == 'stable'
run: cargo +${{steps.toolchain.outputs.name}} clippy --manifest-path ${{ matrix.dir.name }}/Cargo.toml -- -D warnings
- name: test
run: cargo +${{steps.toolchain.outputs.name}} test --manifest-path ${{ matrix.dir.name }}/Cargo.toml
# cargo-deny:
# name: cargo-deny
# # TODO: remove this matrix when https://github.com/EmbarkStudios/cargo-deny/issues/324 is resolved
# strategy:
# fail-fast: false
# matrix:
# platform:
# - aarch64-apple-ios
# - aarch64-linux-android
# - i686-pc-windows-gnu
# - i686-pc-windows-msvc
# - i686-unknown-linux-gnu
# - wasm32-unknown-unknown
# - x86_64-apple-darwin
# - x86_64-apple-ios
# - x86_64-pc-windows-gnu
# - x86_64-pc-windows-msvc
# - x86_64-unknown-linux-gnu
# - x86_64-unknown-redox
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - uses: EmbarkStudios/cargo-deny-action@v1
# with:
# command: check
# log-level: error
# arguments: --all-features --target ${{ matrix.platform }}