Commit Graph

8 Commits

Author SHA1 Message Date
Tobin C. Harding 41f2dcf6ae
Improve test coverage for docs build
Currently the docs build commands in `hashes` and `bitcoin` differ, they
should be the same.

Add a command `cargo doc` to improve coverage e.g., recently we botched
the feature guarding but since CI only runs `cargo rustdoc` with custom
compiler conditional set we didn't catch it.

Run docs in CI using nightly and stable toolchains as required.
2023-01-16 13:56:56 +11:00
Tobin C. Harding 96e8a080d1
ci: Remove redundant || exit
We already use `set -ex`, adding an explicit exit on command fail is
redundant.
2023-01-16 13:56:26 +11:00
Tobin C. Harding 941083ec4e Remove rand-std dev-dependency from secp256k1
In order to get better test coverage we should not enable the secp26k1
feature "rand-std" in dev-dependencies but instead feature gate tests
that depend on this feature.
2022-12-23 08:33:21 +11:00
Tobin C. Harding 108a1f73ca Fail CI if docs build throws warnings
Convert all rustdocs build warnings to errors using `-D warnings` and
exit the script with 1 to signal the error.

While we are at it use `--all-features` instead of explicit feature list
when building docs. Without this the docs build fails with:

  error: too many file operands
2022-11-21 10:35:49 +11:00
Andrew Poelstra 9fb8c21f79
Merge rust-bitcoin/rust-bitcoin#999: examples: Add taproot PSBT example workflow
1a89d5230c examples: Add taproot-psbt workflow example (Duncan Dean)

Pull request description:

  Will address #893.

  Currently includes a BIP86 example (no spendable script path)

  Working on script path and key path spending when both are possible spending paths.

ACKs for top commit:
  tcharding:
    ACK 1a89d5230c
  apoelstra:
    ACK 1a89d5230c

Tree-SHA512: 31d23914faedb2632d517f9a827075f1bf387df6d98f151000f70546d1e67ac332e698c6a01bda40a9baf5b25bff0114928edc0879c5e01753ecfc6ad182fe26
2022-10-25 16:47:18 +00:00
Tobin C. Harding b05ba16a05 ci: Remove serde version pinning
The MSRV break in serde is fixed now, remove the serde version pinning.
2022-10-25 09:32:01 +11:00
Duncan Dean 1a89d5230c
examples: Add taproot-psbt workflow example
This example shows how to use the PSBT API for taproot transactions.
We have a simple BIP86-style spend and an example of an inheritance
timelock that can be spent either by the beneficiary via the script
path after a timelock, or via the key path by the benefactor so that
they can refresh the timelock at any time.
2022-09-16 09:00:27 +02:00
Tobin C. Harding 022730bd8d Add a workspace to the top level directory.
Create a directory `bitcoin` and move into it the following as is with
no code changes:

- src
- Cargo.toml
- contrib
- test_data
- examples

Then do:

- Add a workspace to the repository root directory.
- Add the newly created `bitcoin` crate to the workspace.
- Exclude `fuzz` and `embedded` crates from the workspace.
- Add a contrib/test.sh script that runs contrib/test.sh in each
  sub-crate
- Fix the bitcoin/contrib/test.sh script
2022-09-13 08:44:57 +10:00