Skip to content

Rework how capabilities are defined #571

Rework how capabilities are defined

Rework how capabilities are defined #571

Workflow file for this run

name: Build
on: [push, pull_request]
jobs:
build:
env:
buildDir: '${{ github.workspace }}/build'
name: ${{ matrix.os }}-compile
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
include:
- os: ubuntu-latest
triplet: x64-linux
INSTALL_DEPS: sudo apt-get -y install libhidapi-dev
- os: macos-latest
triplet: x64-osx
INSTALL_DEPS: brew install hidapi
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: lukka/get-cmake@latest
- name: Install GCC 13 (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y gcc-13 g++-13
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 100
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 100
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-13 100
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-13 100
- name: Install Dependencies
run: ${{ matrix.INSTALL_DEPS }}
- name: Check compiler version
run: |
echo "C compiler:"
cc --version
echo "C++ compiler:"
c++ --version
- name: dir
run: find $RUNNER_WORKSPACE
shell: bash
- name: Run CMake with Ninja
uses: lukka/run-cmake@v3
id: runcmake
with:
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt'
buildWithCMakeArgs: '-- -v'
buildDirectory: ${{ env.buildDir }}
- name: Run test
run: cd ${{ env.buildDir }} && ctest --output-on-failure
- name: dir
run: find $RUNNER_WORKSPACE
shell: bash