From f95438fe91ac928c712bc9aa77040e282e23e9c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=2E=20Fatih=20C=C4=B1r=C4=B1t?= Date: Tue, 20 Aug 2024 13:00:45 +0300 Subject: [PATCH] refactor(colcon-build): nice-command to build-pre-command (#310) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: M. Fatih Cırıt --- colcon-build/README.md | 2 +- colcon-build/action.yaml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/colcon-build/README.md b/colcon-build/README.md index 78c78ee6..aac5dbcd 100644 --- a/colcon-build/README.md +++ b/colcon-build/README.md @@ -39,7 +39,7 @@ jobs: | token | false | The token for build dependencies. | | include-eol-distros | false | If true, adds `--include-eol-distros` to `rosdep update`. | | cache-key-element | false | This value is added to the github actions cache key. | -| nice-command | false | This command is prepended to the `colcon build` to avoid draining resources. | +| build-pre-command | false | This command is prepended to the `colcon build` to avoid draining resources. | | colcon-parallel-workers-flag | false | Will be appended to the colcon build command to limit number of packages built in parallel. e.g. "--parallel-workers 3" | | makeflags | false | Will be exported as MAKEFLAGS environment variable for colcon build step. e.g. "-j 4" | diff --git a/colcon-build/action.yaml b/colcon-build/action.yaml index 26fbb4be..781f5145 100644 --- a/colcon-build/action.yaml +++ b/colcon-build/action.yaml @@ -26,8 +26,8 @@ inputs: description: Will be part of the cache key default: default required: false - nice-command: - description: See `man nice` for details + build-pre-command: + description: Will be prepended to the colcon build command. e.g. "nice -n 19" or "taskset --cpu-list 0-2" required: false default: nice -n 19 colcon-parallel-workers-flag: @@ -94,7 +94,7 @@ runs: cat /etc/nsswitch.conf MAKEFLAGS="${{ inputs.makeflags }}" echo "MAKEFLAGS=$MAKEFLAGS" # for debugging - ${{ inputs.nice-command }} colcon build ${{ inputs.colcon-parallel-workers-flag }} \ + ${{ inputs.build-pre-command }} colcon build ${{ inputs.colcon-parallel-workers-flag }} \ --event-handlers console_cohesion+ \ --packages-above-and-dependencies ${{ inputs.target-packages }} \ --cmake-args -DCMAKE_BUILD_TYPE=${{ inputs.cmake-build-type }} \