summaryrefslogtreecommitdiffstats
path: root/.github/workflows/review.yml
diff options
context:
space:
mode:
authorKinga Stefaniuk <kinga.stefaniuk@intel.com>2024-04-11 10:37:39 +0200
committerMariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>2024-05-15 14:12:43 +0200
commitd3d4b21db909ab77aa8b71b70de438d0010f364b (patch)
tree041b35e43ddd9f4cd4ca5a144eb31790d7814776 /.github/workflows/review.yml
parentmdadm: Change main repository to Github (diff)
downloadmdadm-d3d4b21db909ab77aa8b71b70de438d0010f364b.tar.xz
mdadm-d3d4b21db909ab77aa8b71b70de438d0010f364b.zip
CI: create review.yml file
Introduce review.yml used by GitHub actions. Add make probe, checkpatch and hardening-check on every pull request. Add dependabot.yml file which check for updates of actions used in this repository. This option enables to automatically fill new PR with action updated to the latest version. Signed-off-by: Kinga Stefaniuk <kinga.stefaniuk@intel.com>
Diffstat (limited to '')
-rw-r--r--.github/workflows/review.yml41
1 files changed, 41 insertions, 0 deletions
diff --git a/.github/workflows/review.yml b/.github/workflows/review.yml
new file mode 100644
index 00000000..57f5d238
--- /dev/null
+++ b/.github/workflows/review.yml
@@ -0,0 +1,41 @@
+name: review
+on: [pull_request]
+env:
+ cflags: -Werror
+jobs:
+ make:
+ runs-on: ubuntu-latest
+ name: Compilation test with gcc
+ strategy:
+ matrix:
+ gcc-version: [7, 8, 9, 10, 11, 12, 13]
+ steps:
+ - uses: actions/checkout@v4
+ - name: 'Add ubuntu repository and install dependencies'
+ run: .github/tools/install_ubuntu_packages.sh ${{ matrix.gcc-version }}
+ - name: 'Make with DEBUG flag'
+ run: CC=gcc-${{ matrix.gcc-version }} && V=1 make -j$(nproc) -B CXFLAGS=-DEBUG && make clean
+ - name: 'Make with DEBIAN flag'
+ run: CC=gcc-${{ matrix.gcc-version }} && V=1 make -j$(nproc) -B CXGALGS=-DEBIAN && make clean
+ - name: 'Make with USE_PTHREADS flag'
+ run: CC=gcc-${{ matrix.gcc-version }} && V=1 make -j$(nproc) -B CXFLAGS=-USE_PTHREADS && make clean
+ - name: 'Make with DNO_LIBUDEV flag'
+ run: CC=gcc-${{ matrix.gcc-version }} && V=1 make -j$(nproc) -B CXFLAGS=-DNO_LIBUDEV && make clean
+ - name: 'Make'
+ run: CC=gcc-${{ matrix.gcc-version }} && V=1 make -j$(nproc)
+ - name: hardening-check mdadm
+ run: hardening-check mdadm
+ - name: hardening-check mdmon
+ run: hardening-check mdmon
+ checkpatch:
+ runs-on: ubuntu-latest
+ name: checkpatch review
+ steps:
+ - name: 'Calculate PR commits + 1'
+ run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> $GITHUB_ENV
+ - uses: actions/checkout@v4
+ with:
+ ref: ${{ github.event.pull_request.head.sha }}
+ fetch-depth: ${{ env.PR_FETCH_DEPTH }}
+ - name: Run checkpatch review
+ uses: webispy/checkpatch-action@v9