debug #1310
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 libusb libudev0 cmake make pkg-config | |
| - 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: Build CMake Shared | |
| working-directory: build/shared-cmake | |
| run: make install | |
| - name: Build CMake Static | |
| working-directory: build/static-cmake | |
| run: make install | |
| - 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 --version | |
| ls -la install/shared-cmake/lib/cmake/hidapi/ | |
| cat install/shared-cmake/lib/cmake/hidapi/hidapi-config.cmake | |
| cat install/shared-cmake/lib/cmake/hidapi/hidapi-config-version.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 |