name: CI on: push: branches: [ main ] pull_request: branches: [ main ] jobs: build: runs-on: ${{ matrix.os }} 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: 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