From 58da508e675c4b4c3f6bd9e4f6acf0d11e5c4b9b Mon Sep 17 00:00:00 2001 From: ptreman Date: Thu, 5 Dec 2019 14:47:37 -0500 Subject: [PATCH 1/3] Switch build threads down to 1 to fix ubuntu 18 bug --- fabfile.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fabfile.py b/fabfile.py index 7e0293291..5e907d157 100644 --- a/fabfile.py +++ b/fabfile.py @@ -228,9 +228,9 @@ def test(long=False): with(lcd("src")): if long in (True, 'True', 'true'): - local("PLATFORM=TESTING make -j4 test_long") + local("PLATFORM=TESTING make -j1 test_long") else: - local("PLATFORM=TESTING make -j4 test") + local("PLATFORM=TESTING make -j1 test") @task def functional_test_flash(skip_flashing=False): @@ -338,7 +338,7 @@ def build(capture=False, do_clean=False): with lcd("%s/src" % env.root_dir): if do_clean: clean(); - output = local("%s make -j4" % options, capture=capture) + output = local("%s make -j1 " % options, capture=capture) if output.failed: puts(output) abort(red("Building %s failed" % board_options['name'])) From 062aeafc15e21eef0894a3d3f7362347b982e320 Mon Sep 17 00:00:00 2001 From: ptreman Date: Thu, 5 Dec 2019 14:48:36 -0500 Subject: [PATCH 2/3] Dynamicley scale vm core count based on host comp --- Vagrantfile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Vagrantfile b/Vagrantfile index ac4304ada..3c4801195 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -5,12 +5,21 @@ # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! VAGRANTFILE_API_VERSION = "2" +def total_cpus + require 'etc' + Etc.nprocessors +end + Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| # For a complete reference, please see the online documentation at # vagrantup.com. # Every Vagrant virtual environment requires a box to build off of. config.vm.box = "bento/ubuntu-18.04" + config.vm.box_version = "201912.03.0" + config.vm.provider :virtualbox do |v| + v.cpus = total_cpus - 1 + end # Check for proxy enviroment variable and set it if ENV['HTTP_PROXY'] || ENV['HTTPS_PROXY'] @@ -31,7 +40,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| end end - + config.vm.box_download_insecure = true config.vm.provision "shell", privileged: false, keep_color: true do |s| s.inline = "ln -fs /vagrant vi-firmware;" s.inline += "VAGRANT=1 vi-firmware/script/bootstrap.sh" From 158bed9b0c563b23efdd64f78d9fb03b14326abb Mon Sep 17 00:00:00 2001 From: ptreman Date: Thu, 5 Dec 2019 15:04:02 -0500 Subject: [PATCH 3/3] Added check for single core processors --- Vagrantfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Vagrantfile b/Vagrantfile index 3c4801195..7e79a0943 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -18,7 +18,11 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.box = "bento/ubuntu-18.04" config.vm.box_version = "201912.03.0" config.vm.provider :virtualbox do |v| - v.cpus = total_cpus - 1 + if total_cpus > 1 + v.cpus = total_cpus - 1 + else + v.cpus = 1 + end end # Check for proxy enviroment variable and set it