-
Notifications
You must be signed in to change notification settings - Fork 307
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into descriptor-example
- Loading branch information
Showing
88 changed files
with
3,036 additions
and
2,638 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,17 +27,6 @@ jobs: | |
uses: Swatinem/[email protected] | ||
- name: Install grcov | ||
run: if [[ ! -e ~/.cargo/bin/grcov ]]; then cargo install grcov; fi | ||
# TODO: re-enable the hwi tests | ||
- name: Build simulator image | ||
run: docker build -t hwi/ledger_emulator ./ci -f ci/Dockerfile.ledger | ||
- name: Run simulator image | ||
run: docker run --name simulator --network=host hwi/ledger_emulator & | ||
- name: Install Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.9' | ||
- name: Install python dependencies | ||
run: pip install hwi==2.1.1 protobuf==3.20.1 | ||
- name: Test | ||
run: cargo test --all-features | ||
- name: Make coverage directory | ||
|
@@ -51,7 +40,7 @@ jobs: | |
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v2 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: coverage-report | ||
path: coverage-report.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,16 @@ on: [push, pull_request] | |
name: CI | ||
|
||
jobs: | ||
prepare: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
rust_version: ${{ steps.read_toolchain.outputs.rust_version }} | ||
steps: | ||
- name: "Checkout repo" | ||
uses: actions/checkout@v4 | ||
- name: "Read rust version" | ||
id: read_toolchain | ||
run: echo "rust_version=$(cat rust-version)" >> $GITHUB_OUTPUT | ||
|
||
build-test: | ||
name: Build and test | ||
|
@@ -14,17 +24,17 @@ jobs: | |
clippy: true | ||
- version: 1.63.0 # MSRV | ||
features: | ||
- --no-default-features | ||
- --no-default-features --features miniscript/no-std | ||
- --all-features | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v2 | ||
- name: Install Rust toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: ${{ matrix.rust.version }} | ||
override: true | ||
profile: minimal | ||
toolchain: ${{ matrix.rust.version }} | ||
override: true | ||
profile: minimal | ||
- name: Rust Cache | ||
uses: Swatinem/[email protected] | ||
- name: Pin dependencies for MSRV | ||
|
@@ -37,10 +47,11 @@ jobs: | |
cargo update -p url --precise "2.5.0" | ||
cargo update -p cc --precise "1.0.105" | ||
cargo update -p tokio --precise "1.38.1" | ||
cargo update -p tokio-util --precise "0.7.11" | ||
- name: Build | ||
run: cargo build ${{ matrix.features }} | ||
run: cargo build --workspace --exclude 'example_*' ${{ matrix.features }} | ||
- name: Test | ||
run: cargo test ${{ matrix.features }} | ||
run: cargo test --workspace --exclude 'example_*' ${{ matrix.features }} | ||
|
||
check-no-std: | ||
name: Check no_std | ||
|
@@ -86,10 +97,10 @@ jobs: | |
- name: Install Rust toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
profile: minimal | ||
target: "wasm32-unknown-unknown" | ||
toolchain: stable | ||
override: true | ||
profile: minimal | ||
target: "wasm32-unknown-unknown" | ||
- name: Rust Cache | ||
uses: Swatinem/[email protected] | ||
- name: Check bdk wallet | ||
|
@@ -108,22 +119,23 @@ jobs: | |
- name: Install Rust toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
profile: minimal | ||
components: rustfmt | ||
toolchain: stable | ||
override: true | ||
profile: minimal | ||
components: rustfmt | ||
- name: Check fmt | ||
run: cargo fmt --all -- --config format_code_in_doc_comments=true --check | ||
|
||
clippy_check: | ||
needs: prepare | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: 1.78.0 | ||
components: clippy | ||
override: true | ||
toolchain: ${{ needs.prepare.outputs.rust_version }} | ||
components: clippy | ||
override: true | ||
- name: Rust Cache | ||
uses: Swatinem/[email protected] | ||
- uses: actions-rs/clippy-check@v1 | ||
|
@@ -132,7 +144,7 @@ jobs: | |
args: --all-features --all-targets -- -D warnings | ||
|
||
build-examples: | ||
name: Build Examples | ||
name: Build & Test Examples | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
|
@@ -141,10 +153,10 @@ jobs: | |
- example_bitcoind_rpc_polling | ||
- example_electrum | ||
- example_esplora | ||
- wallet_electrum | ||
- wallet_esplora_async | ||
- wallet_esplora_blocking | ||
- wallet_rpc | ||
- example_wallet_electrum | ||
- example_wallet_esplora_async | ||
- example_wallet_esplora_blocking | ||
- example_wallet_rpc | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Update rust version | ||
on: | ||
schedule: | ||
- cron: "0 0 15 * *" # At 00:00 on day-of-month 15. | ||
workflow_dispatch: # allows manual triggering | ||
jobs: | ||
format: | ||
name: Update rustc | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- uses: tibdex/github-app-token@v1 | ||
id: generate-token | ||
with: | ||
app_id: ${{ secrets.APP_ID }} | ||
private_key: ${{ secrets.APP_PRIVATE_KEY }} | ||
- uses: crazy-max/ghaction-import-gpg@v5 | ||
with: | ||
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | ||
git_user_signingkey: true | ||
git_commit_gpgsign: true | ||
- name: Update rust-version to use latest stable | ||
run: | | ||
set -x | ||
# Extract the version from whatever version of the compiler dtolnay/rust-toolchain gives us. | ||
RUST_VERSION=$(rustc --verbose --version | sed -ne 's/^release: //p') | ||
# Update the version in the reference file. | ||
echo "${RUST_VERSION}" > rust-version | ||
echo "rust_version=${RUST_VERSION}" >> $GITHUB_ENV | ||
# In case of no new version don't make an empty PR. | ||
if ! git diff --exit-code > /dev/null; then | ||
echo "Updated rustc. Opening PR." | ||
echo "changes_made=true" >> $GITHUB_ENV | ||
else | ||
echo "Attempted to update rustc but the latest stable date did not change. Not opening any PR." | ||
echo "changes_made=false" >> $GITHUB_ENV | ||
fi | ||
- name: Create Pull Request | ||
if: env.changes_made == 'true' | ||
uses: peter-evans/create-pull-request@v6 | ||
with: | ||
token: ${{ steps.generate-token.outputs.token }} | ||
author: Github Action <[email protected]> | ||
committer: Github Action <[email protected]> | ||
branch: create-pull-request/update-rust-version | ||
title: | | ||
ci: automated update to rustc ${{ env.rust_version }} | ||
commit-message: | | ||
ci: automated update to rustc ${{ env.rust_version }} | ||
body: | | ||
Automated update to Github CI workflow `cont_integration.yml` by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
msrv="1.63.0" | ||
msrv="1.63.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.