Skip to content

Commit

Permalink
Added github actions to check cmake builds
Browse files Browse the repository at this point in the history
  • Loading branch information
harishdm committed Sep 19, 2023
1 parent c28377c commit ea0204d
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: CMake

on:
push:
pull_request:

env:
BUILD_TYPE: Release

jobs:
build:
strategy:
matrix:
include:
- name: ubuntu-latest-gcc-cmake
os: ubuntu-latest
cc: gcc
cxx: g++
build-system: cmake

- name: ubuntu-latest-clang-cmake
os: ubuntu-latest
cc: clang
cxx: clang++
build-system: cmake

- name: macos-latest-clang-cmake
os: macos-latest
cc: clang
cxx: clang++
build-system: cmake

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3

- name: Install MacOS dependencies
if: startsWith(matrix.os,'macos')
run: |
brew update
brew install llvm
- name: Configure CMake
run: cmake -B ${{github.workspace}}/out -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++

- name: Build
run: cmake --build ${{github.workspace}}/out --config ${{env.BUILD_TYPE}}

0 comments on commit ea0204d

Please sign in to comment.