-
Notifications
You must be signed in to change notification settings - Fork 83
46 lines (36 loc) · 1.3 KB
/
pr-checks.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: PR Checks
on:
pull_request: {}
workflow_dispatch: {}
jobs:
build:
runs-on: ubuntu-latest
steps:
- 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: "[TEST] Build nati_x86_64_defconfig"
run: |
make nati_x86_64_defconfig
make -j8 bzImage modules
- name: "[TEST] Does nati_x86_64_defconfig need update"
run: |
make savedefconfig
diff defconfig arch/x86/configs/nati_x86_64_defconfig
- name: "[TEST] Is rebase required"
run: |
common_ancestor=$(git merge-base HEAD origin/${{ github.base_ref }})
base_ref_head=$(git log -1 --format=%H origin/${{ github.base_ref }})
[ $common_ancestor == $base_ref_head ]
- name: "[TEST] Run checkpatch.pl"
run: |
common_ancestor=$(git merge-base HEAD origin/${{ github.base_ref }})
git format-patch $common_ancestor
./scripts/checkpatch.pl *patch