name: CI on: push: branches: [ main ] pull_request: branches: [ main ] jobs: build: runs-on: ${{ matrix.os }} env: PKG_CONFIG_PATH: "/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/opt/homebrew/lib/pkgconfig:/usr/local/lib/pkgconfig" strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] rust: [stable] steps: - uses: actions/checkout@v4 - name: Install Rust uses: dtolnay/rust-toolchain@v1 with: toolchain: stable - name: Cache cargo uses: actions/cache@v4 with: path: ~/.cargo/registry key: ${{ runner.os }}-cargo-registry-${{ matrix.rust }} - name: Install system packages (Ubuntu) if: matrix.os == 'ubuntu-latest' run: | sudo apt-get update sudo apt-get install -y libusb-1.0-0-dev pkg-config libudev-dev - name: Install system packages (macOS) if: matrix.os == 'macos-latest' run: | brew update || true brew install libusb pkg-config || true - name: Debug: pkg-config & libusb (Ubuntu) if: matrix.os == 'ubuntu-latest' run: | echo "=== PKG_CONFIG & libusb diagnostic ===" echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH" which pkg-config || true pkg-config --version || true pkg-config --modversion libusb-1.0 || true pkg-config --cflags --libs libusb-1.0 || true echo "\nFiles under /usr/lib*/pkgconfig (matching libusb)" ls -la /usr/lib*/pkgconfig | grep libusb || true echo "\nList files from libusb-dev package (first 50 lines):" dpkg -L libusb-1.0-0-dev | head -n 50 || true echo "\nldconfig output for libusb (if available):" ldconfig -p | grep libusb || true - name: Debug: pkg-config & libusb (macOS) if: matrix.os == 'macos-latest' run: | echo "=== PKG_CONFIG & libusb diagnostic (macOS) ===" echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH" which pkg-config || true pkg-config --version || true pkg-config --modversion libusb-1.0 || true ls -la /opt/homebrew/lib/pkgconfig /usr/local/lib/pkgconfig || true brew list --versions libusb || true - name: Debug: Cargo.lock (key deps) run: | echo "=== Cargo.lock entries for key crates ===" grep -nE 'bdk|bip39|bip32|bitcoin|rusqlite|hidapi|aes-gcm|rusqlite' Cargo.lock || true - name: Build run: cargo build --workspace --verbose - name: Run Rust tests run: cargo test --workspace --verbose - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: '18' - name: Run Node integration tests (bindings) working-directory: ./bindings run: | npm ci || true npm test shell: bash