From 6be45728bd1280418796725516b1b6f1aa5acd15 Mon Sep 17 00:00:00 2001 From: Levon Gevorgyan Date: Sun, 7 Sep 2025 09:19:43 -0500 Subject: [PATCH] fix numa --- Jenkinsfile | 4 ++-- lib/build.sh | 15 ++------------- lib/docker.sh | 31 +++++++++++++++++++------------ lib/install_deps.sh | 3 ++- 4 files changed, 25 insertions(+), 28 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 440bf7b..f506cde 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -18,7 +18,7 @@ pipeline { stage('build docker image') { matrix { axes { - axis { name 'DISTRO'; values 'ubuntu-24.04', 'fedora-42', 'debian-13', 'archlinux-latest' } + axis { name 'DISTRO'; values 'ubuntu', 'fedora', 'debian', 'arch' } } stages { stage('build multiarch image') { @@ -52,7 +52,7 @@ pipeline { matrix { axes { axis { name 'ARCH'; values 'armv8-a', 'x86-64-v3' } - axis { name 'DISTRO'; values 'ubuntu-24.04', 'fedora-42', 'debian-13', 'archlinux-latest' } + axis { name 'DISTRO'; values 'ubuntu', 'fedora', 'debian', 'arch' } axis { name 'OPT_LTO'; values 'OPT=0 LTO=OFF', 'OPT=3 LTO=ON' } axis { name 'STATIC'; values 'ON', 'OFF' } } diff --git a/lib/build.sh b/lib/build.sh index 3a33277..90b42f9 100644 --- a/lib/build.sh +++ b/lib/build.sh @@ -193,10 +193,8 @@ libaom 3.12.1 tar.gz https://storage.googleapis.com/aom-releases/libaom-${ve libvmaf 3.0.0 tar.gz https://github.com/Netflix/vmaf/archive/refs/tags/v${ver}.${ext} libopus 1.5.2 tar.gz https://github.com/xiph/opus/releases/download/v${ver}/opus-${ver}.${ext} libdav1d 1.5.1 tar.xz http://downloads.videolan.org/videolan/dav1d/${ver}/dav1d-${ver}.${ext} -libx264 latest git https://code.videolan.org/videolan/x264.git - -libx265 4.1 tar.gz https://bitbucket.org/multicoreware/x265_git/downloads/x265_${ver}.${ext} libnuma -libnuma 2.0.19 tar.gz https://github.com/numactl/numactl/archive/refs/tags/v${ver}.${ext} +libx264 latest git https://code.videolan.org/videolan/x264.git +libx265 4.1 tar.gz https://bitbucket.org/multicoreware/x265_git/downloads/x265_${ver}.${ext} ' local supported_builds=() @@ -604,15 +602,6 @@ build_libx264() { sanitize_sysroot_libs 'libx264' || return 1 } -build_libnuma() { - ./autogen.sh || return 1 - ./configure \ - "${CONFIGURE_FLAGS[@]}" || return 1 - ccache make -j"${JOBS}" || return 1 - ${SUDO_MODIFY} make -j"${JOBS}" install || return 1 - sanitize_sysroot_libs 'libnuma' || return 1 -} - add_project_versioning_to_ffmpeg() { local optFile local fname='ffmpeg_opt.c' diff --git a/lib/docker.sh b/lib/docker.sh index 4dfd4f3..f2c8882 100644 --- a/lib/docker.sh +++ b/lib/docker.sh @@ -1,11 +1,10 @@ #!/usr/bin/env bash VALID_DOCKER_IMAGES=( - 'ubuntu-24.04' - 'fedora-42' - 'fedora-41' - 'debian-13' - 'archlinux-latest' + 'ubuntu' + 'fedora' + 'debian' + 'arch' ) DOCKER_WORKDIR='/workdir' @@ -33,6 +32,19 @@ check_docker() { set_docker_run_flags || return 1 } +# get full image digest for a given image +get_docker_image_tag() { + local distro="$1" + local tag='' + case "${distro}" in + ubuntu) tag='ubuntu:24.04' ;; + debian) tag='debian:13' ;; + fedora) tag='fedora:42' ;; + arch) tag='ogarcia/archlinux:latest' ;; + esac + echo "${tag}" +} + # change dash to colon for docker and add namespace set_distro_image_tag() { local image_tag="${1}" @@ -91,12 +103,7 @@ docker_build_image() { for distro in "${DISTROS[@]}"; do echo_info "sourcing package manager for ${distro}" - local dockerDistro="${distro}" - # custom multi-arch image for archlinux - test "${distro}" == 'archlinux-latest' && - dockerDistro='ogarcia/archlinux-latest' - # docker expects colon instead of dash - dockerDistro="${dockerDistro//-/:}" + local dockerDistro="$(get_docker_image_tag "${distro}")" # specific file for evaluated package manager info distroPkgMgr="${DOCKER_DIR}/$(bash_basename "${distro}")-pkg_mgr" # get package manager info @@ -117,7 +124,7 @@ docker_build_image() { echo 'ENV DEBIAN_FRONTEND=noninteractive' # arch is rolling release, so highly likely # an updated is required between pkg changes - if line_contains "${dockerDistro}" 'archlinux'; then + if line_contains "${dockerDistro}" 'arch'; then local archRuns='' archRuns+="${pkg_mgr_update}" archRuns+=" && ${pkg_mgr_upgrade}" diff --git a/lib/install_deps.sh b/lib/install_deps.sh index b6d1624..31a6445 100644 --- a/lib/install_deps.sh +++ b/lib/install_deps.sh @@ -70,7 +70,7 @@ print_req_pkgs() { # shellcheck disable=SC2034 local pacman_pkgs=( "${common_linux_pkgs[@]}" base-devel - python-pipx ninja + python-pipx ninja numactl ) # shellcheck disable=SC2034 local dnf_pkgs=( @@ -78,6 +78,7 @@ print_req_pkgs() { pipx ninja-build fontconfig-devel wget2 cpuinfo-devel glibc-static glibc-devel libstdc++-static libstdc++-devel patch + numactl-devel ) # shellcheck disable=SC2034 local android_pkgs=(