Skip to content

Commit

Permalink
Add continuous integration
Browse files Browse the repository at this point in the history
  • Loading branch information
Gadgetoid committed Mar 6, 2023
1 parent 76c5eca commit 8190fe5
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: CMake

on:
push:
pull_request:

env:
BUILD_TYPE: Release

jobs:
build:
name: ${{matrix.name}}
strategy:
matrix:
include:
- os: ubuntu-20.04
name: Linux
cache-key: linux
cmake-args: ''
apt-packages: build-essential

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

steps:
- uses: actions/checkout@v2

- name: Install deps
if: runner.os == 'Linux'
run: |
sudo apt update && sudo apt install ${{matrix.apt-packages}}
- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build

- name: Configure CMake
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE ${{matrix.cmake-args}}

- name: Build
working-directory: ${{runner.workspace}}/build
shell: bash
run: |
cmake --build . --config $BUILD_TYPE -j 2

0 comments on commit 8190fe5

Please sign in to comment.