From 12f639464812dbeb5bf827b31523fe7bd8a02760 Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Tue, 19 Jan 2021 01:22:52 +0100 Subject: [PATCH] Fixing CI --- .github/workflows/build.yml | 76 +------------------------------ .github/workflows/codecov.yml | 2 - .github/workflows/publication.yml | 1 - .github/workflows/test.yml | 2 - CHANGELOG.md | 15 ++++-- contrib/depCargo.toml | 3 +- contrib/test.sh | 22 +-------- src/lib.rs | 11 ++++- 8 files changed, 24 insertions(+), 108 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 117aef8e..a61be161 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,26 +16,10 @@ jobs: fail-fast: false matrix: feature: - # Library components, one by one - - lnp - # Cryptographic optionals - - keygen - elgamal - - bulletproofs - - ed25519-dalek - # Core rust optionals - serde - - tokio - - async - # Networking - - url - - websockets - # Full LNP strength, but without Serde - - lnp,websockets,url,tokio,async,keygen,bulletproofs,ed25519-dalek steps: - uses: actions/checkout@v2 - - name: Install dependencies - run: sudo apt-get update && sudo apt-get install -y libzmq3-dev - name: Install rust stable uses: actions-rs/toolchain@v1 with: @@ -59,12 +43,9 @@ jobs: os: [ ubuntu-18.04, ubuntu-20.04, macos-10.15, macos-11.0, windows-2019 ] steps: - uses: actions/checkout@v2 - - name: Install linux dependencies - if: startsWith(matrix.os, 'ubuntu') - run: sudo apt-get update && sudo apt-get install -y libzmq3-dev - name: Install macos dependencies if: startsWith(matrix.os, 'macos') - run: brew install pkg-config zmq + run: brew install pkg-config - name: Install rust stable uses: actions-rs/toolchain@v1 with: @@ -80,33 +61,6 @@ jobs: with: command: check args: --all-features - tor: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - feature: - - tor - - tor,url - steps: - - uses: actions/checkout@v2 - - name: Install dependencies - run: sudo apt-get update && sudo apt-get install -y libzmq3-dev libssl-dev - - name: Install rust stable - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - - name: Feature ${{ matrix.feature }} - uses: actions-rs/cargo@v1 - with: - command: check - args: --no-default-features --features=${{ matrix.feature }} - - name: Defaults + ${{ matrix.feature }} - uses: actions-rs/cargo@v1 - with: - command: check - args: --features=${{ matrix.feature }} toolchains: runs-on: ubuntu-latest strategy: @@ -115,8 +69,6 @@ jobs: toolchain: [ nightly, beta, stable, 1.45.0 ] steps: - uses: actions/checkout@v2 - - name: Install dependencies - run: sudo apt-get update && sudo apt-get install -y libzmq3-dev libssl-dev - name: Install rust ${{ matrix.toolchain }} uses: actions-rs/toolchain@v1 with: @@ -127,32 +79,10 @@ jobs: with: command: check args: --workspace --all-targets --all-features - toolchains-old: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - toolchain: [ 1.41.1 ] - steps: - - uses: actions/checkout@v2 - - name: Install dependencies - run: sudo apt-get update && sudo apt-get install -y libzmq3-dev libssl-dev - - name: Install rust ${{ matrix.toolchain }} - uses: actions-rs/toolchain@v1 - with: - toolchain: ${{ matrix.toolchain }} - override: true - - name: Custom features - uses: actions-rs/cargo@v1 - with: - command: check - args: --workspace --all-targets --features=lnp,websockets,url,keygen,serde,bulletproofs dependency: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Install dependencies - run: sudo apt-get update && sudo apt-get install -y libzmq3-dev libssl-dev - name: Install latest stable uses: actions-rs/toolchain@v1 with: @@ -185,10 +115,6 @@ jobs: with: toolchain: stable override: true - - name: Install dependencies - run: | - sudo apt-get update - sudo apt-get install -y libpcre3-dev libssl-dev - name: set environment variables run: | ANDROID_SDK_ROOT="$GITHUB_WORKSPACE/sdk" diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 17f436f7..390a6e9c 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -14,8 +14,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Install dependencies - run: sudo apt-get update && sudo apt-get install -y libzmq3-dev libssl-dev - name: Install latest nightly uses: actions-rs/toolchain@v1 with: diff --git a/.github/workflows/publication.yml b/.github/workflows/publication.yml index d9b7e9a7..cc9025a0 100644 --- a/.github/workflows/publication.yml +++ b/.github/workflows/publication.yml @@ -14,5 +14,4 @@ jobs: steps: - uses: actions/checkout@v2 - run: cargo login ${{ secrets.CRATES_IO_TOKEN }} - - run: cd derive && cargo publish --all-features; sleep 30 - run: cargo publish --all-features; sleep 30 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 28bdba8c..3705ca1a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,8 +14,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Install dependencies - run: sudo apt-get update && sudo apt-get install -y libzmq3-dev libssl-dev - name: Install latest stable uses: actions-rs/toolchain@v1 with: diff --git a/CHANGELOG.md b/CHANGELOG.md index 4728b07a..090e03a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,16 +1,23 @@ Change Log ========== -v0.3.0-alpha.1 +v0.3.0-alpha.3 -------------- -- Serde encoding fixes (proper use of `serde_as` for wrapped types) -- BIP32 & descriptor enhancements -- Miniscript 4.0 migration +- Internet2, LNP Core, Descriptor Wallet crates externalized and removed from + this repository +- Repository split into multiple crates (lnpbp, client_side_validation, + strict_encoding) v0.3.0-alpha.2 -------------- - RGB Core Library is extracted and externalized from LNP/BP Core Library +v0.3.0-alpha.1 +-------------- +- Serde encoding fixes (proper use of `serde_as` for wrapped types) +- BIP32 & descriptor enhancements +- Miniscript 4.0 migration + v0.2.1, v0.2.2 -------------- - Fixing serde to use Bech32 encoding for ContractId and SchemaId types diff --git a/contrib/depCargo.toml b/contrib/depCargo.toml index 577d5eb0..cb517055 100644 --- a/contrib/depCargo.toml +++ b/contrib/depCargo.toml @@ -1,6 +1,7 @@ # This is an add-on that must be added to any dependency using this library lnpbp = { path = "..", features = ["all"] } -lnpbp_derive = { path = "../derive" } +strict_encoding = { path = "../strict_encoding", features = ["all"] } +client_side_validation = { path = "../client_side_validation" } [workspace] diff --git a/contrib/test.sh b/contrib/test.sh index 2e02c8f4..aeb77cea 100755 --- a/contrib/test.sh +++ b/contrib/test.sh @@ -4,21 +4,7 @@ AS_DEPENDENCY=true DO_LINT=true # Library components -FEATURES="lnp" -# Cryptographic optionals -FEATURES="${FEATURES} keygen bulletproofs elgamal ed25519-dalek" -# Core rust optionals -FEATURES="${FEATURES} serde tokio async" -# Networking -FEATURES="${FEATURES} tor url websockets" -FEATURES="${FEATURES} tor,url" -# Full LNP strength, but without Serde -FEATURES="${FEATURES} lnp,websockets,url,tokio,async,keygen,bulletproofs,ed25519-dalek" - -if [ "$DO_COV" = true ] -then - export RUSTFLAGS="-C link-dead-code" -fi +FEATURES="serde elgamal" # Use toolchain if explicitly specified @@ -37,12 +23,6 @@ do cargo check --verbose --features="$feature" --all-targets done -# Check that we can build services with different features -for feature in "server client embedded cli server,serde client,serde" -do - cargo check --manifest-path services/Cargo.toml --verbose --features="$feature" -done - # Fuzz if told to if [ "$DO_FUZZ" = true ] then diff --git a/src/lib.rs b/src/lib.rs index 2ff6ed83..678d4284 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -29,8 +29,6 @@ extern crate amplify; #[macro_use] extern crate amplify_derive; #[macro_use] -extern crate strict_encoding; -#[macro_use] extern crate lazy_static; #[cfg(feature = "serde")] @@ -42,6 +40,15 @@ extern crate serde_crate as serde; #[macro_use] extern crate bitcoin_hashes; +pub extern crate client_side_validation; +pub use client_side_validation::commit_encode_list; +#[macro_use] +pub extern crate strict_encoding; +pub use strict_encoding::{ + strict_decode_self, strict_encode_list, test_encode, + test_enum_u8_exhaustive, test_garbage_exhaustive, +}; + pub mod chain; pub mod dbc; #[cfg(feature = "elgamal")]