Skip to content

Enable building docs in the CI pipeline #384

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 10, 2022
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
16 changes: 8 additions & 8 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,26 +27,26 @@ jobs:
DO_LINT: true
run: ./contrib/test.sh

bench_nightly:
name: Bench + Tests
Nightly:
name: Bench + Docs
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- nightly
steps:
- name: Checkout Crate
uses: actions/checkout@v2
- name: Checkout Toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
toolchain: nightly
override: true
- name: Running cargo test
- name: Running benchmarks
env:
DO_BENCH: true
run: ./contrib/test.sh
- name: Building docs
env:
DO_DOCS: true
run: ./contrib/test.sh

UnitTests:
name: Tests
Expand Down
7 changes: 6 additions & 1 deletion contrib/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,17 @@ cargo build --examples
# run all examples
run-parts ./target/debug/examples

# Bench if told to
# Bench if told to (this only works with the nightly toolchain)
if [ "$DO_BENCH" = true ]
then
cargo bench --features="unstable compiler"
fi

# Build the docs if told to (this only works with the nightly toolchain)
if [ "$DO_DOCS" = true ]; then
RUSTDOCFLAGS="--cfg docsrs" cargo doc --all --features="$FEATURES"
fi

# Run Integration tests if told so
if [ -n "$BITCOINVERSION" ]; then
set -e
Expand Down
9 changes: 3 additions & 6 deletions src/descriptor/key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,13 +242,10 @@ impl fmt::Display for DescriptorPublicKey {
}

impl DescriptorSecretKey {
/// Return the public version of this key, by applying either
/// [`SinglePriv::to_public`] or [`DescriptorXKey<bip32::ExtendedPrivKey>::to_public`]
/// depending on the type of key.
/// Returns the public version of this key.
///
/// If the key is an "XPrv", the hardened derivation steps will be applied before converting it
/// to a public key. See the documentation of [`DescriptorXKey<bip32::ExtendedPrivKey>::to_public`]
/// for more details.
/// If the key is an "XPrv", the hardened derivation steps will be applied
/// before converting it to a public key.
pub fn to_public<C: Signing>(
&self,
secp: &Secp256k1<C>,
Expand Down
6 changes: 3 additions & 3 deletions src/descriptor/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -667,9 +667,9 @@ impl Descriptor<DescriptorPublicKey> {

/// Derive a [`Descriptor`] with a concrete [`bitcoin::PublicKey`] at a given index
/// Removes all extended pubkeys and wildcards from the descriptor and only leaves
/// concrete [`bitcoin::PublicKey`]. All [`crate::XOnlyKey`]s are converted to [`bitcoin::PublicKey`]
/// by adding a default(0x02) y-coordinate. For [`crate::descriptor::Tr`] descriptor,
/// spend info is also cached.
/// concrete [`bitcoin::PublicKey`]. All [`bitcoin::XOnlyPublicKey`]s are converted
/// to [`bitcoin::PublicKey`]s by adding a default(0x02) y-coordinate. For [`Tr`]
/// descriptor, spend info is also cached.
///
/// # Examples
///
Expand Down
2 changes: 1 addition & 1 deletion src/interpreter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ impl<'txin> Interpreter<'txin> {
}

/// Verify a signature for a given transaction and prevout information
/// This is a low level API, [`Interpreter::iter`] or [`Interpreter::iter_assume_sig`]
/// This is a low level API, [`Interpreter::iter`] or [`Interpreter::iter_assume_sigs`]
/// should satisfy most use-cases.
/// Returns false if
/// - the signature verification fails
Expand Down
4 changes: 3 additions & 1 deletion src/psbt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -559,8 +559,10 @@ pub trait PsbtExt {
/// # Arguments:
///
/// * `idx`: The input index of psbt to sign
/// * `cache`: The [`sighash::SighashCache`] for used to cache/read previously cached computations
/// * `cache`: The [`SighashCache`] for used to cache/read previously cached computations
/// * `tapleaf_hash`: If the output is taproot, compute the sighash for this particular leaf.
///
/// [`SighashCache`]: bitcoin::util::sighash::SighashCache
fn sighash_msg<T: Deref<Target = bitcoin::Transaction>>(
&self,
idx: usize,
Expand Down