Skip to content

Dev/cvadrevu/GitHub actions #20

Dev/cvadrevu/GitHub actions

Dev/cvadrevu/GitHub actions #20

Workflow file for this run

name: PR Checks
# Controls when the workflow will run
on:
pull_request: {}
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch: {}
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 100
- name: Fetch base_ref
run: git -c protocol.version=2 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin ${{ github.base_ref }}
- name: Install build dependencies
run: |
sudo apt update
sudo apt install libelf-dev
#- name: Build nati_x86_64_defconfig
# run: |
# make nati_x86_64_defconfig
# make -j8 bzImage modules
#- name: Check if nati_x86_64_defconfig needs updation
# run: |
# make savedefconfig
# diff defconfig arch/x86/configs/nati_x86_64_defconfig
- name: Check if rebase required
run: |
common_ancestor=$(git merge-base HEAD origin/${{ github.base_ref }})
branch_head=$(git log -1 --format=%H origin/${{ github.base_ref }})
echo Common ancestor $common_ancestor, ${{ github.base_ref }} head $branch_head
[ $common_ancestor == $branch_head ]
- name: Run checkpatch.pl
run: |
common_ancestor=$(git merge-base HEAD origin/${{ github.base_ref }})
echo Common ancestor $common_ancestor
git format-patch $common_ancestor
./scripts/checkpatch.pl *patch