Skip to content

Commit

Permalink
Add some GitHub action
Browse files Browse the repository at this point in the history
  • Loading branch information
nicovank committed Mar 5, 2023
1 parent afe4bda commit b624ab5
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Main

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

env:
BUILD_TYPE: Debug

jobs:
main:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Install dependencies
run: |
sudo apt install -y clang-format
- name: Configure CMake
run: cmake ${{github.workspace}}/src -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}

- name: Build
run: cmake --build ${{github.workspace}}/build

- name: Check clang-format
run: find src -name '*.cpp' -o -name '*.h' | xargs clang-format --dry-run --Werror
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build

0 comments on commit b624ab5

Please sign in to comment.