ftd2xx-sys 0.2.0

libftd2xx FFI bindings
# SPDX-License-Identifier: GPL-3.0-or-later
# Copyright (C) 2026  Nicolas Gabriel Cotti

name: "Rust compiler, tester and documenter"
description: <
  Runs "cargo fmt", "cargo build", "cargo test" and "cargo doc",
  ensuring that the project compiles, all tests pass and there are no
  warnings in the generated documentation.
on: push

jobs:
  Rust_compiler:
    runs-on: ubuntu-latest
    env:
      REPO_PATH: .
      RUST_PATH: .
      D2XX_TAR_FILE: "vendor/libftd2xx-linux-x86_64-1.4.35.tgz"
      D2XX_SRC_PATH: "vendor/linux-x86_64"
      MPSSE_TAR_FILE: "vendor/libmpsse-x86_64-1.0.9.tgz"
      MPSSE_SRC_PATH: "vendor/release-x86_64/build"
    steps:
      - name: "Checkout project repo"
        uses: actions/checkout@v5
        with:
          path: ${{ env.REPO_PATH }}
          lfs: true

      - name: "Install libftd2xx"
        run: |
          tar -C "${{ env.REPO_PATH }}/vendor" -xzf "${{ env.D2XX_TAR_FILE }}"
          tar -C "${{ env.REPO_PATH }}/vendor" -xzf "${{ env.MPSSE_TAR_FILE }}"
          ./install_libs.sh "${{ env.REPO_PATH }}/${{ env.D2XX_SRC_PATH }}" "${{ env.REPO_PATH }}/${{ env.MPSSE_SRC_PATH }}"

      - name: "Call cargo"
        uses: ncotti/cotti-ci/actions/rust@main
        with:
          target_dir: ${{ env.RUST_PATH }}