-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from weareseba/feature/continuous-integration
continuous integration
- Loading branch information
Showing
7 changed files
with
238 additions
and
6 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 |
---|---|---|
@@ -0,0 +1,98 @@ | ||
on: | ||
push: | ||
branches: | ||
- 'master' | ||
- 'release/*' | ||
pull_request: | ||
branches: | ||
- 'master' | ||
- 'release/*' | ||
|
||
name: CI | ||
|
||
jobs: | ||
|
||
build-test: | ||
name: Build and test | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
rust: | ||
- version: 1.65.0 # STABLE | ||
clippy: true | ||
- version: 1.63.0 # MSRV | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v2 | ||
- name: Generate cache key | ||
run: echo "${{ matrix.rust.version }}" | tee .cache_key | ||
- name: cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.cargo/registry | ||
~/.cargo/git | ||
target | ||
key: ${{ runner.os }}-cargo-${{ hashFiles('.cache_key') }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }} | ||
- name: Set default toolchain | ||
run: rustup default ${{ matrix.rust.version }} | ||
- name: Set profile | ||
run: rustup set profile minimal | ||
- name: Add clippy | ||
if: ${{ matrix.rust.clippy }} | ||
run: rustup component add clippy | ||
- name: Update toolchain | ||
run: rustup update | ||
- name: Build | ||
run: cargo build | ||
- name: Clippy | ||
if: ${{ matrix.rust.clippy }} | ||
run: cargo clippy --all-targets -- -D warnings | ||
- name: Test | ||
run: cargo test | ||
|
||
|
||
# check-azure: | ||
# name: Check Azure | ||
# runs-on: ubuntu-20.04 | ||
# steps: | ||
# - name: Checkout | ||
# uses: actions/checkout@v2 | ||
# - name: Cache | ||
# uses: actions/cache@v2 | ||
# with: | ||
# path: | | ||
# ~/.cargo/registry | ||
# ~/.cargo/git | ||
# target | ||
# key: ${{ runner.os }}-cargo-${{ github.job }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }} | ||
# - run: sudo apt-get update || exit 1 | ||
# - run: sudo apt-get install -y clang musl musl-tools || exit 1 | ||
# - run: sudo ln -s /usr/bin/g++ /usr/bin/musl-g++ | ||
# - name: Set default toolchain | ||
# run: rustup default 1.63.0 | ||
# - name: Set profile | ||
# run: rustup set profile minimal | ||
# - name: Add target musl | ||
# run: rustup target add x86_64-unknown-linux-musl | ||
# - name: Update toolchain | ||
# run: rustup update | ||
# - name: Check | ||
# run: cargo build --release --target=x86_64-unknown-linux-musl | ||
|
||
fmt: | ||
name: Rust fmt | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Set default toolchain | ||
run: rustup default nightly | ||
- name: Set profile | ||
run: rustup set profile minimal | ||
- name: Add rustfmt | ||
run: rustup component add rustfmt | ||
- name: Update toolchain | ||
run: rustup update | ||
- name: Check fmt | ||
run: cargo fmt --all -- --config format_code_in_doc_comments=true --check |
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,48 @@ | ||
name: Release | ||
|
||
permissions: | ||
contents: write | ||
|
||
on: | ||
push: | ||
tags: | ||
- v[0-9]+.* | ||
|
||
jobs: | ||
create-release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: taiki-e/create-gh-release-action@v1 | ||
with: | ||
# (optional) Path to changelog. | ||
changelog: CHANGELOG.md | ||
# (required) GitHub token for creating GitHub Releases. | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
upload-assets: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: taiki-e/upload-rust-binary-action@v1 | ||
with: | ||
# (required) Comma-separated list of binary names (non-extension portion of filename) to build and upload. | ||
# Note that glob pattern is not supported yet. | ||
bin: bdk-reserves-web | ||
# (required) GitHub token for uploading assets to GitHub Releases. | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
upload-assets: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: akhileshns/[email protected] | ||
with: | ||
# key from repository secrets | ||
heroku_api_key: ${{secrets.HEROKU_API_KEY}} | ||
# name of the Heroku app | ||
heroku_app_name: "bdk-reserves-web" | ||
# email from which the app is uploaded | ||
heroku_email: "[email protected]" | ||
# buildpack is like environment used to run the app | ||
buildpack: "https://github.com/ph3nx/heroku-binary-buildpack.git" |
Binary file not shown.
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,17 @@ | ||
# Changelog | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## [Unreleased] | ||
|
||
## [v0.1.0] | ||
|
||
### Summary | ||
|
||
Initial release | ||
|
||
### Changed | ||
|
||
- Built a simple web app to verify BIP-127 proof of reserves BSBTs | ||
|
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,14 @@ | ||
This software is licensed under [Apache 2.0](LICENSE-APACHE) or | ||
[MIT](LICENSE-MIT), at your option. | ||
|
||
Some files retain their own copyright notice, however, for full authorship | ||
information, see version control history. | ||
|
||
Except as otherwise noted in individual files, all files in this repository are | ||
licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | ||
http://www.apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or | ||
http://opensource.org/licenses/MIT>, at your option. | ||
|
||
You may not use, copy, modify, merge, publish, distribute, sublicense, and/or | ||
sell copies of this software or any files in this repository except in | ||
accordance with one or both of these licenses. |
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,51 @@ | ||
<div align="center"> | ||
<h1>BDK-RESERVES-WEB</h1> | ||
|
||
<img src="./static/bdk.png" width="220" /> | ||
<br> | ||
<a href="https://seba.swiss"><img src="./static/seba-bank-logo-bank-lange-green-ohne-tagline.png" width="250" /></a> | ||
|
||
<p> | ||
<strong>Proof of reserves for Bitcoin dev kit - web app</strong> | ||
</p> | ||
|
||
<p> | ||
<a href="https://github.com/bitcoindevkit/bdk-reserves/blob/master/LICENSE"><img alt="MIT or Apache-2.0 Licensed" src="https://img.shields.io/badge/license-MIT%2FApache--2.0-blue.svg"/></a> | ||
</p> | ||
|
||
<h4> | ||
<a href="https://bitcoindevkit.org">Project Homepage</a> | ||
<span> | </span> | ||
<a href="https://docs.rs/bdk">Documentation</a> | ||
</h4> | ||
</div> | ||
|
||
## About | ||
|
||
The `bdk` library aims to be the core building block for Bitcoin wallets of any kind. | ||
The `bdk-reserves` library provides an implementation of `proof-of-reserves` for bdk. | ||
The `bdk-reserves-web` is a simple web app to validate the proofs. | ||
|
||
* It validates proofs in the form of PSBT's. | ||
* The implementation was inspired by <a href="https://github.com/bitcoin/bips/blob/master/bip-0127.mediawiki">BIP-0127</a> and <a href="https://github.com/bitcoin/bips/blob/master/bip-0322.mediawiki">BIP-0322</a>. | ||
|
||
## Sponsorship | ||
The implementation of <b>bdk-reserves-web</b> was sponsored by <a href="https://seba.swiss">SEBA Bank</a>. | ||
|
||
|
||
## License | ||
|
||
Licensed under either of | ||
|
||
* Apache License, Version 2.0 | ||
([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0) | ||
* MIT license | ||
([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT) | ||
|
||
at your option. | ||
|
||
## Contribution | ||
|
||
Unless you explicitly state otherwise, any contribution intentionally submitted | ||
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be | ||
dual licensed as above, without any additional terms or conditions. |
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