Skip to content

Add support for 'nfc' and 'xpub' commands #138

Add support for 'nfc' and 'xpub' commands

Add support for 'nfc' and 'xpub' commands #138

Workflow file for this run

on:
push:
branches:
- 'master'
- 'release/*'
pull_request:
branches:
- 'master'
- 'release/*'
name: CI
jobs:
build:
name: Build workspace
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- version: stable
- version: 1.85.0 # MSRV
msrv: true
features:
- --no-default-features
- --features default
- --all-features
steps:
- name: checkout
uses: actions/checkout@v2
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust.version }}
override: true
profile: minimal
- name: Rust Cache
uses: Swatinem/[email protected]
- name: Install PCSC development libraries
run: |
sudo apt-get update
sudo apt-get install -y libpcsclite-dev swig
- name: Use MSRV Cargo.toml # Don't include "cli" in workspace if using MSRV
if: ${{ matrix.rust.msrv }}
run: cp Cargo.toml.MSRV Cargo.toml
- name: Build
run: cargo build ${{ matrix.features }}
test:
name: Test with emulator
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- version: stable
- version: 1.85.0 # MSRV
msrv: true
steps:
- name: checkout
uses: actions/checkout@v2
with:
submodules: 'true'
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust.version }}
override: true
profile: minimal
- name: Rust Cache
uses: Swatinem/[email protected]
- name: Use MSRV Cargo.toml # Don't include "cli" in workspace if using MSRV
if: ${{ matrix.rust.msrv }}
run: cp Cargo.toml.MSRV Cargo.toml
- name: Install PCSC development libraries
run: |
sudo apt-get update
sudo apt-get install -y libpcsclite-dev swig
- name: Test
run: |
python3 -m venv emulator_env
source emulator_env/bin/activate
pip install -r coinkite/coinkite-tap-proto/emulator/requirements.txt
cargo test -p rust-cktap --features emulator
rust_fmt:
name: Rust fmt
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
profile: minimal
components: rustfmt
- name: Check fmt
run: cargo +nightly fmt --all
clippy_check:
name: Clippy check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: clippy
override: true
- name: Rust Cache
uses: Swatinem/[email protected]
- name: Install libpcsclite-dev
run: sudo apt install libpcsclite-dev
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features --all-targets -- -D warnings