|
29 | 29 | working-directory: mac |
30 | 30 | run: make -f Makefile-manual |
31 | 31 |
|
| 32 | + |
32 | 33 | macos-cmake: |
33 | 34 |
|
34 | 35 | runs-on: macos-latest |
|
94 | 95 | cd build_meson |
95 | 96 | ninja |
96 | 97 |
|
| 98 | +
|
97 | 99 | ubuntu-cmake: |
98 | 100 |
|
99 | 101 | runs-on: ubuntu-latest |
@@ -157,6 +159,7 @@ jobs: |
157 | 159 | cd build_meson |
158 | 160 | ninja |
159 | 161 |
|
| 162 | +
|
160 | 163 | windows-cmake: |
161 | 164 |
|
162 | 165 | runs-on: windows-latest |
@@ -276,6 +279,7 @@ jobs: |
276 | 279 | cd build_meson |
277 | 280 | ninja |
278 | 281 |
|
| 282 | +
|
279 | 283 | windows-msbuild: |
280 | 284 |
|
281 | 285 | runs-on: windows-latest |
@@ -456,3 +460,81 @@ jobs: |
456 | 460 | "-DCMAKE_C_FLAGS=${NIX_COMPILE_FLAGS}" |
457 | 461 | cd build/static_test |
458 | 462 | make install |
| 463 | +
|
| 464 | +
|
| 465 | + alpine: |
| 466 | + |
| 467 | + runs-on: ubuntu-latest |
| 468 | + container: alpine:edge |
| 469 | + env: |
| 470 | + # A bug in musl: https://www.openwall.com/lists/musl/2020/01/20/2 |
| 471 | + ALPINE_COMPILE_FLAGS: ${NIX_COMPILE_FLAGS} -Wno-overflow |
| 472 | + steps: |
| 473 | + - uses: actions/checkout@v3 |
| 474 | + with: |
| 475 | + path: hidapisrc |
| 476 | + - name: Install dependencies |
| 477 | + run: | |
| 478 | + apk add gcc musl-dev autoconf automake libtool eudev-dev libusb-dev linux-headers cmake ninja make |
| 479 | + - name: Configure CMake |
| 480 | + run: | |
| 481 | + rm -rf build install |
| 482 | + 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}" |
| 483 | + 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}" |
| 484 | + - name: Configure Automake |
| 485 | + working-directory: hidapisrc |
| 486 | + run: | |
| 487 | + ./bootstrap |
| 488 | + ./configure |
| 489 | + - name: Build CMake Shared |
| 490 | + working-directory: build/shared-cmake |
| 491 | + run: ninja install |
| 492 | + - name: Build CMake Static |
| 493 | + working-directory: build/static-cmake |
| 494 | + run: ninja install |
| 495 | + - name: Build Automake |
| 496 | + working-directory: hidapisrc |
| 497 | + run: | |
| 498 | + make |
| 499 | + make DESTDIR=$PWD/../install/automake install |
| 500 | + make clean |
| 501 | + - name: Build manual Makefile |
| 502 | + run: | |
| 503 | + cd hidapisrc/linux |
| 504 | + make -f Makefile-manual |
| 505 | + cd ../libusb |
| 506 | + make -f Makefile-manual |
| 507 | + - name: Check artifacts |
| 508 | + uses: andstor/file-existence-action@v2 |
| 509 | + with: |
| 510 | + files: "install/shared-cmake/lib/libhidapi-libusb.so, \ |
| 511 | + install/shared-cmake/lib/libhidapi-hidraw.so, \ |
| 512 | + install/shared-cmake/include/hidapi/hidapi.h, \ |
| 513 | + install/shared-cmake/include/hidapi/hidapi_libusb.h, \ |
| 514 | + install/static-cmake/lib/libhidapi-libusb.a, \ |
| 515 | + install/static-cmake/lib/libhidapi-hidraw.a, \ |
| 516 | + install/static-cmake/include/hidapi/hidapi.h, \ |
| 517 | + install/static-cmake/include/hidapi/hidapi_libusb.h" |
| 518 | + fail: true |
| 519 | + - name: Check CMake Export Package Shared |
| 520 | + run: | |
| 521 | + cmake \ |
| 522 | + -GNinja \ |
| 523 | + -B build/shared_test \ |
| 524 | + -S hidapisrc/hidtest \ |
| 525 | + -Dhidapi_ROOT=install/shared-cmake \ |
| 526 | + -DCMAKE_INSTALL_PREFIX=install/shared_test \ |
| 527 | + "-DCMAKE_C_FLAGS=${ALPINE_COMPILE_FLAGS}" |
| 528 | + cd build/shared_test |
| 529 | + ninja install |
| 530 | + - name: Check CMake Export Package Static |
| 531 | + run: | |
| 532 | + cmake \ |
| 533 | + -GNinja \ |
| 534 | + -B build/static_test \ |
| 535 | + -S hidapisrc/hidtest \ |
| 536 | + -Dhidapi_ROOT=install/static-cmake \ |
| 537 | + -DCMAKE_INSTALL_PREFIX=install/static_test \ |
| 538 | + "-DCMAKE_C_FLAGS=${ALPINE_COMPILE_FLAGS}" |
| 539 | + cd build/static_test |
| 540 | + ninja install |
0 commit comments