|
9 | 9 | kernel-build-job: |
10 | 10 | runs-on: |
11 | 11 | labels: kernel-build |
| 12 | + container: |
| 13 | + image: centos:7 |
| 14 | + options: --cpus 8 |
12 | 15 | steps: |
13 | | - - name: Checkout code |
14 | | - uses: actions/checkout@v4 |
15 | | - with: |
16 | | - ref: "${{ github.event.pull_request.head.sha }}" |
17 | | - fetch-depth: 0 |
18 | | - path: kernel-src-tree |
19 | | - |
20 | | - - name: Install rinse |
21 | | - run: | |
22 | | - sudo apt-get install rinse |
23 | | -
|
24 | | - - name: Build centos7 chroot |
25 | | - run: | |
26 | | - sudo rinse --distribution centos-7 \ |
27 | | - --mirror http://dl.rockylinux.org/vault/centos/7/os/x86_64/Packages \ |
28 | | - --arch amd64 \ |
29 | | - --directory centos-7-chroot |
30 | | -
|
31 | | - - name: Point yum to vault (in chroot) |
| 16 | + - name: Point yum to vault |
32 | 17 | run: | |
33 | | - sudo sed -e '/mirrorlist=.*/d' \ |
| 18 | + sed -e '/mirrorlist=.*/d' \ |
34 | 19 | -e 's/#baseurl=/baseurl=/' \ |
35 | 20 | -e "s/\$releasever/7.9.2009/g" \ |
36 | 21 | -e "s/mirror.centos.org/dl.rockylinux.org\/vault/g" \ |
37 | | - -i centos-7-chroot/etc/yum.repos.d/CentOS-Base.repo |
| 22 | + -i /etc/yum.repos.d/CentOS-Base.repo |
38 | 23 |
|
39 | 24 | - name: Install tools and Libraries (in chroot) |
40 | 25 | run: | |
41 | | - sudo chroot centos-7-chroot yum groupinstall 'Development Tools' -y |
42 | | - sudo chroot centos-7-chroot yum install bc dwarves git glibc-devel hostname kernel-devel mpfr openssl openssl-devel elfutils-libelf-devel -y |
| 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 |
43 | 28 |
|
44 | | - - name: Build the Kernel (in chroot) |
| 29 | + - name: Checkout code |
45 | 30 | run: | |
46 | | - sudo mv kernel-src-tree centos-7-chroot |
47 | | - sudo chroot centos-7-chroot sh -c "cd kernel-src-tree && cp configs/kernel-3.10.0-x86_64.config .config" |
48 | | - sudo chroot centos-7-chroot sh -c "cd kernel-src-tree && make olddefconfig" |
49 | | - sudo chroot centos-7-chroot sh -c "cd kernel-src-tree && make -j$(nproc)" |
| 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 -j$(nproc) |
| 39 | +
|
50 | 40 | - name: Check kabi |
| 41 | + working-directory: kernel-src-tree |
51 | 42 | run: | |
52 | | - sudo chroot centos-7-chroot sh -c "git clone --branch c7 --single-branch https://git.centos.org/rpms/kernel.git kernel-dist-git" |
53 | | - sudo chroot centos-7-chroot sh -c "cd kernel-dist-git && git reset --hard imports/c7/kernel-3.10.0-1160.119.1.el7" |
54 | | - sudo chroot centos-7-chroot sh -c "./kernel-dist-git/SOURCES/check-kabi -k ./kernel-dist-git/SOURCES/Module.kabi_x86_64 -s ./kernel-src-tree/Module.symvers" |
| 43 | + git clone --branch imports/c7/kernel-3.10.0-1160.119.1.el7 --depth 1 https://git.centos.org/rpms/kernel.git kernel-dist-git |
| 44 | + ./kernel-dist-git/SOURCES/check-kabi -k ./kernel-dist-git/SOURCES/Module.kabi_x86_64 -s Module.symvers |
0 commit comments