-
Notifications
You must be signed in to change notification settings - Fork 248
177 lines (166 loc) · 5.77 KB
/
Copy pathadvisory.yml
File metadata and controls
177 lines (166 loc) · 5.77 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
name: Advisory Checks
on:
schedule:
- cron: "0 8 * * 1"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
RUST_LIB_BACKTRACE: 1
RUST_LOG: info
COLORBT_SHOW_HIDDEN: 1
jobs:
link-check:
name: Documentation links
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
with:
persist-credentials: false
- name: Restore Lychee cache
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae #v5.0.5
with:
path: .lycheecache
key: cache-lychee-${{ github.sha }}
restore-keys: cache-lychee-
- name: Check links
uses: lycheeverse/lychee-action@8646ba30535128ac92d33dfc9133794bfdd9b411 #v2.8.0
with:
args: >-
--verbose
--no-progress
--cache
--config .lychee.toml
"**/*.md"
fail: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
beta-clippy:
name: Beta Clippy / ${{ matrix.type }}
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
type: [release, tests]
include:
- type: release
args: --workspace --all-targets
features: default-release-binaries
- type: tests
args: --workspace --all-targets
features: default-release-binaries proptest-impl lightwalletd-grpc-tests zebra-checkpoints
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
with:
persist-credentials: false
- uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 #v1.16.1
with:
components: clippy
toolchain: beta
cache-on-failure: true
- uses: ./.github/actions/setup-zebra-build
- name: Run Clippy
run: cargo clippy ${{ matrix.args }} --features "${{ matrix.features }}"
beta-unit-tests:
name: Beta unit tests
runs-on: ubuntu-latest
timeout-minutes: 120
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
with:
persist-credentials: false
- uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 #v1.16.1
with:
toolchain: beta
cache-key: advisory-unit-tests-beta
cache-on-failure: true
- uses: taiki-e/install-action@65851e10cd6c377f11a60e600abc07cb08643468 #v2.79.3
with:
tool: cargo-nextest
- uses: ./.github/actions/setup-zebra-build
- name: Run unit tests
run: cargo nextest run --profile ci --locked --release --features default-release-binaries --run-ignored=all
nightly-docs:
name: Nightly documentation
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
with:
persist-credentials: false
- uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 #v1.16.1
with:
toolchain: nightly
cache-on-failure: true
- uses: ./.github/actions/setup-zebra-build
- name: Build documentation
run: cargo doc --no-deps --workspace --all-features --document-private-items --target-dir "$(pwd)"/target/internal
env:
# Keep the warning policy aligned with the published documentation build.
RUSTDOCFLAGS: --html-in-header katex-header.html -A rustdoc::private_intra_doc_links -D warnings
nightly-features:
name: Nightly exhaustive features
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
with:
persist-credentials: false
- uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 #v1.16.1
with:
toolchain: nightly
cache-on-failure: true
- uses: taiki-e/install-action@65851e10cd6c377f11a60e600abc07cb08643468 #v2.79.3
with:
tool: cargo-hack
- uses: ./.github/actions/setup-zebra-build
- name: Check feature combinations
run: cargo hack check --all
env:
RUSTFLAGS: -D warnings
unused-deps:
name: Nightly unused dependencies
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
with:
persist-credentials: false
- uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 #v1.16.1
with:
toolchain: nightly
cache-on-failure: true
- uses: taiki-e/install-action@65851e10cd6c377f11a60e600abc07cb08643468 #v2.79.3
with:
tool: cargo-udeps
- uses: ./.github/actions/setup-zebra-build
- name: Check unused dependencies
run: cargo udeps --workspace --all-targets --all-features --locked
failure-issue:
name: Open or update an issue for advisory failures
needs:
- link-check
- beta-clippy
- beta-unit-tests
- nightly-docs
- nightly-features
- unused-deps
if: failure()
runs-on: ubuntu-latest
permissions:
contents: read
issues: write
steps:
- uses: jayqi/failed-build-issue-action@1a893bbf43ef1c2a8705e2b115cd4f0fe3c5649b #v1.2.0
with:
title-template: "{{refname}} advisory checks failed: {{eventName}} in {{workflow}}"
label-name: S-ci-fail-auto-issue
always-create-new-issue: false
github-token: ${{ secrets.GITHUB_TOKEN }}