Skip to content

Commit

Permalink
Merge pull request #34 from BP-WG/refactor
Browse files Browse the repository at this point in the history
Refactor to use strict types and no rust-bitcoin
  • Loading branch information
dr-orlovsky authored Feb 4, 2023
2 parents b8e2c05 + 4f75369 commit dcca092
Show file tree
Hide file tree
Showing 71 changed files with 3,362 additions and 6,297 deletions.
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# These are supported funding model platforms

github: [dr-orlovsky]
github: [lnp-bp, dr-orlovsky]
54 changes: 18 additions & 36 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,26 @@ env:
CARGO_TERM_COLOR: always

jobs:
default:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Default build
uses: actions-rs/cargo@v1
with:
command: check
args: --workspace
features:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
feature:
- async
- serde
steps:
- uses: actions/checkout@v2
Expand All @@ -40,33 +53,25 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-20.04, ubuntu-latest, macos-latest, windows-2019, windows-latest ]
os: [ ubuntu-20.04, ubuntu-22.04, macos-11, macos-12, windows-2019, windows-2022 ]
steps:
- uses: actions/checkout@v2
- name: Install macos dependencies
if: startsWith(matrix.os, 'macos')
run: brew install pkg-config
- name: Install rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Build with no features
- name: Build with all features
uses: actions-rs/cargo@v1
with:
command: check
args: --no-default-features
- name: Build with defaults
uses: actions-rs/cargo@v1
with:
command: check
args: --all-features
args: --workspace --all-targets --all-features
toolchains:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
toolchain: [ nightly, beta, stable, 1.59.0 ]
toolchain: [ nightly, beta, stable, 1.66.0 ]
steps:
- uses: actions/checkout@v2
- name: Install rust ${{ matrix.toolchain }}
Expand All @@ -79,26 +84,3 @@ jobs:
with:
command: check
args: --workspace --all-targets --all-features
dependency:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install latest stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Create dependency
run: |
cargo new dep_test
cp test/depCargo.toml dep_test/Cargo.toml
cd dep_test
- name: Build dependency
uses: actions-rs/cargo@v1
with:
command: check
args: --verbose
- name: Clean up
run: |
cd ..
rm -rf dep_test
2 changes: 1 addition & 1 deletion .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
args: --workspace --all-features --no-fail-fast
env:
CARGO_INCREMENTAL: '0'
RUSTFLAGS: '--cfg codecov -Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off'
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off'
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off'
- id: coverage
name: Generate coverage
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
name: Clippy
with:
command: clippy
args: --workspace --all-features
args: --workspace --all-features --all-targets
doc:
runs-on: ubuntu-latest
steps:
Expand All @@ -51,7 +51,7 @@ jobs:
override: true
components: rust-docs
- uses: actions-rs/cargo@v1
name: Clippy
name: Doc
with:
command: doc
args: --workspace --all-features
21 changes: 17 additions & 4 deletions .rustfmt.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,27 @@
max_width = 80
edition = "2021"
version = "Two"

max_width = 100
array_width = 100
attr_fn_like_width = 100
fn_call_width = 100

format_code_in_doc_comments = true
fn_single_line = true
format_macro_matchers = true
format_macro_bodues = true
format_strings = true
merge_derives = false
imports_granularity = "Module"
overflow_delimited_expr = true
group_imports = "StdExternalCrate"
reorder_modules = false
use_field_init_shorthand = true
use_try_shorthand = true
wrap_comments = true
comment_width = 80
where_single_line = true
unstable_features = true
empty_item_single_line = true

binop_separator = "Back"

imports_granularity = "Module"
group_imports = "StdExternalCrate"
Loading

0 comments on commit dcca092

Please sign in to comment.