Skip to content

Commit 4cb0abf

Browse files
fix(ci): move non-blocking checks to weekly advisory CI (#10968)
* fix(ci): make floating Rust checks advisory * fix(ci): complete required Rust toolchain policy * ci: consolidate scheduled advisory checks
1 parent be179a5 commit 4cb0abf

9 files changed

Lines changed: 199 additions & 143 deletions

File tree

.github/workflows/advisory.yml

Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
name: Advisory Checks
2+
3+
on:
4+
schedule:
5+
- cron: "0 8 * * 1"
6+
workflow_dispatch:
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
permissions:
13+
contents: read
14+
15+
env:
16+
CARGO_TERM_COLOR: always
17+
RUST_BACKTRACE: 1
18+
RUST_LIB_BACKTRACE: 1
19+
RUST_LOG: info
20+
COLORBT_SHOW_HIDDEN: 1
21+
22+
jobs:
23+
link-check:
24+
name: Documentation links
25+
runs-on: ubuntu-latest
26+
timeout-minutes: 15
27+
steps:
28+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
29+
with:
30+
persist-credentials: false
31+
- name: Restore Lychee cache
32+
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae #v5.0.5
33+
with:
34+
path: .lycheecache
35+
key: cache-lychee-${{ github.sha }}
36+
restore-keys: cache-lychee-
37+
- name: Check links
38+
uses: lycheeverse/lychee-action@8646ba30535128ac92d33dfc9133794bfdd9b411 #v2.8.0
39+
with:
40+
args: >-
41+
--verbose
42+
--no-progress
43+
--cache
44+
--config .lychee.toml
45+
"**/*.md"
46+
fail: true
47+
env:
48+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49+
50+
beta-clippy:
51+
name: Beta Clippy / ${{ matrix.type }}
52+
runs-on: ubuntu-latest
53+
timeout-minutes: 30
54+
strategy:
55+
fail-fast: false
56+
matrix:
57+
type: [release, tests]
58+
include:
59+
- type: release
60+
args: --workspace --all-targets
61+
features: default-release-binaries
62+
- type: tests
63+
args: --workspace --all-targets
64+
features: default-release-binaries proptest-impl lightwalletd-grpc-tests zebra-checkpoints
65+
steps:
66+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
67+
with:
68+
persist-credentials: false
69+
- uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 #v1.16.1
70+
with:
71+
components: clippy
72+
toolchain: beta
73+
cache-on-failure: true
74+
- uses: ./.github/actions/setup-zebra-build
75+
- name: Run Clippy
76+
run: cargo clippy ${{ matrix.args }} --features "${{ matrix.features }}"
77+
78+
beta-unit-tests:
79+
name: Beta unit tests
80+
runs-on: ubuntu-latest
81+
timeout-minutes: 120
82+
steps:
83+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
84+
with:
85+
persist-credentials: false
86+
- uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 #v1.16.1
87+
with:
88+
toolchain: beta
89+
cache-key: advisory-unit-tests-beta
90+
cache-on-failure: true
91+
- uses: taiki-e/install-action@65851e10cd6c377f11a60e600abc07cb08643468 #v2.79.3
92+
with:
93+
tool: cargo-nextest
94+
- uses: ./.github/actions/setup-zebra-build
95+
- name: Run unit tests
96+
run: cargo nextest run --profile ci --locked --release --features default-release-binaries --run-ignored=all
97+
98+
nightly-docs:
99+
name: Nightly documentation
100+
runs-on: ubuntu-latest
101+
timeout-minutes: 30
102+
steps:
103+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
104+
with:
105+
persist-credentials: false
106+
- uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 #v1.16.1
107+
with:
108+
toolchain: nightly
109+
cache-on-failure: true
110+
- uses: ./.github/actions/setup-zebra-build
111+
- name: Build documentation
112+
run: cargo doc --no-deps --workspace --all-features --document-private-items --target-dir "$(pwd)"/target/internal
113+
env:
114+
# Keep the warning policy aligned with the published documentation build.
115+
RUSTDOCFLAGS: --html-in-header katex-header.html -A rustdoc::private_intra_doc_links -D warnings
116+
117+
nightly-features:
118+
name: Nightly exhaustive features
119+
runs-on: ubuntu-latest
120+
timeout-minutes: 30
121+
steps:
122+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
123+
with:
124+
persist-credentials: false
125+
- uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 #v1.16.1
126+
with:
127+
toolchain: nightly
128+
cache-on-failure: true
129+
- uses: taiki-e/install-action@65851e10cd6c377f11a60e600abc07cb08643468 #v2.79.3
130+
with:
131+
tool: cargo-hack
132+
- uses: ./.github/actions/setup-zebra-build
133+
- name: Check feature combinations
134+
run: cargo hack check --all
135+
env:
136+
RUSTFLAGS: -D warnings
137+
138+
unused-deps:
139+
name: Nightly unused dependencies
140+
runs-on: ubuntu-latest
141+
timeout-minutes: 30
142+
steps:
143+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
144+
with:
145+
persist-credentials: false
146+
- uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 #v1.16.1
147+
with:
148+
toolchain: nightly
149+
cache-on-failure: true
150+
- uses: taiki-e/install-action@65851e10cd6c377f11a60e600abc07cb08643468 #v2.79.3
151+
with:
152+
tool: cargo-udeps
153+
- uses: ./.github/actions/setup-zebra-build
154+
- name: Check unused dependencies
155+
run: cargo udeps --workspace --all-targets --all-features --locked
156+
157+
failure-issue:
158+
name: Open or update an issue for advisory failures
159+
needs:
160+
- link-check
161+
- beta-clippy
162+
- beta-unit-tests
163+
- nightly-docs
164+
- nightly-features
165+
- unused-deps
166+
if: failure()
167+
runs-on: ubuntu-latest
168+
permissions:
169+
contents: read
170+
issues: write
171+
steps:
172+
- uses: jayqi/failed-build-issue-action@1a893bbf43ef1c2a8705e2b115cd4f0fe3c5649b #v1.2.0
173+
with:
174+
title-template: "{{refname}} advisory checks failed: {{eventName}} in {{workflow}}"
175+
label-name: S-ci-fail-auto-issue
176+
always-create-new-issue: false
177+
github-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/docs-check.yml

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -34,40 +34,6 @@ jobs:
3434
with:
3535
filters: .github/path-filters.yml
3636

37-
# TODO: this always ends up failing due to random issues. Possibly move to a weekly job
38-
# link-check:
39-
# name: link-check
40-
# permissions:
41-
# contents: read
42-
# pull-requests: read
43-
# runs-on: ubuntu-latest
44-
# timeout-minutes: 15
45-
# steps:
46-
# - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
47-
# with:
48-
# persist-credentials: false
49-
50-
# - name: Restore lychee cache
51-
# uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae #v5.0.5
52-
# with:
53-
# path: .lycheecache
54-
# key: cache-lychee-${{ github.sha }}
55-
# restore-keys: cache-lychee-
56-
57-
# - name: Link Checker
58-
# uses: lycheeverse/lychee-action@8646ba30535128ac92d33dfc9133794bfdd9b411 #v2.8.0
59-
# with:
60-
# args: >-
61-
# --verbose
62-
# --no-progress
63-
# --cache
64-
# --max-cache-age 1d
65-
# --config .lychee.toml
66-
# "**/*.md"
67-
# fail: true
68-
# env:
69-
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
70-
7137
spell-check:
7238
name: spell-check
7339
needs: changes
@@ -121,7 +87,6 @@ jobs:
12187
if: always()
12288
needs:
12389
- changes
124-
# - link-check
12590
- spell-check
12691
- markdown-lint
12792
timeout-minutes: 5

.github/workflows/lint.yml

Lines changed: 7 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
filters: .github/path-filters.yml
4242

4343
clippy:
44-
name: clippy ${{ matrix.rust-version }} / ${{ matrix.type }}
44+
name: clippy stable 1.97.0 / ${{ matrix.type }}
4545
needs: changes
4646
if: needs.changes.outputs.lint == 'true'
4747
permissions:
@@ -53,7 +53,6 @@ jobs:
5353
strategy:
5454
fail-fast: false
5555
matrix:
56-
rust-version: [stable, beta]
5756
type: [release, tests]
5857
include:
5958
- type: release
@@ -70,7 +69,7 @@ jobs:
7069
- uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 #v1.16.1
7170
with:
7271
components: clippy
73-
toolchain: ${{ matrix.rust-version }}
72+
toolchain: 1.97.0
7473
cache-on-failure: true
7574
- uses: ./.github/actions/setup-zebra-build
7675
- name: Run clippy
@@ -117,36 +116,11 @@ jobs:
117116
persist-credentials: false
118117
- uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 #v1.16.1
119118
with:
120-
toolchain: 1.91 # MSRV
119+
toolchain: 1.91.0 # MSRV
121120
cache-on-failure: true
122121
- uses: ./.github/actions/setup-zebra-build
123122
- run: cargo build --bin "${{ matrix.binary }}" --workspace
124123

125-
docs:
126-
name: docs
127-
needs: changes
128-
if: needs.changes.outputs.lint == 'true'
129-
permissions:
130-
contents: read
131-
statuses: write
132-
runs-on: ubuntu-latest
133-
timeout-minutes: 30
134-
steps:
135-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
136-
with:
137-
persist-credentials: false
138-
- uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 #v1.16.1
139-
with:
140-
toolchain: nightly
141-
cache-on-failure: true
142-
- uses: ./.github/actions/setup-zebra-build
143-
- run: cargo doc --no-deps --workspace --all-features --document-private-items --target-dir "$(pwd)"/target/internal
144-
env:
145-
# Keep in sync with ./book.yml:jobs.build
146-
# The -A and -W settings must be the same as the `rustdocflags` in:
147-
# https://github.com/ZcashFoundation/zebra/blob/main/.cargo/config.toml#L87
148-
RUSTDOCFLAGS: --html-in-header katex-header.html -A rustdoc::private_intra_doc_links -D warnings
149-
150124
fmt:
151125
name: fmt
152126
needs: changes
@@ -162,35 +136,11 @@ jobs:
162136
persist-credentials: false
163137
- uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 #v1.16.1
164138
with:
165-
toolchain: nightly
139+
toolchain: 1.91.0
166140
components: rustfmt
167141
- name: Run fmt
168142
run: cargo fmt --all -- --check
169143

170-
unused-deps:
171-
name: unused-deps
172-
needs: changes
173-
if: needs.changes.outputs.lint == 'true'
174-
permissions:
175-
contents: read
176-
id-token: write
177-
statuses: write
178-
runs-on: ubuntu-latest
179-
timeout-minutes: 30
180-
steps:
181-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
182-
with:
183-
persist-credentials: false
184-
- uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 #v1.16.1
185-
with:
186-
toolchain: nightly
187-
cache-on-failure: true
188-
- uses: taiki-e/install-action@65851e10cd6c377f11a60e600abc07cb08643468 #v2.79.3
189-
with:
190-
tool: cargo-udeps
191-
- uses: ./.github/actions/setup-zebra-build
192-
- run: cargo udeps --workspace --all-targets --all-features --locked
193-
194144
no-test-deps:
195145
needs: changes
196146
if: needs.changes.outputs.lint == 'true'
@@ -203,39 +153,11 @@ jobs:
203153

204154
- uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 #v1.16.1
205155
with:
206-
toolchain: stable
156+
toolchain: 1.97.0
207157
cache-on-failure: true
208158
- name: Ensure no arbitrary or proptest dependency on default build
209159
run: cargo tree --package zebrad -e=features,no-dev | grep -Eq "arbitrary|proptest" && exit 1 || exit 0
210160

211-
# Checks that selected rates can compile with power set of features
212-
features:
213-
name: features
214-
needs: changes
215-
if: needs.changes.outputs.lint == 'true'
216-
permissions:
217-
contents: read
218-
id-token: write
219-
statuses: write
220-
runs-on: ubuntu-latest
221-
timeout-minutes: 30
222-
steps:
223-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
224-
with:
225-
persist-credentials: false
226-
- uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 #v1.16.1
227-
with:
228-
toolchain: nightly
229-
cache-on-failure: true
230-
- name: cargo install cargo-hack
231-
uses: taiki-e/install-action@65851e10cd6c377f11a60e600abc07cb08643468 #v2.79.3
232-
with:
233-
tool: cargo-hack
234-
- uses: ./.github/actions/setup-zebra-build
235-
- run: cargo hack check --all
236-
env:
237-
RUSTFLAGS: -D warnings
238-
239161
check-cargo-lock:
240162
name: check-cargo-lock
241163
needs: changes
@@ -251,7 +173,7 @@ jobs:
251173
persist-credentials: false
252174
- uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 #v1.16.1
253175
with:
254-
toolchain: stable
176+
toolchain: 1.97.0
255177
cache-on-failure: true
256178
- uses: ./.github/actions/setup-zebra-build
257179
- run: cargo check --locked --all-features --all-targets
@@ -345,12 +267,9 @@ jobs:
345267
- clippy
346268
- crate-checks
347269
- msrv
348-
- docs
349270
- fmt
350-
- unused-deps
351271
- check-cargo-lock
352272
- no-test-deps
353-
- features
354273
- deny
355274
- hadolint
356275
- shellcheck
@@ -360,4 +279,4 @@ jobs:
360279
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe #v1.2.2
361280
with:
362281
jobs: ${{ toJSON(needs) }}
363-
allowed-skips: clippy, crate-checks, msrv, docs, fmt, unused-deps, check-cargo-lock, no-test-deps, features, deny, hadolint, shellcheck
282+
allowed-skips: clippy, crate-checks, msrv, fmt, check-cargo-lock, no-test-deps, deny, hadolint, shellcheck

0 commit comments

Comments
 (0)