@@ -312,3 +312,73 @@ jobs:
312312 name : hidapi-win
313313 path : artifacts/
314314 retention-days : ${{ (github.event_name == 'pull_request' || github.ref_name != 'master') && 7 || 90 }}
315+
316+
317+ fedora-mingw :
318+
319+ runs-on : ubuntu-latest
320+ container : fedora:latest
321+ steps :
322+ - uses : actions/checkout@v3
323+ with :
324+ path : hidapisrc
325+ - name : Install dependencies
326+ run : sudo dnf install -y autoconf automake libtool mingw64-gcc cmake ninja-build make
327+ - name : Configure CMake
328+ run : |
329+ rm -rf build install
330+ 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}"
331+ 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}"
332+ - name : Configure Automake
333+ working-directory : hidapisrc
334+ run : |
335+ ./bootstrap
336+ mingw64-configure
337+ - name : Build CMake Shared
338+ working-directory : build/shared-cmake
339+ run : ninja install
340+ - name : Build CMake Static
341+ working-directory : build/static-cmake
342+ run : ninja install
343+ - name : Build Automake
344+ working-directory : hidapisrc
345+ run : |
346+ make
347+ make DESTDIR=$PWD/../install/automake install
348+ make clean
349+ - name : Build manual Makefile
350+ working-directory : hidapisrc/windows
351+ run : make -f Makefile-manual OS=MINGW CC=x86_64-w64-mingw32-gcc
352+ - name : Check artifacts
353+ uses : andstor/file-existence-action@v2
354+ with :
355+ files : " install/shared-cmake/bin/libhidapi.dll, \
356+ install/shared-cmake/lib/libhidapi.dll.a, \
357+ install/shared-cmake/include/hidapi/hidapi.h, \
358+ install/shared-cmake/include/hidapi/hidapi_winapi.h, \
359+ install/static-cmake/lib/libhidapi.a, \
360+ install/static-cmake/include/hidapi/hidapi.h, \
361+ install/static-cmake/include/hidapi/hidapi_winapi.h"
362+ fail : true
363+ - name : Check CMake Export Package Shared
364+ run : |
365+ mingw64-cmake \
366+ -GNinja \
367+ -B build/shared_test \
368+ -S hidapisrc/hidtest \
369+ -Dhidapi_DIR=$PWD/install/shared-cmake/lib/cmake/hidapi \
370+ -DCMAKE_INSTALL_PREFIX=install/shared_test \
371+ "-DCMAKE_C_FLAGS=${NIX_COMPILE_FLAGS}"
372+ cd build/shared_test
373+ ninja install
374+ - name : Check CMake Export Package Static
375+ run : |
376+ mingw64-cmake \
377+ -GNinja \
378+ -B build/static_test \
379+ -S hidapisrc/hidtest \
380+ -Dhidapi_DIR=$PWD/install/static-cmake/lib/cmake/hidapi \
381+ -DCMAKE_INSTALL_PREFIX=install/static_test \
382+ "-DCMAKE_C_FLAGS=${NIX_COMPILE_FLAGS}"
383+ cd build/static_test
384+ ninja install
0 commit comments