Merge pull request #213 from sched-ext/fix-ci-build

ci: make test build more robust
This commit is contained in:
Andrea Righi 2024-04-04 17:34:38 +02:00 committed by GitHub
commit bc1b0e99e6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 16 additions and 4 deletions

View File

@ -16,7 +16,7 @@ jobs:
### DOWNLOAD AND INSTALL DEPENDENCIES ###
# Download dependencies packaged by Ubuntu
- run: sudo apt -y install bison busybox-static cargo cmake coreutils cpio elfutils file flex gcc git iproute2 kbd kmod libcap-dev libelf-dev libunwind-dev libvirt-clients libzstd-dev linux-headers-generic linux-tools-common linux-tools-generic make ninja-build pahole python3-dev python3-pip python3-requests qemu-kvm rsync rustc udev zstd
- run: sudo apt -y install bison busybox-static cargo cmake coreutils cpio elfutils file flex gcc git iproute2 jq kbd kmod libcap-dev libelf-dev libunwind-dev libvirt-clients libzstd-dev linux-headers-generic linux-tools-common linux-tools-generic make ninja-build pahole pkg-config python3-dev python3-pip python3-requests qemu-kvm rsync rustc udev zstd
# clang 17
# Use a custom llvm.sh script which includes the -y flag for
@ -48,11 +48,14 @@ jobs:
# Build a minimal kernel (with sched-ext enabled) using virtme-ng
- run: cd linux && vng -v --build --config .github/workflows/sched-ext.config
# Generate kernel headers
- run: cd linux && make headers
### END DEPENDENCIES ###
# The actual build:
- run: meson setup build -Dkernel=$(pwd)/linux
- run: meson compile -C build
- run: meson setup build -Dkernel=$(pwd)/linux -Dkernel_headers=./linux/usr/include
- run: meson compile -C build --jobs=1
# Print CPU model before running the tests (this can be useful for
# debugging purposes)

View File

@ -140,6 +140,13 @@ else
endif
endif
if get_option('kernel_headers') != ''
kernel_headers = get_option('kernel_headers')
kernel_dep = [declare_dependency(include_directories: kernel_headers)]
else
kernel_dep = []
endif
bpftool_path = '@0@/bpftool/src'.format(meson.current_build_dir())
should_build_bpftool = true
bpftool_exe_path = '@0@/bpftool'.format(bpftool_path)

View File

@ -16,6 +16,8 @@ option('enable_rust', type: 'boolean', value: 'true',
description: 'Enable rust sub-projects')
option('kernel', type: 'string', value: 'vmlinuz',
description: 'kernel image used to test schedulers')
option('kernel_headers', type: 'string', value: '',
description: 'kernel headers to build the schedulers')
option(
'systemd',
type: 'feature',

View File

@ -6,6 +6,6 @@ foreach sched: c_scheds
bpf_skel = gen_bpf_skel.process(bpf_o)
executable(sched, [bpf_skel, sched + '.c'],
include_directories: [user_c_includes],
dependencies: [libbpf_dep, thread_dep],
dependencies: [kernel_dep, libbpf_dep, thread_dep],
install: true)
endforeach