Skip to content

Commit

Permalink
Add GitHub build & test action
Browse files Browse the repository at this point in the history
  • Loading branch information
dtrugman committed Feb 21, 2021
1 parent 2e34ed3 commit 6479e8c
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Build & Test

on: [push]

env:
BUILD_TYPE: Release

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build

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

- name: Build
working-directory: ${{github.workspace}}/build
shell: bash
run: cmake --build . --config $BUILD_TYPE

- name: Test
working-directory: ${{github.workspace}}/build
shell: bash
run: ./out/unittest
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Very easy to use, procfs parsing library in C++.

## Build

![Build & Test](https://github.com/dtrugman/pfs/actions/workflows/cmake.yml/badge.svg)

Run `cmake . && make`

Currently supported CMake configuration flags:
Expand Down

0 comments on commit 6479e8c

Please sign in to comment.