debug #1294
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: 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: | |
| 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: | | |
| cat install/shared-cmake/lib/cmake/hidapi/hidapi-config.cmake | |
| cmake \ | |
| -B build/shared_test \ | |
| -S hidapisrc/hidtest \ | |
| -Dhidapi_ROOT=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: | | |
| cat install/static-cmake/lib/cmake/hidapi/hidapi-config.cmake | |
| cmake \ | |
| -B build/static_test \ | |
| -S hidapisrc/hidtest \ | |
| -Dhidapi_ROOT=install/static-cmake \ | |
| -DCMAKE_INSTALL_PREFIX=install/static_test \ | |
| "-DCMAKE_C_FLAGS=${GNU_COMPILE_FLAGS}" | |
| cd build/static_test | |
| make install |