tests: virtual HID device test harness for all four backends (hidraw, libusb, winapi, darwin) #1
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: FreeBSD Virtual HID Device Test (manual) | |
| # Builds HIDAPI (libusb backend) + the device-I/O test on a real FreeBSD VM and | |
| # runs ctest. FreeBSD has no userspace facility to create a virtual HID device | |
| # (see src/tests/test_virtual_device_freebsd.c), so DeviceIO_libusb self-skips | |
| # (CTest code 77) - this job verifies the harness and the libusb backend build | |
| # and run on FreeBSD, and is the place an end-to-end test would live once a | |
| # mechanism (a real USB Device Controller, or usrhid(4)) is available. | |
| # | |
| # Runs on demand (workflow_dispatch) or on a PR labelled 'ci-virtual-device'. | |
| # The FreeBSD VM runs under QEMU on the Linux runner, so this is slow; hence it | |
| # is kept out of the per-push matrix. | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| types: [opened, reopened, labeled, synchronize] | |
| jobs: | |
| freebsd-vhid: | |
| if: github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'ci-virtual-device') | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build + run device-I/O test on FreeBSD | |
| uses: vmactions/freebsd-vm@v1 | |
| with: | |
| usesh: true | |
| prepare: | | |
| pkg install -y cmake ninja libiconv pkgconf | |
| run: | | |
| cmake -GNinja -B build -S . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DHIDAPI_WITH_TESTS=ON | |
| cmake --build build | |
| cd build | |
| ctest --output-on-failure |