From f5ada42915cc110dac4303cb952165229febceb6 Mon Sep 17 00:00:00 2001 From: Ihor Dutchak Date: Mon, 21 Jun 2021 03:16:04 +0300 Subject: [PATCH] CI: macOS build for CMake --- .github/workflows/macos.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 45ac86f..fe98579 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -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