bitbox-api 0.12.0

A library to interact with BitBox hardware wallets
Documentation
name: Rust

on: [push, pull_request]

jobs:
  Stable:
    name: Test - stable toolchain
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
    steps:
      - uses: actions/checkout@v3
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: clippy, rustfmt
      - name: Enable simulators caching
        uses: actions/cache@v4
        with:
          key: ${{runner.os}}-simulators-cache-${{hashFiles('./tests/simulators.json')}}
          path: |
            ./tests/simulators
      - run: |
          sudo apt-get update
          sudo apt-get install -y libudev-dev
          ./ci.sh

  Beta:
    name: Test - beta toolchain
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
    steps:
      - uses: actions/checkout@v3
      - uses: dtolnay/rust-toolchain@beta
        with:
          components: clippy, rustfmt
      - name: Enable simulators caching
        uses: actions/cache@v4
        with:
          key: ${{runner.os}}-simulators-cache-${{hashFiles('./tests/simulators.json')}}
          path: |
            ./tests/simulators
      - run: |
          sudo apt-get update
          sudo apt-get install -y libudev-dev
          ./ci.sh

  WASM:
    name: WASM and Sandbox
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: dtolnay/rust-toolchain@stable
      - run: |
          sudo apt-get update
          sudo apt-get install -y clang jq
          cargo install --force wasm-pack
          make wasm
          make build-sandbox

  # Temporarily disabled; re-enable when we find a way to use the same protobuf compiler version
  # in the developer docs and here, otherwise this check will often fail.
  # Check-Protobufs:
  #   name: Check that the generated protobuf file is up to date
  #   runs-on: ubuntu-latest
  #   steps:
  #     - uses: actions/checkout@v3
  #     - uses: dtolnay/rust-toolchain@stable
  #     - run: |
  #         sudo apt-get update
  #         sudo apt-get install -y protobuf-compiler
  #         cargo install rust-script
  #         make build-protos
  #         git diff --quiet