diff --git a/.github/workflows/good.repos b/.github/workflows/good.repos index c376908..4f00e1d 100644 --- a/.github/workflows/good.repos +++ b/.github/workflows/good.repos @@ -15,3 +15,6 @@ repositories: type: git url: https://github.com/ros/roscpp_core.git version: noetic-devel + +sbuild_options: + genmsg: --jobs=2 diff --git a/ros-one.repos b/ros-one.repos index bc3efbb..ebfee39 100644 --- a/ros-one.repos +++ b/ros-one.repos @@ -1055,3 +1055,6 @@ repositories: type: git url: https://github.com/ros/xacro.git version: noetic-devel + +sbuild_options: + eigenpy: --jobs=2 diff --git a/src/build.sh b/src/build.sh index 7bbfb74..c49f221 100644 --- a/src/build.sh +++ b/src/build.sh @@ -151,6 +151,7 @@ function build_pkg { local old_path=$PWD local pkg_name=$1 local pkg_path=$2 + local opts local version local version_stamped @@ -188,6 +189,11 @@ function build_pkg { rm -rf .git + # Fetch sbuild options from .repos yaml file + opts=$(yq ".sbuild_options.\"$pkg_name\"" "$3") + [ "$opts" != "null" ] || opts="" + [ -z "$opts" ] || EXTRA_SBUILD_OPTS="$EXTRA_SBUILD_OPTS $opts" + ici_label update_repo || return 1 SBUILD_OPTS="--verbose --chroot=sbuild --no-clean-source --no-run-lintian --dist=$DEB_DISTRO $EXTRA_SBUILD_OPTS" ici_label "${SBUILD_QUIET[@]}" sg sbuild -c "sbuild $SBUILD_OPTS" || return 4 @@ -289,7 +295,7 @@ function build_source { local exit_code=0 if [ -f "${PKG_FOLDERS[$idx]}/package.xml" ]; then - build_pkg "${PKG_NAMES[$idx]}" "${PKG_FOLDERS[$idx]}" || exit_code=$? + build_pkg "${PKG_NAMES[$idx]}" "${PKG_FOLDERS[$idx]}" "$old_path/$1" || exit_code=$? elif [ -f "${PKG_FOLDERS[$idx]}/setup.py" ]; then build_python_pkg "${PKG_NAMES[$idx]}" "${PKG_FOLDERS[$idx]}" || exit_code=$? else