Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ env:
RUST_LIB_BACKTRACE: 1
RUST_LOG: info
COLORBT_SHOW_HIDDEN: 1
# Mirror the cfgs in .cargo/config.toml: RUSTFLAGS/RUSTDOCFLAGS replace the
# config's rustflags rather than adding to them, compiling out NU7/ZSA code.
ZEBRA_CFGS: '--cfg zcash_unstable="nu7" --cfg feature="tx_v6"'

jobs:
changes:
Expand Down Expand Up @@ -57,6 +60,7 @@ jobs:
persist-credentials: false
- uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 #v1.16.1
with:
rustflags: '-D warnings ${{ env.ZEBRA_CFGS }}'
toolchain: stable
components: llvm-tools-preview
cache-on-failure: true
Expand Down
24 changes: 21 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ permissions:

env:
CLICOLOR: 1
# Mirror the cfgs in .cargo/config.toml: RUSTFLAGS/RUSTDOCFLAGS replace the
# config's rustflags rather than adding to them, compiling out NU7/ZSA code.
ZEBRA_CFGS: '--cfg zcash_unstable="nu7" --cfg feature="tx_v6"'

jobs:
changes:
Expand Down Expand Up @@ -70,6 +73,7 @@ jobs:
persist-credentials: false
- uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 #v1.16.1
with:
rustflags: '-D warnings ${{ env.ZEBRA_CFGS }}'
components: clippy
toolchain: ${{ matrix.rust-version }}
cache-on-failure: true
Expand All @@ -91,6 +95,7 @@ jobs:
persist-credentials: false
- uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 #v1.16.1
with:
rustflags: '-D warnings ${{ env.ZEBRA_CFGS }}'
cache-on-failure: true
- uses: taiki-e/install-action@65851e10cd6c377f11a60e600abc07cb08643468 #v2.79.3
with:
Expand All @@ -99,7 +104,7 @@ jobs:
- run: cargo hack check --workspace

msrv:
name: MSRV
name: MSRV (nu7=${{ matrix.nu7 }})
needs: changes
if: needs.changes.outputs.lint == 'true'
permissions:
Expand All @@ -109,7 +114,13 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
# Both legs run to completion: they check different code, and the two
# configurations fail independently.
fail-fast: false
matrix:
nu7:
- true
- false
include:
- binary: zebrad
steps:
Expand All @@ -118,7 +129,11 @@ jobs:
persist-credentials: false
- uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 #v1.16.1
with:
# The nu7=false leg is the only job that still checks the MSRV build
# without the ZSA code paths, which is what upstream compiles.
rustflags: ${{ matrix.nu7 && format('-D warnings {0}', env.ZEBRA_CFGS) || '-D warnings' }}
toolchain: 1.91 # MSRV
cache-key: msrv-nu7-${{ matrix.nu7 }}
cache-on-failure: true
- uses: ./.github/actions/setup-zebra-build
- run: cargo build --bin "${{ matrix.binary }}" --workspace
Expand All @@ -138,6 +153,7 @@ jobs:
persist-credentials: false
- uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 #v1.16.1
with:
rustflags: '-D warnings ${{ env.ZEBRA_CFGS }}'
toolchain: nightly
cache-on-failure: true
- uses: ./.github/actions/setup-zebra-build
Expand All @@ -146,7 +162,7 @@ jobs:
# Keep in sync with ./book.yml:jobs.build
# The -A and -W settings must be the same as the `rustdocflags` in:
# https://github.com/ZcashFoundation/zebra/blob/main/.cargo/config.toml#L87
RUSTDOCFLAGS: --html-in-header katex-header.html -A rustdoc::private_intra_doc_links -D warnings
RUSTDOCFLAGS: --html-in-header katex-header.html -A rustdoc::private_intra_doc_links -D warnings ${{ env.ZEBRA_CFGS }}

fmt:
name: fmt
Expand Down Expand Up @@ -184,6 +200,7 @@ jobs:
persist-credentials: false
- uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 #v1.16.1
with:
rustflags: '-D warnings ${{ env.ZEBRA_CFGS }}'
# TODO: QED-it temp nightly pin: matches Zebra v4.2.0 CI test period; remove before upstream merge.
toolchain: nightly-2026-03-06
cache-on-failure: true
Expand Down Expand Up @@ -237,7 +254,7 @@ jobs:
- uses: ./.github/actions/setup-zebra-build
- run: cargo hack check --all
env:
RUSTFLAGS: -D warnings
RUSTFLAGS: -D warnings ${{ env.ZEBRA_CFGS }}

check-cargo-lock:
name: check-cargo-lock
Expand All @@ -254,6 +271,7 @@ jobs:
persist-credentials: false
- uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 #v1.16.1
with:
rustflags: '-D warnings ${{ env.ZEBRA_CFGS }}'
toolchain: stable
cache-on-failure: true
- uses: ./.github/actions/setup-zebra-build
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/test-crates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ env:
RUST_LIB_BACKTRACE: 1
RUST_LOG: info
COLORBT_SHOW_HIDDEN: 1
# Mirror the cfgs in .cargo/config.toml: RUSTFLAGS/RUSTDOCFLAGS replace the
# config's rustflags rather than adding to them, compiling out NU7/ZSA code.
ZEBRA_CFGS: '--cfg zcash_unstable="nu7" --cfg feature="tx_v6"'

jobs:
changes:
Expand Down Expand Up @@ -118,6 +121,7 @@ jobs:

- uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 #v1.16.1
with:
rustflags: '-D warnings ${{ env.ZEBRA_CFGS }}'
# TODO: QED-it temp Rust 1.94 pin: stable for Zebra v4.2.0 CI; remove before upstream merge.
toolchain: "1.94"
components: clippy
Expand Down Expand Up @@ -182,6 +186,7 @@ jobs:

- uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 #v1.16.1
with:
rustflags: '-D warnings ${{ env.ZEBRA_CFGS }}'
toolchain: ${{ steps.msrv.outputs.version }}
components: clippy
cache-key: crate-build-msrv-${{ matrix.crate }}
Expand Down
Loading