Skip to content

Commit 403b2f2

Browse files
committed
ci: add github action
Signed-off-by: Andrea Righi <arighi@nvidia.com>
1 parent b196f0a commit 403b2f2

File tree

2 files changed

+69
-0
lines changed

2 files changed

+69
-0
lines changed

.github/workflows/kernel-build.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Kernel Test
2+
3+
on:
4+
push:
5+
branches: [ "*" ]
6+
pull_request:
7+
8+
jobs:
9+
build:
10+
name: ${{ matrix.runs-on == 'ubuntu-latest' && 'x86_64' || 'ARM64' }} - ${{ matrix.config }}
11+
runs-on: ${{ matrix.runs-on }}
12+
strategy:
13+
matrix:
14+
include:
15+
- runs-on: ubuntu-latest
16+
config: defconfig
17+
- runs-on: ubuntu-24.04-arm
18+
config: config_4k
19+
- runs-on: ubuntu-24.04-arm
20+
config: config_64k
21+
steps:
22+
- uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
26+
- name: Install Dependencies
27+
run: |
28+
sudo apt-get update -y
29+
sudo apt-get install -y build-essential flex bison libssl-dev bc \
30+
bison busybox-static cmake coreutils virtme-ng \
31+
cpio elfutils file gcc git iproute2 jq kbd kmod libcap-dev \
32+
libelf-dev libunwind-dev libvirt-clients libzstd-dev libasound2-dev \
33+
libdrm-dev linux-headers-generic linux-tools-common linux-tools-generic \
34+
make ninja-build pahole pkg-config python3-dev python3-pip \
35+
python3-requests qemu-kvm qemu-system-arm rsync stress-ng udev zstd \
36+
libseccomp-dev libcap-ng-dev llvm-19 clang-19 python3-full curl \
37+
bpftrace dwarves gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu
38+
39+
- name: Install virtme-ng
40+
run: |
41+
git clone https://github.com/arighi/virtme-ng.git
42+
cd virtme-ng
43+
VNG_PACKAGE=1 BUILD_VIRTME_NG_INIT=1 pip install --break-system-packages .
44+
cd -
45+
46+
- name: Build Kernel
47+
run: |
48+
if [ "${{ matrix.config }}" = "defconfig" ]; then
49+
vng -vb
50+
else
51+
vng -vb --config .github/workflows/${{ matrix.config }} --arch arm64 CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64
52+
fi
53+
54+
- name: Build kselftest
55+
run: |
56+
if [ "${{ matrix.config }}" = "defconfig" ]; then
57+
make -C tools/testing/selftests
58+
else
59+
make -C tools/testing/selftests CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64
60+
fi
61+
62+
- name: Boot test
63+
run: |
64+
if [ "${{ matrix.config }}" = "defconfig" ]; then
65+
vng -v -- uname -a
66+
else
67+
vng --arch arm64 --root ./arm64 -v -- uname -a
68+
fi

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
# Normal rules (sorted alphabetically)
1212
#
1313
.*
14+
!.github/
1415
*.a
1516
*.asn1.[ch]
1617
*.bin

0 commit comments

Comments
 (0)