Skip to content

Commit

Permalink
Merge pull request #213 from sched-ext/fix-ci-build
Browse files Browse the repository at this point in the history
ci: make test build more robust
  • Loading branch information
Andrea Righi authored Apr 4, 2024
2 parents 7d335fa + a20b066 commit bc1b0e9
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/build-scheds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
7 changes: 7 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions meson.options
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion scheds/c/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit bc1b0e9

Please sign in to comment.