From 4ca0e937e10a8f91830b353d235184e5185ba0fb Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Wed, 19 Jul 2023 00:55:04 +0300
Subject: [PATCH] hidapi: remove unwanted files (e.g.: .git*, etc...)
---
src/hidapi/.appveyor.yml | 31 --
src/hidapi/.builds/freebsd.yml | 34 --
src/hidapi/.builds/netbsd.yml | 18 -
src/hidapi/.builds/openbsd.yml | 19 -
src/hidapi/.cirrus.yml | 33 --
src/hidapi/.gitattributes | 7 -
src/hidapi/.github/workflows/builds.yml | 540 ------------------------
src/hidapi/.github/workflows/checks.yml | 196 ---------
src/hidapi/.github/workflows/docs.yaml | 58 ---
src/hidapi/.gitignore | 32 --
src/hidapi/hidtest/.gitignore | 17 -
src/hidapi/libusb/.gitignore | 8 -
src/hidapi/linux/.gitignore | 18 -
src/hidapi/m4/.gitignore | 5 -
src/hidapi/mac/.gitignore | 17 -
src/hidapi/pc/.gitignore | 1 -
src/hidapi/testgui/.gitignore | 20 -
src/hidapi/windows/.gitignore | 17 -
18 files changed, 1071 deletions(-)
delete mode 100644 src/hidapi/.appveyor.yml
delete mode 100644 src/hidapi/.builds/freebsd.yml
delete mode 100644 src/hidapi/.builds/netbsd.yml
delete mode 100644 src/hidapi/.builds/openbsd.yml
delete mode 100644 src/hidapi/.cirrus.yml
delete mode 100644 src/hidapi/.gitattributes
delete mode 100644 src/hidapi/.github/workflows/builds.yml
delete mode 100644 src/hidapi/.github/workflows/checks.yml
delete mode 100644 src/hidapi/.github/workflows/docs.yaml
delete mode 100644 src/hidapi/.gitignore
delete mode 100644 src/hidapi/hidtest/.gitignore
delete mode 100644 src/hidapi/libusb/.gitignore
delete mode 100644 src/hidapi/linux/.gitignore
delete mode 100644 src/hidapi/m4/.gitignore
delete mode 100644 src/hidapi/mac/.gitignore
delete mode 100644 src/hidapi/pc/.gitignore
delete mode 100644 src/hidapi/testgui/.gitignore
delete mode 100644 src/hidapi/windows/.gitignore
diff --git a/src/hidapi/.appveyor.yml b/src/hidapi/.appveyor.yml
deleted file mode 100644
index 210b3fa4636f..000000000000
--- 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 1679b03c386b..000000000000
--- 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 413d91c02016..000000000000
--- 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 780df7f661a4..000000000000
--- 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 b4cf201667fe..000000000000
--- 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 edb79febc569..000000000000
--- 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 056df2cc08c8..000000000000
--- 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 e03dc66ee20e..000000000000
--- 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
(Patch may be truncated, please check the link at the top of this post.)