summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManuel Bentele2021-03-04 11:06:38 +0100
committerSimon Rettberg2021-03-05 10:40:17 +0100
commite7e71ec050a1717ddd61a737f3d58e6f353e7fc9 (patch)
tree5e6948ebba55e638bc713f9d989b69309bf12074
parent[BUILD] Disable lint/formatting for non-kernel for now (diff)
downloaddnbd3-e7e71ec050a1717ddd61a737f3d58e6f353e7fc9.tar.gz
dnbd3-e7e71ec050a1717ddd61a737f3d58e6f353e7fc9.tar.xz
dnbd3-e7e71ec050a1717ddd61a737f3d58e6f353e7fc9.zip
[BUILD] Add Github workflow to validate (lint) source code
-rw-r--r--.github/workflows/lint.yml34
1 files changed, 34 insertions, 0 deletions
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