Skip to content

Add cmake build code #4

Add cmake build code

Add cmake build code #4

Workflow file for this run

name: Build and Test
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
autotools:
strategy:
matrix:
include:
- description: "Ninja on Ubuntu"
cmake-preset: ninja
runs-on: ubuntu-latest
- description: "Ninja on OSX"
cmake-preset: ninja
runs-on: macos-13
- description: "Ninja on Windows"
cmake-preset: ninja
runs-on: windows-latest
- description: "MSVC on Windows"
cmake-preset: msvc
runs-on: windows-latest
name: cmake workflow using ${{ matrix.description }}
runs-on: ${{ matrix.runs-on }}
permissions:
contents: read
steps:
- name: "Clone Repository"
uses: actions/checkout@v4
- name: "Setup Ninja"
uses: seanmiddleditch/gha-setup-ninja@master
- name: Build
run: |
cmake --preset ${{ matrix.cmake-preset }}
cmake --build --preset ${{ matrix.cmake-preset }}-release
working-directory: ${{ github.workspace }}
- name: Test
run: |
ctest --preset ${{ matrix.cmake-preset }}-release
working-directory: ${{ github.workspace }}
- name: Install
run: |
echo make install
working-directory: ${{ github.workspace }}