Skip to content

Add new workflow for C++ SDK #9

Add new workflow for C++ SDK

Add new workflow for C++ SDK #9

Workflow file for this run

name: C++ SDK
on:
push:
branches: ['main']
paths: ['src/cc/flwr/**']
pull_request:
branches: ['main']
paths: ['src/cc/flwr/**']
jobs:
build_and_test:
name: Build and test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y clang-format cmake g++ clang-tidy cppcheck
- name: Check Formatting
run: |
find src/cc/flwr -name '*.cc' -or -name '*.h' | xargs clang-format -i
git diff --exit-code
- name: Build
run: |
mkdir build
cd build
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ../src/cc/flwr
make
- name: Run clang-tidy
run: |
find src/cc/flwr/src -name '*.cc' | xargs clang-tidy
- name: Run cppcheck
run: |
cppcheck --enable=all --inline-suppr --suppress=missingIncludeSystem -Isrc/cc/flwr/include src/cc/flwr/src