From 39d35f36d0959d999fd125b18305fcc88ce6359f Mon Sep 17 00:00:00 2001 From: Andy Fingerhut Date: Wed, 15 Jan 2025 20:18:57 -0500 Subject: [PATCH 1/3] Enable batch-install.sh to run on Ubuntu 22.04 Signed-off-by: Andy Fingerhut --- batch-install.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/batch-install.sh b/batch-install.sh index e4f0a063c..6f782cfb9 100755 --- a/batch-install.sh +++ b/batch-install.sh @@ -29,7 +29,7 @@ THIS_SCRIPT_DIR_ABSOLUTE=`readlink -f "${THIS_SCRIPT_DIR_MAYBE_RELATIVE}"` linux_version_warning() { 1>&2 echo "Found ID ${ID} and VERSION_ID ${VERSION_ID} in /etc/os-release" 1>&2 echo "This script only supports these:" - 1>&2 echo " ID ubuntu, VERSION_ID in 20.04" + 1>&2 echo " ID ubuntu, VERSION_ID in 20.04 22.04" 1>&2 echo "" 1>&2 echo "Proceed installing manually at your own risk of" 1>&2 echo "significant time spent figuring out how to make it all" @@ -56,6 +56,9 @@ then 20.04) supported_distribution=1 ;; + 22.04) + supported_distribution=1 + ;; esac fi From 4798fe8fdfa79aa05ca9364022d4888ea8706f33 Mon Sep 17 00:00:00 2001 From: Andy Fingerhut Date: Wed, 19 Feb 2025 13:15:27 -0500 Subject: [PATCH 2/3] Fix #77 Limit parallel jobs used during command 'p4studio interactive' Signed-off-by: Andy Fingerhut --- p4studio/interactive/interactive_command.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/p4studio/interactive/interactive_command.py b/p4studio/interactive/interactive_command.py index 5f30cd3f7..a6b01a82a 100644 --- a/p4studio/interactive/interactive_command.py +++ b/p4studio/interactive/interactive_command.py @@ -29,7 +29,7 @@ from config.configuration_manager import current_configuration_manager from interactive.input_validation import validate_path_to_write, validate_kernel_headers_input, validate_file_to_read from profile.profile import Profile -from profile.profile_command import execute_plan +from profile.profile_command import execute_plan, calculate_jobs_from_available_cpus_and_memory from profile.profile_execution_plan import ProfileExecutionPlan from system.check_system_utils import print_multiple_checks from system.checks import get_initial_checks @@ -166,7 +166,8 @@ def create_default_profile() -> Profile: def build_sde(context: Context, profile: Profile) -> None: - plan = ProfileExecutionPlan(profile, None, os.cpu_count()) + jobs = calculate_jobs_from_available_cpus_and_memory() + plan = ProfileExecutionPlan(profile, None, jobs) execute_plan(context, plan) From dfabc147bd3cfe362693a3edc9c77c141215473c Mon Sep 17 00:00:00 2001 From: Andy Fingerhut Date: Wed, 19 Feb 2025 14:30:02 -0500 Subject: [PATCH 3/3] Force CI to use `nproc` parallel jobs Signed-off-by: Andy Fingerhut --- .github/workflows/ci-test-ubuntu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-test-ubuntu.yml b/.github/workflows/ci-test-ubuntu.yml index 828faa66d..9c1ba0b9e 100644 --- a/.github/workflows/ci-test-ubuntu.yml +++ b/.github/workflows/ci-test-ubuntu.yml @@ -50,7 +50,7 @@ jobs: - name: Build run: | - ./p4studio/p4studio profile apply ./p4studio/profiles/testing.yaml + ./p4studio/p4studio profile apply --jobs $(nproc) ./p4studio/profiles/testing.yaml - name: Show build logs if: success() || failure()