CI: macOS build for CMake

This commit is contained in:
Ihor Dutchak
2021-06-21 03:16:04 +03:00
parent f2bb972e7f
commit f5ada42915

View File

@@ -24,3 +24,28 @@ jobs:
- name: Build Manual makefile
working-directory: mac
run: make -f Makefile-manual
build-cmake:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
with:
path: hidapisrc
- name: Configure CMake
run: |
rm -rf build install
cmake -B build/shared -S hidapisrc -DCMAKE_INSTALL_PREFIX=install/shared
cmake -B build/framework -S hidapisrc -DCMAKE_INSTALL_PREFIX=install/framework -DCMAKE_FRAMEWORK=ON
- name: Build CMake Shared
working-directory: build/shared
run: make install
- name: Build CMake Framework
working-directory: build/framework
run: make install
- name: Check artifacts
uses: andstor/file-existence-action@v1
with:
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"
allow_failure: true