From e7e71ec050a1717ddd61a737f3d58e6f353e7fc9 Mon Sep 17 00:00:00 2001 From: Manuel Bentele Date: Thu, 4 Mar 2021 11:06:38 +0100 Subject: [BUILD] Add Github workflow to validate (lint) source code --- .github/workflows/lint.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..d33967a --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,34 @@ +name: Lint dnbd3 + +on: + push: + branches: + - master + pull_request: + release: + +jobs: + lint: + name: Lint dnbd3 + runs-on: ubuntu-20.04 + steps: + - name: Install dnbd3 dependencies + run: | + sudo apt-get update -y -qq + sudo apt-get install -y -qq make \ + clang-format \ + linux-headers-generic \ + libfuse-dev \ + libjansson-dev \ + rpm + - name: Checkout dnbd3 repository + uses: actions/checkout@v2 + - name: Fetch dnbd3 repository tags + run: git fetch --prune --unshallow + - name: Configure dnbd3 build + run: | + cmake -DDNBD3_LINT=ON -B ${{ github.workspace }}/build \ + -S ${{ github.workspace }} + - name: Lint dnbd3 artifacts + working-directory: ${{ github.workspace }}/build + run: make lint -- cgit v1.2.3-55-g7522