diff --git a/src/hidapi/.appveyor.yml b/src/hidapi/.appveyor.yml deleted file mode 100644 index 210b3fa463..0000000000 --- a/src/hidapi/.appveyor.yml +++ /dev/null @@ -1,31 +0,0 @@ -environment: - matrix: - - BUILD_ENV: msbuild - arch: x64 - - BUILD_ENV: msbuild - arch: Win32 - - BUILD_ENV: cygwin - -for: - - - matrix: - only: - - BUILD_ENV: msbuild - - os: Visual Studio 2015 - - build_script: - - cmd: msbuild .\windows\hidapi.sln /p:Configuration=Release /p:Platform=%arch% /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" - - - - matrix: - only: - - BUILD_ENV: cygwin - - os: Visual Studio 2022 - - install: - - cmd: C:\cygwin64\setup-x86_64.exe --quiet-mode --no-shortcuts --upgrade-also --packages autoconf,automake - - build_script: - - cmd: C:\cygwin64\bin\bash -exlc "cd $APPVEYOR_BUILD_FOLDER; ./bootstrap; ./configure; make" diff --git a/src/hidapi/.builds/freebsd.yml b/src/hidapi/.builds/freebsd.yml deleted file mode 100644 index 1679b03c38..0000000000 --- a/src/hidapi/.builds/freebsd.yml +++ /dev/null @@ -1,34 +0,0 @@ -image: freebsd/latest -packages: -- autoconf -- automake -- gmake -- libiconv -- libtool -- pkgconf -- cmake -- ninja -sources: -- https://github.com/libusb/hidapi -tasks: -- configure: | - cd hidapi - echo Configure Autotools build - ./bootstrap - ./configure - echo Configure CMake build - mkdir -p build install_cmake - cmake -GNinja -B build -S . -DCMAKE_INSTALL_PREFIX=install_cmake -- build-autotools: | - cd hidapi - make - make DESTDIR=$PWD/root install - make clean -- build-cmake: | - cd hidapi/build - ninja - ninja install - ninja clean -- build-manual: | - cd hidapi/libusb - gmake -f Makefile-manual diff --git a/src/hidapi/.builds/netbsd.yml b/src/hidapi/.builds/netbsd.yml deleted file mode 100644 index 413d91c020..0000000000 --- a/src/hidapi/.builds/netbsd.yml +++ /dev/null @@ -1,18 +0,0 @@ -image: netbsd/latest -packages: -- cmake -- pkgconf -- libusb1 -- libiconv -sources: -- https://github.com/libusb/hidapi -tasks: -- configure: | - cd hidapi - mkdir -p build install - cmake -B build -S . -DCMAKE_INSTALL_PREFIX=install -- build: | - cd hidapi/build - make - make install - make clean diff --git a/src/hidapi/.builds/openbsd.yml b/src/hidapi/.builds/openbsd.yml deleted file mode 100644 index 780df7f661..0000000000 --- a/src/hidapi/.builds/openbsd.yml +++ /dev/null @@ -1,19 +0,0 @@ -image: openbsd/latest -packages: -- cmake -- pkgconf -- libusb1-- -- libiconv -- ninja -sources: -- https://github.com/libusb/hidapi -tasks: -- configure: | - cd hidapi - mkdir -p build install - cmake -GNinja -B build -S . -DCMAKE_INSTALL_PREFIX=install -- build: | - cd hidapi/build - ninja - ninja install - ninja clean diff --git a/src/hidapi/.cirrus.yml b/src/hidapi/.cirrus.yml deleted file mode 100644 index b4cf201667..0000000000 --- a/src/hidapi/.cirrus.yml +++ /dev/null @@ -1,33 +0,0 @@ -alpine_task: - container: - image: alpine:latest - install_script: apk add autoconf automake g++ gcc libusb-dev libtool linux-headers eudev-dev make musl-dev - script: - - ./bootstrap - - ./configure || { cat config.log; exit 1; } - - make - - make install - -freebsd11_task: - freebsd_instance: - image: freebsd-11-2-release-amd64 - install_script: - - pkg install -y - autoconf automake libiconv libtool pkgconf - script: - - ./bootstrap - - ./configure || { cat config.log; exit 1; } - - make - - make install - -freebsd12_task: - freebsd_instance: - image: freebsd-12-1-release-amd64 - install_script: - - pkg install -y - autoconf automake libiconv libtool pkgconf - script: - - ./bootstrap - - ./configure || { cat config.log; exit 1; } - - make - - make install diff --git a/src/hidapi/.gitattributes b/src/hidapi/.gitattributes deleted file mode 100644 index edb79febc5..0000000000 --- a/src/hidapi/.gitattributes +++ /dev/null @@ -1,7 +0,0 @@ -* text=auto - -*.sln text eol=crlf -*.vcproj text eol=crlf - -bootstrap text eol=lf -configure.ac text eol=lf diff --git a/src/hidapi/.github/workflows/builds.yml b/src/hidapi/.github/workflows/builds.yml deleted file mode 100644 index 056df2cc08..0000000000 --- a/src/hidapi/.github/workflows/builds.yml +++ /dev/null @@ -1,540 +0,0 @@ -name: GitHub Builds - -on: [push, pull_request] - -env: - NIX_COMPILE_FLAGS: -Wall -Wextra -pedantic -Werror - MSVC_COMPILE_FLAGS: /W4 /WX - -jobs: - macos-automake: - - runs-on: macos-latest - - steps: - - uses: actions/checkout@v3 - - name: Install build tools - run: brew install autoconf automake libtool - - name: Configure Automake - run: | - ./bootstrap - ./configure --prefix=$(pwd)/install - - name: Build Automake - run: | - make - make install - - name: Clean build - run: make clean - - name: Build Manual makefile - working-directory: mac - run: make -f Makefile-manual - - - macos-cmake: - - runs-on: macos-latest - - steps: - - uses: actions/checkout@v3 - with: - path: hidapisrc - - name: Install dependencies - run: brew install meson ninja - - name: Configure CMake - run: | - rm -rf build install - cmake -B build/shared -S hidapisrc -DCMAKE_BUILD_TYPE=RelWithDebInfo -DHIDAPI_ENABLE_ASAN=ON -DCMAKE_INSTALL_PREFIX=install/shared -DHIDAPI_BUILD_HIDTEST=ON "-DCMAKE_C_FLAGS=${NIX_COMPILE_FLAGS}" - cmake -B build/static -S hidapisrc -DCMAKE_BUILD_TYPE=RelWithDebInfo -DHIDAPI_ENABLE_ASAN=ON -DCMAKE_INSTALL_PREFIX=install/static -DBUILD_SHARED_LIBS=FALSE -DHIDAPI_BUILD_HIDTEST=ON "-DCMAKE_C_FLAGS=${NIX_COMPILE_FLAGS}" - cmake -B build/framework -S hidapisrc -DCMAKE_BUILD_TYPE=RelWithDebInfo -DHIDAPI_ENABLE_ASAN=ON -DCMAKE_INSTALL_PREFIX=install/framework -DCMAKE_FRAMEWORK=ON -DHIDAPI_BUILD_HIDTEST=ON "-DCMAKE_C_FLAGS=${NIX_COMPILE_FLAGS}" - - name: Build CMake Shared - working-directory: build/shared - run: make install - - name: Build CMake Static - working-directory: build/static - run: make install - - name: Build CMake Framework - working-directory: build/framework - run: make install - - name: Check artifacts - uses: andstor/file-existence-action@v2 - with: - files: "install/shared/lib/libhidapi.dylib, \ - install/shared/include/hidapi/hidapi.h, \ - install/shared/include/hidapi/hidapi_darwin.h, \ - install/static/lib/libhidapi.a, \ - install/static/include/hidapi/hidapi.h, \ - install/static/include/hidapi/hidapi_darwin.h, \ - install/framework/lib/hidapi.framework/hidapi, \ - install/framework/lib/hidapi.framework/Headers/hidapi.h, \ - install/framework/lib/hidapi.framework/Headers/hidapi_darwin.h" - fail: true - - name: Check CMake Export Package Shared - run: | - cmake \ - -B build/shared_test \ - -S hidapisrc/hidtest \ - -Dhidapi_ROOT=install/shared \ - -DCMAKE_INSTALL_PREFIX=install/shared_test \ - "-DCMAKE_C_FLAGS=${NIX_COMPILE_FLAGS}" - cd build/shared_test - make install - - name: Check CMake Export Package Static - run: | - cmake \ - -B build/static_test \ - -S hidapisrc/hidtest \ - -Dhidapi_ROOT=install/static \ - -DCMAKE_INSTALL_PREFIX=install/static_test \ - "-DCMAKE_C_FLAGS=${NIX_COMPILE_FLAGS}" - cd build/static_test - make install - - - name: Check Meson build - run: | - meson setup build_meson hidapisrc - cd build_meson - ninja - - - ubuntu-cmake: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - path: hidapisrc - - name: Install dependencies - run: | - sudo apt update - sudo apt install libudev-dev libusb-1.0-0-dev python3-pip ninja-build - sudo -H pip3 install meson - - name: Configure CMake - run: | - rm -rf build install - cmake -B build/shared -S hidapisrc -DCMAKE_BUILD_TYPE=RelWithDebInfo -DHIDAPI_ENABLE_ASAN=ON -DCMAKE_INSTALL_PREFIX=install/shared -DHIDAPI_BUILD_HIDTEST=ON "-DCMAKE_C_FLAGS=${NIX_COMPILE_FLAGS}" - cmake -B build/static -S hidapisrc -DCMAKE_BUILD_TYPE=RelWithDebInfo -DHIDAPI_ENABLE_ASAN=ON -DCMAKE_INSTALL_PREFIX=install/static -DBUILD_SHARED_LIBS=FALSE -DHIDAPI_BUILD_HIDTEST=ON "-DCMAKE_C_FLAGS=${NIX_COMPILE_FLAGS}" - - name: Build CMake Shared - working-directory: build/shared - run: make install - - name: Build CMake Static - working-directory: build/static - run: make install - - name: Check artifacts - uses: andstor/file-existence-action@v2 - with: - files: "install/shared/lib/libhidapi-libusb.so, \ - install/shared/lib/libhidapi-hidraw.so, \ - install/shared/include/hidapi/hidapi.h, \ - install/shared/include/hidapi/hidapi_libusb.h, \ - install/static/lib/libhidapi-libusb.a, \ - install/static/lib/libhidapi-hidraw.a, \ - install/static/include/hidapi/hidapi.h, \ - install/static/include/hidapi/hidapi_libusb.h" - fail: true - - name: Check CMake Export Package Shared - run: | - cmake \ - -B build/shared_test \ - -S hidapisrc/hidtest \ - -Dhidapi_ROOT=install/shared \ - -DCMAKE_INSTALL_PREFIX=install/shared_test \ - "-DCMAKE_C_FLAGS=${NIX_COMPILE_FLAGS}" - cd build/shared_test - make install - - name: Check CMake Export Package Static - run: | - cmake \ - -B build/static_test \ - -S hidapisrc/hidtest \ - -Dhidapi_ROOT=install/static \ - -DCMAKE_INSTALL_PREFIX=install/static_test \ - "-DCMAKE_C_FLAGS=${NIX_COMPILE_FLAGS}" - cd build/static_test - make install - - - name: Check Meson build - run: | - meson setup build_meson hidapisrc - cd build_meson - ninja - - - windows-cmake: - - runs-on: windows-latest - - steps: - - uses: actions/checkout@v3 - with: - path: hidapisrc - - name: Install dependencies - run: | - choco install ninja - pip3 install meson - refreshenv - - name: Configure CMake MSVC - shell: cmd - run: | - cmake -B build\msvc -S hidapisrc -DCMAKE_BUILD_TYPE=RelWithDebInfo -DHIDAPI_WITH_TESTS=ON -DHIDAPI_BUILD_PP_DATA_DUMP=ON -DHIDAPI_ENABLE_ASAN=ON -DCMAKE_INSTALL_PREFIX=install\msvc -DHIDAPI_BUILD_HIDTEST=ON "-DCMAKE_C_FLAGS=%MSVC_COMPILE_FLAGS%" - - name: Build CMake MSVC - working-directory: build/msvc - run: cmake --build . --config RelWithDebInfo --target install - - name: Check artifacts MSVC - uses: andstor/file-existence-action@v2 - with: - files: "install/msvc/lib/hidapi.lib, \ - install/msvc/bin/hidapi.dll, \ - install/msvc/include/hidapi/hidapi.h, \ - install/msvc/include/hidapi/hidapi_winapi.h" - fail: true - - name: Check CMake Export Package - shell: cmd - run: | - cmake ^ - -B build\msvc_test ^ - -S hidapisrc\hidtest ^ - -Dhidapi_ROOT=install\msvc ^ - -DCMAKE_INSTALL_PREFIX=install\msvc_test ^ - "-DCMAKE_C_FLAGS=%MSVC_COMPILE_FLAGS%" - cd build\msvc_test - cmake --build . --target install - - name: Run CTest MSVC - shell: cmd - working-directory: build/msvc - run: ctest -C RelWithDebInfo --rerun-failed --output-on-failure - - - name: Configure CMake NMake - shell: cmd - run: | - call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" - cmake -G"NMake Makefiles" -B build\nmake -S hidapisrc -DCMAKE_BUILD_TYPE=RelWithDebInfo -DHIDAPI_WITH_TESTS=ON -DHIDAPI_BUILD_PP_DATA_DUMP=ON -DHIDAPI_ENABLE_ASAN=ON -DCMAKE_INSTALL_PREFIX=install\nmake -DHIDAPI_BUILD_HIDTEST=ON "-DCMAKE_C_FLAGS=%MSVC_COMPILE_FLAGS%" - - name: Build CMake NMake - working-directory: build\nmake - shell: cmd - run: | - call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" - nmake install - - name: Check artifacts NMake - uses: andstor/file-existence-action@v2 - with: - files: "install/nmake/lib/hidapi.lib, \ - install/nmake/bin/hidapi.dll, \ - install/nmake/include/hidapi/hidapi.h, \ - install/nmake/include/hidapi/hidapi_winapi.h" - fail: true - - name: Check CMake Export Package NMake - shell: cmd - run: | - call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" - cmake ^ - -G"NMake Makefiles" ^ - -B build\nmake_test ^ - -S hidapisrc\hidtest ^ - -Dhidapi_ROOT=install\nmake ^ - -DCMAKE_INSTALL_PREFIX=install\nmake_test ^ - "-DCMAKE_C_FLAGS=%MSVC_COMPILE_FLAGS%" - cd build\nmake_test - nmake install - - name: Run CTest NMake - working-directory: build\nmake - run: ctest --rerun-failed --output-on-failure - - - name: Configure CMake MinGW - shell: cmd - run: | - cmake -G"MinGW Makefiles" -B build\mingw -S hidapisrc -DCMAKE_BUILD_TYPE=RelWithDebInfo -DHIDAPI_WITH_TESTS=ON -DHIDAPI_BUILD_PP_DATA_DUMP=ON -DCMAKE_INSTALL_PREFIX=install\mingw -DHIDAPI_BUILD_HIDTEST=ON "-DCMAKE_C_FLAGS=%NIX_COMPILE_FLAGS%" - - name: Build CMake MinGW - working-directory: build\mingw - run: cmake --build . --target install - - name: Check artifacts MinGW - uses: andstor/file-existence-action@v2 - with: - files: "install/mingw/lib/libhidapi.dll.a, \ - install/mingw/bin/libhidapi.dll, \ - install/mingw/include/hidapi/hidapi.h, \ - install/mingw/include/hidapi/hidapi_winapi.h" - fail: true - - name: Check CMake Export Package MinGW - shell: cmd - run: | - cmake ^ - -G"MinGW Makefiles" ^ - -B build\mingw_test ^ - -S hidapisrc\hidtest ^ - -Dhidapi_ROOT=install\mingw ^ - -DCMAKE_INSTALL_PREFIX=install\mingw_test ^ - "-DCMAKE_C_FLAGS=%NIX_COMPILE_FLAGS%" - cd build\mingw_test - cmake --build . --target install - - name: Run CTest MinGW - working-directory: build\mingw - run: ctest --rerun-failed --output-on-failure - - - name: Check Meson build - shell: cmd - run: | - call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" - meson setup build_meson hidapisrc - cd build_meson - ninja - - - windows-msbuild: - - runs-on: windows-latest - - steps: - - uses: actions/checkout@v3 - - uses: microsoft/setup-msbuild@v1.1 - - name: MSBuild x86 - run: msbuild windows\hidapi.sln /p:Configuration=Release /p:Platform=Win32 - - name: Check artifacts x86 - uses: andstor/file-existence-action@v2 - with: - files: "windows/Release/hidapi.dll, windows/Release/hidapi.lib, windows/Release/hidapi.pdb" - fail: true - - name: MSBuild x64 - run: msbuild windows\hidapi.sln /p:Configuration=Release /p:Platform=x64 - - name: Check artifacts x64 - uses: andstor/file-existence-action@v2 - with: - files: "windows/x64/Release/hidapi.dll, windows/x64/Release/hidapi.lib, windows/x64/Release/hidapi.pdb" - fail: true - - name: Gather artifacts - run: | - md artifacts - md artifacts\x86 - md artifacts\x64 - md artifacts\include - Copy-Item "windows\Release\hidapi.dll","windows\Release\hidapi.lib","windows\Release\hidapi.pdb" -Destination "artifacts\x86" - Copy-Item "windows\x64\Release\hidapi.dll","windows\x64\Release\hidapi.lib","windows\x64\Release\hidapi.pdb" -Destination "artifacts\x64" - Copy-Item "hidapi\hidapi.h","windows\hidapi_winapi.h" -Destination "artifacts\include" - - name: Upload artifacts - uses: actions/upload-artifact@v3 - with: - name: hidapi-win - path: artifacts/ - retention-days: ${{ (github.event_name == 'pull_request' || github.ref_name != 'master') && 7 || 90 }} - - - fedora-mingw: - - runs-on: ubuntu-latest - container: fedora:latest - steps: - - uses: actions/checkout@v3 - with: - path: hidapisrc - - name: Install dependencies - run: sudo dnf install -y autoconf automake libtool mingw64-gcc cmake ninja-build make - - name: Configure CMake - run: | - rm -rf build install - mingw64-cmake -B build/shared-cmake -S hidapisrc -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=install/shared-cmake -DHIDAPI_BUILD_HIDTEST=ON "-DCMAKE_C_FLAGS=${NIX_COMPILE_FLAGS}" - mingw64-cmake -B build/static-cmake -S hidapisrc -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=install/static-cmake -DBUILD_SHARED_LIBS=FALSE -DHIDAPI_BUILD_HIDTEST=ON "-DCMAKE_C_FLAGS=${NIX_COMPILE_FLAGS}" - - name: Configure Automake - working-directory: hidapisrc - run: | - ./bootstrap - mingw64-configure - - name: Build CMake Shared - working-directory: build/shared-cmake - run: ninja install - - name: Build CMake Static - working-directory: build/static-cmake - run: ninja install - - name: Build Automake - working-directory: hidapisrc - run: | - make - make DESTDIR=$PWD/../install/automake install - make clean - - name: Build manual Makefile - working-directory: hidapisrc/windows - run: make -f Makefile-manual OS=MINGW CC=x86_64-w64-mingw32-gcc - - name: Check artifacts - uses: andstor/file-existence-action@v2 - with: - files: "install/shared-cmake/bin/libhidapi.dll, \ - install/shared-cmake/lib/libhidapi.dll.a, \ - install/shared-cmake/include/hidapi/hidapi.h, \ - install/shared-cmake/include/hidapi/hidapi_winapi.h, \ - install/static-cmake/lib/libhidapi.a, \ - install/static-cmake/include/hidapi/hidapi.h, \ - install/static-cmake/include/hidapi/hidapi_winapi.h" - fail: true - - name: Check CMake Export Package Shared - run: | - mingw64-cmake \ - -GNinja \ - -B build/shared_test \ - -S hidapisrc/hidtest \ - -Dhidapi_DIR=$PWD/install/shared-cmake/lib/cmake/hidapi \ - -DCMAKE_INSTALL_PREFIX=install/shared_test \ - "-DCMAKE_C_FLAGS=${NIX_COMPILE_FLAGS}" - cd build/shared_test - ninja install - - name: Check CMake Export Package Static - run: | - mingw64-cmake \ - -GNinja \ - -B build/static_test \ - -S hidapisrc/hidtest \ - -Dhidapi_DIR=$PWD/install/static-cmake/lib/cmake/hidapi \ - -DCMAKE_INSTALL_PREFIX=install/static_test \ - "-DCMAKE_C_FLAGS=${NIX_COMPILE_FLAGS}" - cd build/static_test - ninja install - - - archlinux: - - runs-on: ubuntu-latest - container: archlinux:latest - steps: - - uses: actions/checkout@v3 - with: - path: hidapisrc - - name: Install dependencies - run: | - pacman -Sy - pacman -S --noconfirm gcc pkg-config autoconf automake libtool libusb libudev0 cmake make - - name: Configure CMake - run: | - rm -rf build install - cmake -B build/shared-cmake -S hidapisrc -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=install/shared-cmake -DHIDAPI_BUILD_HIDTEST=ON "-DCMAKE_C_FLAGS=${NIX_COMPILE_FLAGS}" - cmake -B build/static-cmake -S hidapisrc -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=install/static-cmake -DBUILD_SHARED_LIBS=FALSE -DHIDAPI_BUILD_HIDTEST=ON "-DCMAKE_C_FLAGS=${NIX_COMPILE_FLAGS}" - - name: Configure Automake - working-directory: hidapisrc - run: | - ./bootstrap - ./configure - - name: Build CMake Shared - working-directory: build/shared-cmake - run: make install - - name: Build CMake Static - working-directory: build/static-cmake - run: make install - - name: Build Automake - working-directory: hidapisrc - run: | - make - make DESTDIR=$PWD/../install/automake install - make clean - - name: Build manual Makefile - run: | - cd hidapisrc/linux - make -f Makefile-manual - cd ../libusb - make -f Makefile-manual - - name: Check artifacts - uses: andstor/file-existence-action@v2 - with: - files: "install/shared-cmake/lib/libhidapi-libusb.so, \ - install/shared-cmake/lib/libhidapi-hidraw.so, \ - install/shared-cmake/include/hidapi/hidapi.h, \ - install/shared-cmake/include/hidapi/hidapi_libusb.h, \ - install/static-cmake/lib/libhidapi-libusb.a, \ - install/static-cmake/lib/libhidapi-hidraw.a, \ - install/static-cmake/include/hidapi/hidapi.h, \ - install/static-cmake/include/hidapi/hidapi_libusb.h" - fail: true - - name: Check CMake Export Package Shared - run: | - cmake \ - -B build/shared_test \ - -S hidapisrc/hidtest \ - -Dhidapi_ROOT=install/shared-cmake \ - -DCMAKE_INSTALL_PREFIX=install/shared_test \ - "-DCMAKE_C_FLAGS=${NIX_COMPILE_FLAGS}" - cd build/shared_test - make install - - name: Check CMake Export Package Static - run: | - cmake \ - -B build/static_test \ - -S hidapisrc/hidtest \ - -Dhidapi_ROOT=install/static-cmake \ - -DCMAKE_INSTALL_PREFIX=install/static_test \ - "-DCMAKE_C_FLAGS=${NIX_COMPILE_FLAGS}" - cd build/static_test - make install - - - alpine: - - runs-on: ubuntu-latest - container: alpine:edge - env: - # A bug in musl: https://www.openwall.com/lists/musl/2020/01/20/2 - ALPINE_COMPILE_FLAGS: ${NIX_COMPILE_FLAGS} -Wno-overflow - steps: - - uses: actions/checkout@v3 - with: - path: hidapisrc - - name: Install dependencies - run: | - apk add gcc musl-dev autoconf automake libtool eudev-dev libusb-dev linux-headers cmake ninja make - - name: Configure CMake - run: | - rm -rf build install - cmake -B build/shared-cmake -S hidapisrc -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=install/shared-cmake -DHIDAPI_BUILD_HIDTEST=ON "-DCMAKE_C_FLAGS=${ALPINE_COMPILE_FLAGS}" - cmake -B build/static-cmake -S hidapisrc -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=install/static-cmake -DBUILD_SHARED_LIBS=FALSE -DHIDAPI_BUILD_HIDTEST=ON "-DCMAKE_C_FLAGS=${ALPINE_COMPILE_FLAGS}" - - name: Configure Automake - working-directory: hidapisrc - run: | - ./bootstrap - ./configure - - name: Build CMake Shared - working-directory: build/shared-cmake - run: ninja install - - name: Build CMake Static - working-directory: build/static-cmake - run: ninja install - - name: Build Automake - working-directory: hidapisrc - run: | - make - make DESTDIR=$PWD/../install/automake install - make clean - - name: Build manual Makefile - run: | - cd hidapisrc/linux - make -f Makefile-manual - cd ../libusb - make -f Makefile-manual - - name: Check artifacts - uses: andstor/file-existence-action@v2 - with: - files: "install/shared-cmake/lib/libhidapi-libusb.so, \ - install/shared-cmake/lib/libhidapi-hidraw.so, \ - install/shared-cmake/include/hidapi/hidapi.h, \ - install/shared-cmake/include/hidapi/hidapi_libusb.h, \ - install/static-cmake/lib/libhidapi-libusb.a, \ - install/static-cmake/lib/libhidapi-hidraw.a, \ - install/static-cmake/include/hidapi/hidapi.h, \ - install/static-cmake/include/hidapi/hidapi_libusb.h" - fail: true - - name: Check CMake Export Package Shared - run: | - cmake \ - -GNinja \ - -B build/shared_test \ - -S hidapisrc/hidtest \ - -Dhidapi_ROOT=install/shared-cmake \ - -DCMAKE_INSTALL_PREFIX=install/shared_test \ - "-DCMAKE_C_FLAGS=${ALPINE_COMPILE_FLAGS}" - cd build/shared_test - ninja install - - name: Check CMake Export Package Static - run: | - cmake \ - -GNinja \ - -B build/static_test \ - -S hidapisrc/hidtest \ - -Dhidapi_ROOT=install/static-cmake \ - -DCMAKE_INSTALL_PREFIX=install/static_test \ - "-DCMAKE_C_FLAGS=${ALPINE_COMPILE_FLAGS}" - cd build/static_test - ninja install diff --git a/src/hidapi/.github/workflows/checks.yml b/src/hidapi/.github/workflows/checks.yml deleted file mode 100644 index e03dc66ee2..0000000000 --- a/src/hidapi/.github/workflows/checks.yml +++ /dev/null @@ -1,196 +0,0 @@ -name: Checks -run-name: Code checks for '${{ github.ref_name }}' - -# General comment: -# Coverity doesn't support merging or including reports from multible machine/platforms (at least not officially). -# But otherwise there is no good way to keep the issues from all platforms at Coverity Scans at once. -# This script uses undocumented (but appears to be working) hack: -# The build logs from one machine/platform gets moved to a next once, -# and "fixed" so that cov-build can append logs from the next platform. -# The "fix" is based on the fact, that Coverity perfectly allows appending logs from multiple builds -# that are done *on the same host* machine. - -on: - # On-demand run - workflow_dispatch: - # Weekly run - schedule: - - cron: '30 5 * * 0' - -jobs: - coverity-windows: - runs-on: windows-latest - - steps: - - uses: actions/checkout@v3 - with: - path: src - - name: Setup MSVC - uses: TheMrMilchmann/setup-msvc-dev@v2.0.0 - with: - arch: x64 - - name: Configure - run: | - cmake -B build -S src -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DHIDAPI_WITH_TESTS=ON -DHIDAPI_BUILD_HIDTEST=ON - - name: Lookup Coverity Build Tool hash - id: coverity-cache-lookup - run: | - $coverity_hash=Invoke-RestMethod -Uri https://scan.coverity.com/download/cxx/win64 -Method Post -Body @{token='${{ secrets.COVERITY_SCAN_TOKEN }}';project='hidapi';md5=1} - echo "coverity_hash=$coverity_hash" >> $Env:GITHUB_OUTPUT - - name: Get cached Coverity Build Tool - id: cov-build-cache - uses: actions/cache@v3 - with: - path: cov-root - key: cov-root-cxx-win64-${{ steps.coverity-cache-lookup.outputs.coverity_hash }} - - name: Get and configure Coverity - if: steps.cov-build-cache.outputs.cache-hit != 'true' - run: | - Invoke-WebRequest -Uri https://scan.coverity.com/download/cxx/win64 -OutFile coverity.zip -Method Post -Body @{token='${{ secrets.COVERITY_SCAN_TOKEN }}';project='hidapi'} - Remove-Item 'cov-root' -Recurse -Force -ErrorAction SilentlyContinue - Expand-Archive coverity.zip -DestinationPath cov-root - - $cov_root=Get-ChildItem -Path 'cov-root' - $Env:PATH += ";$($cov_root.FullName)\bin" - cov-configure -msvc - - name: Make Coverity available in PATH - run: | - $cov_root=Get-ChildItem -Path 'cov-root' - echo "$($cov_root.FullName)\bin" >> $Env:GITHUB_PATH - - name: Build with Coverity - working-directory: build - run: | - cov-build --dir cov-int nmake - Rename-Item ".\cov-int\emit\$(hostname)" hostname - - name: Backup Coverity logs - uses: actions/upload-artifact@v3 - with: - name: coverity-logs-windows - path: build/cov-int - retention-days: 7 - - - coverity-macos: - runs-on: macos-latest - needs: [coverity-windows] - - steps: - - uses: actions/checkout@v3 - with: - path: src - - name: Install dependencies - run: brew install ninja - - name: Configure - run: | - cmake -B build -S src -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DHIDAPI_WITH_TESTS=ON -DHIDAPI_BUILD_HIDTEST=ON -DCMAKE_C_COMPILER=clang - - uses: actions/download-artifact@v3 - with: - name: coverity-logs-windows - path: build/cov-int - - name: Fixup cov-int - run: | - rm -f build/cov-int/emit/hostname/emit-db.lock build/cov-int/emit/hostname/emit-db.write-lock - mv build/cov-int/emit/hostname build/cov-int/emit/$(hostname) - - name: Lookup Coverity Build Tool hash - id: coverity-cache-lookup - shell: bash - run: | - hash=$(curl https://scan.coverity.com/download/cxx/Darwin --data "token=${{ secrets.COVERITY_SCAN_TOKEN }}&project=hidapi&md5=1") - echo "coverity_hash=${hash}" >> $GITHUB_OUTPUT - - name: Get cached Coverity Build Tool - id: cov-build-cache - uses: actions/cache@v3 - with: - path: cov-root - key: cov-root-cxx-Darwin-${{ steps.coverity-cache-lookup.outputs.coverity_hash }} - - name: Get and configure Coverity - if: steps.cov-build-cache.outputs.cache-hit != 'true' - run: | - curl https://scan.coverity.com/download/cxx/Darwin --output coverity.dmg --data "token=${{ secrets.COVERITY_SCAN_TOKEN }}&project=hidapi" - hdiutil attach coverity.dmg -mountroot coverity - export COV_DIR_NAME=$(ls -1 --color=never coverity) - rm -rf cov-root - mkdir cov-root - cp ./coverity/${COV_DIR_NAME}/${COV_DIR_NAME}.sh cov-root/ - cd cov-root/ - ./${COV_DIR_NAME}.sh - ./bin/cov-configure --clang - - name: Make Coverity available in PATH - run: echo "$(pwd)/cov-root/bin" >> $GITHUB_PATH - - name: Build with Coverity - working-directory: build - run: | - cov-build --dir cov-int --append-log ninja - mv cov-int/emit/$(hostname) cov-int/emit/hostname - - name: Backup Coverity logs - uses: actions/upload-artifact@v3 - with: - name: coverity-logs-windows-macos - path: build/cov-int - retention-days: 7 - - - coverity-ubuntu: - runs-on: ubuntu-latest - needs: [coverity-macos] - - steps: - - uses: actions/checkout@v3 - with: - path: src - - name: Install dependencies - run: sudo apt install libudev-dev libusb-1.0-0-dev ninja-build - - name: Configure - run: | - cmake -B build -S src -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DHIDAPI_WITH_TESTS=ON -DHIDAPI_BUILD_HIDTEST=ON -DCMAKE_C_COMPILER=gcc - - uses: actions/download-artifact@v3 - with: - name: coverity-logs-windows-macos - path: build/cov-int - - name: Fixup cov-int - run: | - rm -f build/cov-int/emit/hostname/emit-db.lock build/cov-int/emit/hostname/emit-db.write-lock - mv build/cov-int/emit/hostname build/cov-int/emit/$(hostname) - - name: Lookup Coverity Build Tool hash - id: coverity-cache-lookup - shell: bash - run: | - hash=$(curl https://scan.coverity.com/download/cxx/linux64 --data "token=${{ secrets.COVERITY_SCAN_TOKEN }}&project=hidapi&md5=1") - echo "coverity_hash=${hash}" >> $GITHUB_OUTPUT - - name: Get cached Coverity Build Tool - id: cov-build-cache - uses: actions/cache@v3 - with: - path: cov-root - key: cov-root-cxx-linux64-${{ steps.coverity-cache-lookup.outputs.coverity_hash }} - - name: Get and configure Coverity - if: steps.cov-build-cache.outputs.cache-hit != 'true' - run: | - curl https://scan.coverity.com/download/cxx/linux64 --output coverity.tar.gz --data "token=${{ secrets.COVERITY_SCAN_TOKEN }}&project=hidapi" - rm -rf cov-root - mkdir cov-root - tar -xzf coverity.tar.gz --strip 1 -C cov-root - ./cov-root/bin/cov-configure --gcc - - name: Make Coverity available in PATH - run: echo "$(pwd)/cov-root/bin" >> $GITHUB_PATH - - name: Build with Coverity - working-directory: build - run: | - cov-build --dir cov-int --append-log ninja - - name: Submit results to Coverity Scan - working-directory: build - run: | - tar -czf cov-int.tar.gz cov-int - curl --form token=${{ secrets.COVERITY_SCAN_TOKEN }} \ - --form email=${{ secrets.COVERITY_SCAN_EMAIL }} \ - --form file=@cov-int.tar.gz \ - --form version="$GITHUB_SHA" \ - --form description="Automatic HIDAPI build" \ - https://scan.coverity.com/builds?project=hidapi - mv cov-int/emit/$(hostname) cov-int/emit/hostname - - name: Backup Coverity logs - uses: actions/upload-artifact@v3 - with: - name: coverity-logs-windows-macos-linux - path: build/cov-int - retention-days: 7 diff --git a/src/hidapi/.github/workflows/docs.yaml b/src/hidapi/.github/workflows/docs.yaml deleted file mode 100644 index 4ec09a502e..0000000000 --- a/src/hidapi/.github/workflows/docs.yaml +++ /dev/null @@ -1,58 +0,0 @@ -name: Docs - -on: - push: - branches: [master] - pull_request: - branches: [master] - -jobs: - build: - runs-on: ubuntu-latest - steps: - - - name: Install Doxygen static libclang deps - run: sudo apt-get install libclang1-12 libclang-cpp12 - - - name: Install Doxygen from SF binary archives - env: - DOXYGEN_VERSION: '1.9.6' - run: | - mkdir .doxygen && cd .doxygen - curl -L https://sourceforge.net/projects/doxygen/files/rel-$DOXYGEN_VERSION/doxygen-$DOXYGEN_VERSION.linux.bin.tar.gz > doxygen.tar.gz - gunzip doxygen.tar.gz - tar xf doxygen.tar - cd doxygen-$DOXYGEN_VERSION - sudo make install - - - uses: actions/checkout@v3 - - - run: doxygen - working-directory: doxygen - - - name: Save doxygen docs as artifact - uses: actions/upload-artifact@v3 - with: - name: HIDAPI_doxygen_docs - path: ${{ github.workspace }}/doxygen/html - - deploy-docs: - runs-on: ubuntu-latest - needs: [build] - if: github.ref_type == 'branch' && github.ref_name == 'master' - concurrency: - group: "github-pages-deploy" - cancel-in-progress: true - steps: - - name: downlod artifact - uses: actions/download-artifact@v3 - with: - name: HIDAPI_doxygen_docs - path: docs - - - name: upload to github pages - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./docs - force_orphan: true diff --git a/src/hidapi/.gitignore b/src/hidapi/.gitignore deleted file mode 100644 index 048900e287..0000000000 --- a/src/hidapi/.gitignore +++ /dev/null @@ -1,32 +0,0 @@ - -# Autotools-added generated files -Makefile.in -aclocal.m4 -ar-lib -autom4te.cache/ -config.* -configure -configure~ -compile -depcomp -install-sh -libusb/Makefile.in -linux/Makefile.in -ltmain.sh -mac/Makefile.in -missing -testgui/Makefile.in -windows/Makefile.in - -Makefile -stamp-h1 -libtool - -# macOS -.DS_Store - -# Qt Creator -CMakeLists.txt.user - -# doxgen output -doxygen/html/ diff --git a/src/hidapi/hidtest/.gitignore b/src/hidapi/hidtest/.gitignore deleted file mode 100644 index a9ce7a23b9..0000000000 --- a/src/hidapi/hidtest/.gitignore +++ /dev/null @@ -1,17 +0,0 @@ -Debug -Release -*.exp -*.ilk -*.lib -*.suo -*.vcproj.* -*.ncb -*.suo -*.dll -*.pdb -*.o -.deps/ -.libs/ -hidtest-hidraw -hidtest-libusb -hidtest diff --git a/src/hidapi/libusb/.gitignore b/src/hidapi/libusb/.gitignore deleted file mode 100644 index 67460db93e..0000000000 --- a/src/hidapi/libusb/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -*.o -*.so -*.la -*.lo -*.a -.libs -.deps -hidtest-libusb diff --git a/src/hidapi/linux/.gitignore b/src/hidapi/linux/.gitignore deleted file mode 100644 index 127bf37d9c..0000000000 --- a/src/hidapi/linux/.gitignore +++ /dev/null @@ -1,18 +0,0 @@ -Debug -Release -*.exp -*.ilk -*.lib -*.suo -*.vcproj.* -*.ncb -*.suo -*.dll -*.pdb -*.o -*.so -hidtest-hidraw -.deps -.libs -*.lo -*.la diff --git a/src/hidapi/m4/.gitignore b/src/hidapi/m4/.gitignore deleted file mode 100644 index 8f79b02044..0000000000 --- a/src/hidapi/m4/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -# Ignore All, except pkg.m4, and of course this file. -* -!.gitignore -!pkg.m4 -!ax_pthread.m4 diff --git a/src/hidapi/mac/.gitignore b/src/hidapi/mac/.gitignore deleted file mode 100644 index 7cc3f0d0d6..0000000000 --- a/src/hidapi/mac/.gitignore +++ /dev/null @@ -1,17 +0,0 @@ -Debug -Release -*.exp -*.ilk -*.lib -*.suo -*.vcproj.* -*.ncb -*.suo -*.dll -*.pdb -*.o -hidapi-hidtest -.deps -.libs -*.la -*.lo diff --git a/src/hidapi/pc/.gitignore b/src/hidapi/pc/.gitignore deleted file mode 100644 index 6fd0ef029e..0000000000 --- a/src/hidapi/pc/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*.pc diff --git a/src/hidapi/testgui/.gitignore b/src/hidapi/testgui/.gitignore deleted file mode 100644 index f989ea8c2a..0000000000 --- a/src/hidapi/testgui/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -Debug -Release -*.exp -*.ilk -*.lib -*.suo -*.vcproj.* -*.ncb -*.suo -*.dll -*.pdb -*.o -hidapi-testgui -hidapi-hidraw-testgui -hidapi-libusb-testgui -.deps -.libs -*.la -*.lo -TestGUI.app diff --git a/src/hidapi/windows/.gitignore b/src/hidapi/windows/.gitignore deleted file mode 100644 index c2ad395ec0..0000000000 --- a/src/hidapi/windows/.gitignore +++ /dev/null @@ -1,17 +0,0 @@ -Debug -Release -.vs/ -*.exp -*.ilk -*.lib -*.suo -*.vcproj.* -*.vcxproj.* -*.ncb -*.suo -*.dll -*.pdb -.deps -.libs -*.lo -*.la