Skip to content

Commit

Permalink
Setup GitHub actions (#34)
Browse files Browse the repository at this point in the history
* Setup GitHub actions

* Update GitHub actions
  • Loading branch information
TheSomeMan authored Jul 23, 2023
1 parent 825c9b7 commit 9968657
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/code-style.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Clang-Format

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

jobs:
clang-format:
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v3 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it

- name: Install Clang-Format 14
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-14 main"
sudo apt-get update
sudo apt-get install -y clang-format-14
- name: Run clang-format
run: scripts/clang_format_all.sh

- name: Check formatting
run: git diff --exit-code --diff-filter=d --color
37 changes: 37 additions & 0 deletions .github/workflows/google-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Google Test

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

jobs:
google-test:
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v3

- name: Checkout submodules
run: git submodule update --init --recursive

- name: Install dependencies
run: |
sudo apt-get install -y gcc g++ cmake make ninja-build
sudo apt-get install -y locales
sudo locale-gen de_DE.UTF-8
- name: Build
run: |
cd tests
mkdir cmake-build-unit-tests
cd cmake-build-unit-tests
cmake -G "Ninja" ..
ninja
- name: Run tests
run: |
cd tests/cmake-build-unit-tests
ctest

0 comments on commit 9968657

Please sign in to comment.