waterfalls-client 0.2.0

Waterfalls API client library. Supports plaintext, TLS and Onion servers. Blocking or async
Documentation
name: CI

on:
  push:
    branches: [ "master" ]
  pull_request:
    branches: [ "master" ]

env:
  CARGO_TERM_COLOR: always

jobs:
  build-test:
    name: Build & Test
    runs-on: ubuntu-latest
    strategy:
      matrix:
        rust:
          - version: stable # STABLE
          # - version: 1.63.0 # MSRV
        features:
          - default
          - blocking
          - blocking-https
          - blocking-https-rustls
          - blocking-https-native
          - blocking-https-bundled
          - async
          - async-https
          - async-https-native
          - async-https-rustls
          - async-https-rustls-manual-roots
    steps:
    - name: Checkout
      uses: actions/checkout@v4
    - name: Generate cache key
      run: echo "${{ matrix.rust.version }} ${{ matrix.features }}" | tee .cache_key
    - name: Rust Cache
      uses: actions/cache@v3
      with:
        path: |
          ~/.cargo/registry
          ~/.cargo/git
          target
        key: ${{ runner.os }}-cargo-${{ hashFiles('.cache_key') }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }}
    - name: Install Rust Toolchain
      uses: dtolnay/rust-toolchain@v1
      with:
        toolchain: ${{ matrix.rust.version }}
    - name: Set profile
      run: rustup set profile minimal
    - name: Update toolchain
      run: rustup update
    - name: Pin dependencies for MSRV
      if: matrix.rust.version == '1.63.0'
      run: |
        cargo update -p reqwest --precise "0.12.4"
        cargo update -p minreq --precise "2.13.2"
        cargo update -p home --precise "0.5.5"
        cargo update -p url --precise "2.5.0"
        cargo update -p tokio --precise "1.38.1"
        cargo update -p security-framework-sys --precise "2.11.1"
        cargo update -p native-tls --precise "0.2.13"
        cargo update -p ring --precise "0.17.12"
        cargo update -p flate2 --precise "1.0.35"
        cargo update -p once_cell --precise "1.20.3"
        cargo update -p tracing-core --precise "0.1.33"
        cargo update -p parking_lot --precise "0.12.3"
        cargo update -p parking_lot_core --precise "0.9.10"
        cargo update -p lock_api --precise "0.4.12"
        cargo update -p socket2@0.6.0 --precise "0.5.10"
        cargo update -p webpki-roots@1.0.2 --precise "1.0.1"

        cargo update -p bzip2-sys --precise "0.1.12+1.0.8" # dev-dependency
    - name: Download bitcoind 28.0
      run: curl -sSL https://bitcoincore.org/bin/bitcoin-core-28.0/bitcoin-28.0-x86_64-linux-gnu.tar.gz | tar -xz
    - name: Build
      run: cargo build --features ${{ matrix.features }} --no-default-features
    - name: Test
      run: cargo test --features ${{ matrix.features }} --no-default-features
      env:
        BITCOIND_EXEC: ${{ github.workspace }}/bitcoin-28.0/bin/bitcoind
    - name: Test ignored tests
      run: cargo test --features ${{ matrix.features }} --no-default-features -- --ignored

  fmt:
    name: Rust Formatting
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4
      - name: Install Rust Toolchain
        uses: dtolnay/rust-toolchain@v1
        with:
            toolchain: nightly
            components: rustfmt
      - name: Check fmt
        run: cargo fmt --all --check

  clippy:
    name: Rust Clippy
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4
      - name: Install Rust Toolchain
        uses: dtolnay/rust-toolchain@v1
        with:
            toolchain: stable
            components: clippy
      - name: Rust Cache
        uses: actions/cache@v3
        with:
          path: |
            ~/.cargo/registry
            ~/.cargo/git
            target
          key: ${{ runner.os }}-cargo-${{ hashFiles('.cache_key') }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }}
      - name: Check clippy
        run: cargo clippy --all-features --all-targets -- -D warnings