Rework how capabilities are defined #571
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |