-
Notifications
You must be signed in to change notification settings - Fork 12
69 lines (60 loc) · 2.14 KB
/
compile_test.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Compile Test
on: [push]
jobs:
compiletest:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Download Kernel Source
run: |
source ./version
_RC=$(echo $KVER | tr -d 1234567890.)
if [ -n "$_RC" ]; then
KSRC_URL=https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/snapshot/linux-${KVER}.tar.gz
curl $KSRC_URL | tar -xz
else
KSRC_URL=https://cdn.kernel.org/pub/linux/kernel/v${KVER//.*}.x/linux-${KVER}.tar.xz
curl $KSRC_URL | tar -xJ
fi
- name: Install Build Dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential fakeroot libncurses-dev bison flex libssl-dev libelf-dev \
openssl dkms libudev-dev libpci-dev libiberty-dev autoconf wget xz-utils git \
libcap-dev bc rsync cpio dh-modaliases debhelper kernel-wedge curl gawk dwarves zstd
- name: Checkpatch
run: |
source ./version
cd linux-$KVER
# Skip apple-bce because it needs a lot of formatting changes, and
# modules that we won't be sending upstream.
scripts/checkpatch.pl --no-signoff --terse --no-summary \
$(echo ../*.patch | tr " " "\n" | grep -v -e "apple-bce" -e asahi -e applesmc -e bcm5974 ) || true
- name: Apply Patches
id: apply-patches
run: |
source ./version
cd linux-$KVER
for patch in ../*.patch; do
echo "Applying patch $patch..."
patch -Np1 < $patch
done
- name: Print reject hunks
run: |
source ./version
cd linux-$KVER
cat $(find . -type f -name '*.rej') /dev/null
if: always() && (steps.apply-patches.outcome == 'failure')
- name: Setting Config
run: |
source ./version
cd linux-$KVER
cp arch/x86/configs/x86_64_defconfig ./.config
cat ../extra_config >> .config
make olddefconfig
- name: Building Kernel
run: |
source ./version
cd linux-$KVER
make