Added support for Streamdeck Pedal and updated UI to better fit the Packed UI style
This commit is contained in:
580
node_modules/node-hid/hidapi/.github/workflows/builds.yml
generated
vendored
Normal file
580
node_modules/node-hid/hidapi/.github/workflows/builds.yml
generated
vendored
Normal file
@@ -0,0 +1,580 @@
|
||||
name: GitHub Builds
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
env:
|
||||
NIX_COMPILE_FLAGS: -Wall -Wextra -pedantic -Werror
|
||||
GNU_COMPILE_FLAGS: -Wall -Wextra -pedantic -Werror -Wformat-signedness
|
||||
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=${GNU_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=${GNU_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=${GNU_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=${GNU_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
|
||||
shell: cmd
|
||||
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 CMake 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 MSVC 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 --no-compress-output --output-on-failure
|
||||
|
||||
- name: Configure CMake NMake MSVC
|
||||
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 MSVC
|
||||
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 CMake NMake MSVC
|
||||
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 NMake MSVC Export Package
|
||||
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 MSVC
|
||||
working-directory: build\nmake
|
||||
run: ctest --no-compress-output --output-on-failure
|
||||
|
||||
- name: Configure CMake NMake ClangCL
|
||||
shell: cmd
|
||||
run: |
|
||||
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
|
||||
cmake -G"NMake Makefiles" -B build\clang_cl -S hidapisrc -D CMAKE_C_COMPILER=clang-cl -DCMAKE_BUILD_TYPE=RelWithDebInfo -DHIDAPI_WITH_TESTS=ON -DHIDAPI_BUILD_PP_DATA_DUMP=ON -DHIDAPI_ENABLE_ASAN=OFF -DCMAKE_INSTALL_PREFIX=install\clang_cl -DHIDAPI_BUILD_HIDTEST=ON "-DCMAKE_C_FLAGS=%MSVC_COMPILE_FLAGS%"
|
||||
- name: Build CMake NMake ClangCL
|
||||
working-directory: build\clang_cl
|
||||
shell: cmd
|
||||
run: |
|
||||
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
|
||||
nmake install
|
||||
- name: Check artifacts CMake NMake ClangCL
|
||||
uses: andstor/file-existence-action@v2
|
||||
with:
|
||||
files: "install/clang_cl/lib/hidapi.lib, \
|
||||
install/clang_cl/bin/hidapi.dll, \
|
||||
install/clang_cl/include/hidapi/hidapi.h, \
|
||||
install/clang_cl/include/hidapi/hidapi_winapi.h"
|
||||
fail: true
|
||||
- name: Check CMake NMake ClangCL Export Package
|
||||
shell: cmd
|
||||
run: |
|
||||
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
|
||||
cmake ^
|
||||
-G"NMake Makefiles" ^
|
||||
-B build\clang_cl_test ^
|
||||
-S hidapisrc\hidtest ^
|
||||
-D CMAKE_C_COMPILER=clang-cl ^
|
||||
-Dhidapi_ROOT=install\clang_cl ^
|
||||
-DCMAKE_INSTALL_PREFIX=install\clang_cl_test ^
|
||||
"-DCMAKE_C_FLAGS=%MSVC_COMPILE_FLAGS%"
|
||||
cd build\clang_cl_test
|
||||
cmake --build . --target install
|
||||
- name: Run CTest NMake ClangCL
|
||||
shell: cmd
|
||||
working-directory: build/clang_cl
|
||||
run: ctest -C RelWithDebInfo --no-compress-output --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=%GNU_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=%GNU_COMPILE_FLAGS%"
|
||||
cd build\mingw_test
|
||||
cmake --build . --target install
|
||||
- name: Run CTest MinGW
|
||||
working-directory: build\mingw
|
||||
run: ctest --no-compress-output --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 MSVC
|
||||
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 MSVC
|
||||
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@v4
|
||||
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 gawk 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=${GNU_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=${GNU_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=${GNU_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=${GNU_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 glibc lib32-glibc 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=${GNU_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=${GNU_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=$(pwd)/install/shared-cmake \
|
||||
-DCMAKE_INSTALL_PREFIX=install/shared_test \
|
||||
"-DCMAKE_C_FLAGS=${GNU_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=$(pwd)/install/static-cmake \
|
||||
-DCMAKE_INSTALL_PREFIX=install/static_test \
|
||||
"-DCMAKE_C_FLAGS=${GNU_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: ${GNU_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
|
||||
198
node_modules/node-hid/hidapi/.github/workflows/checks.yml
generated
vendored
Normal file
198
node_modules/node-hid/hidapi/.github/workflows/checks.yml
generated
vendored
Normal file
@@ -0,0 +1,198 @@
|
||||
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@v4
|
||||
with:
|
||||
name: coverity-logs-windows
|
||||
path: build/cov-int
|
||||
retention-days: 7
|
||||
|
||||
|
||||
coverity-macos:
|
||||
runs-on: macos-13
|
||||
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@v4
|
||||
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@v4
|
||||
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 update
|
||||
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@v4
|
||||
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@v4
|
||||
with:
|
||||
name: coverity-logs-windows-macos-linux
|
||||
path: build/cov-int
|
||||
retention-days: 7
|
||||
46
node_modules/node-hid/hidapi/.github/workflows/docs.yaml
generated
vendored
Normal file
46
node_modules/node-hid/hidapi/.github/workflows/docs.yaml
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
name: Docs
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
pull_request:
|
||||
branches: [master]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Install Doxygen
|
||||
run: sudo apt satisfy "doxygen (>= 1.9.6)"
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- run: doxygen
|
||||
working-directory: doxygen
|
||||
|
||||
- name: Save doxygen docs as artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: HIDAPI_doxygen_docs
|
||||
path: ${{ github.workspace }}/doxygen/html
|
||||
|
||||
deploy-docs:
|
||||
runs-on: ubuntu-24.04
|
||||
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@v4
|
||||
with:
|
||||
name: HIDAPI_doxygen_docs
|
||||
path: docs
|
||||
|
||||
- name: upload to github pages
|
||||
uses: peaceiris/actions-gh-pages@v4
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./docs
|
||||
force_orphan: true
|
||||
Reference in New Issue
Block a user