Skip to content

Commit f5ada42

Browse files
committed
CI: macOS build for CMake
1 parent f2bb972 commit f5ada42

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.github/workflows/macos.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,28 @@ jobs:
2424
- name: Build Manual makefile
2525
working-directory: mac
2626
run: make -f Makefile-manual
27+
28+
build-cmake:
29+
30+
runs-on: macos-latest
31+
32+
steps:
33+
- uses: actions/checkout@v2
34+
with:
35+
path: hidapisrc
36+
- name: Configure CMake
37+
run: |
38+
rm -rf build install
39+
cmake -B build/shared -S hidapisrc -DCMAKE_INSTALL_PREFIX=install/shared
40+
cmake -B build/framework -S hidapisrc -DCMAKE_INSTALL_PREFIX=install/framework -DCMAKE_FRAMEWORK=ON
41+
- name: Build CMake Shared
42+
working-directory: build/shared
43+
run: make install
44+
- name: Build CMake Framework
45+
working-directory: build/framework
46+
run: make install
47+
- name: Check artifacts
48+
uses: andstor/file-existence-action@v1
49+
with:
50+
files: "install/shared/lib/libhidapi.dylib, install/shared/include/hidapi/hidapi.h, install/framework/lib/hidapi.framework/hidapi, install/framework/lib/hidapi.framework/Headers/hidapi.h"
51+
allow_failure: true

0 commit comments

Comments
 (0)