orb-daemon 0.1.0

Orb DevKit desktop daemon - secure TCP/WS bridge for the Orb mobile app
name: Build Daemon

on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

env:
  CARGO_TERM_COLOR: always

jobs:
  build:
    runs-on: windows-latest
    
    steps:
    - uses: actions/checkout@v4
    
    - uses: dtolnay/rust-toolchain@stable
    
    - uses: Swatinem/rust-cache@v2
      with:
        workspaces: ./
    
    - name: Build
      run: cargo build --release
      env:
        RUST_BACKTRACE: 1
    
    - name: Run tests
      run: cargo test --release
    
    - name: Upload artifacts
      uses: actions/upload-artifact@v3
      with:
        name: orb-daemon-windows
        path: target/release/orb-daemon.exe
        retention-days: 30

  lint:
    runs-on: windows-latest
    steps:
    - uses: actions/checkout@v4
    - uses: dtolnay/rust-toolchain@stable
      with:
        components: rustfmt, clippy
    
    - name: Check formatting
      run: cargo fmt -- --check
    
    - name: Clippy
      run: cargo clippy -- -D warnings