Skip to content

Commit 1be6e10

Browse files
committed
Introduced the PLATFORMIO_RUN_JOBS environment variable // Resolve platformio#5077
1 parent c9016d6 commit 1be6e10

File tree

5 files changed

+10
-7
lines changed

5 files changed

+10
-7
lines changed

HISTORY.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ test-driven methodologies, and modern toolchains for unrivaled success.
2121
6.1.17 (2024-??-??)
2222
~~~~~~~~~~~~~~~~~~~
2323

24+
* Introduced the `PLATFORMIO_RUN_JOBS <https://docs.platformio.org/en/latest/envvars.html#envvar-PLATFORMIO_RUN_JOBS>`__ environment variable, allowing manual override of the number of parallel build jobs (`issue #5077 <https://github.com/platformio/platformio-core/issues/5077>`_)
2425
* Added support for ``tar.xz`` tarball dependencies (`pull #4974 <https://github.com/platformio/platformio-core/pull/4974>`_)
2526
* Ensured that dependencies of private libraries are no longer unnecessarily re-installed, optimizing dependency management and reducing redundant operations (`issue #4987 <https://github.com/platformio/platformio-core/issues/4987>`_)
2627
* Resolved an issue where the ``compiledb`` target failed to properly escape compiler executable paths containing spaces (`issue #4998 <https://github.com/platformio/platformio-core/issues/4998>`_)

platformio/run/cli.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,11 @@
3333
# pylint: disable=too-many-arguments,too-many-locals,too-many-branches
3434

3535
try:
36-
DEFAULT_JOB_NUMS = cpu_count()
36+
SYSTEM_CPU_COUNT = cpu_count()
3737
except NotImplementedError:
38-
DEFAULT_JOB_NUMS = 1
38+
SYSTEM_CPU_COUNT = 1
39+
40+
DEFAULT_JOB_NUMS = int(os.getenv("PLATFORMIO_RUN_JOBS", SYSTEM_CPU_COUNT))
3941

4042

4143
@click.command("run", short_help="Run project targets (build, upload, clean, etc.)")

tests/commands/pkg/test_install.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
[env]
3232
platform = platformio/atmelavr@^3.4.0
3333
lib_deps =
34-
milesburton/DallasTemperature@^3.9.1
34+
milesburton/DallasTemperature@^4.0.4
3535
https://github.com/esphome/ESPAsyncWebServer/archive/refs/tags/v2.1.0.zip
3636
3737
[env:baremetal]
@@ -215,7 +215,7 @@ def test_project(
215215
PackageSpec("toolchain-atmelavr@1.70300.191015"),
216216
]
217217
assert config.get("env:devkit", "lib_deps") == [
218-
"milesburton/DallasTemperature@^3.9.1",
218+
"milesburton/DallasTemperature@^4.0.4",
219219
"https://github.com/esphome/ESPAsyncWebServer/archive/refs/tags/v2.1.0.zip",
220220
]
221221

@@ -241,7 +241,7 @@ def test_private_lib_deps(
241241
"version": "1.0.0",
242242
"dependencies": {
243243
"bblanchon/ArduinoJson": "^5",
244-
"milesburton/DallasTemperature": "^3.9.1"
244+
"milesburton/DallasTemperature": "^4.0.4"
245245
}
246246
}
247247
"""

tests/commands/test_lib_complex.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ def test_global_lib_update_check(clirunner, validate_cliresult):
235235
validate_cliresult(result)
236236
output = json.loads(result.output)
237237
assert set(
238-
["Adafruit PN532", "AsyncMqttClient", "ESPAsyncTCP", "NeoPixelBus"]
238+
["Adafruit PN532", "AsyncMqttClient", "AsyncTCP", "ESPAsyncTCP", "NeoPixelBus"]
239239
) == set(lib["name"] for lib in output)
240240

241241

0 commit comments

Comments
 (0)