Skip to content

Commit be36414

Browse files
committed
github actions: Add build check action
LE-2898 We want to build the kernel using a centos 7 userspace, so we are calling for a centos:7 container. However we need to configure yum to pull packages from vault instead of mirror.centos.org in order to install all of the required build tools. github's actions/checkout@v* will not work here since the packages in centos 7 are so old, so we do a simple git clone to get the code. After that its the same configure and build steps as all of our other github action build checks.
1 parent 1e3f14a commit be36414

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed
+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: x86_64 CI
2+
on:
3+
pull_request:
4+
branches:
5+
- '**'
6+
- '!mainline'
7+
8+
jobs:
9+
kernel-build-job:
10+
runs-on:
11+
labels: kernel-build
12+
container:
13+
image: centos:7
14+
options: --cpus 8
15+
steps:
16+
- name: Point yum to vault
17+
run: |
18+
sed -e '/mirrorlist=.*/d' \
19+
-e 's/#baseurl=/baseurl=/' \
20+
-e "s/\$releasever/7.9.2009/g" \
21+
-e "s/mirror.centos.org/dl.rockylinux.org\/vault/g" \
22+
-i /etc/yum.repos.d/CentOS-Base.repo
23+
24+
- name: Install tools and Libraries
25+
run: |
26+
yum groupinstall 'Development Tools' -y
27+
yum install bc dwarves git glibc-devel hostname kernel-devel mpfr openssl openssl-devel elfutils-libelf-devel -y
28+
29+
- name: Checkout code
30+
run: |
31+
git clone --branch ${{ github.head_ref }} "https://oauth2:[email protected]/ctrliq/kernel-src-tree"
32+
33+
- name: Build the Kernel
34+
working-directory: kernel-src-tree
35+
run: |
36+
cp configs/kernel-3.10.0-x86_64.config .config
37+
make olddefconfig
38+
make -j8

0 commit comments

Comments
 (0)