Skip to content

Commit

Permalink
refactor(colcon-build): nice-command to build-pre-command (#310)
Browse files Browse the repository at this point in the history
Signed-off-by: M. Fatih Cırıt <[email protected]>
  • Loading branch information
xmfcx authored Aug 20, 2024
1 parent 0dbf0d4 commit f95438f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion colcon-build/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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" |

Expand Down
6 changes: 3 additions & 3 deletions colcon-build/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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 }} \
Expand Down

0 comments on commit f95438f

Please sign in to comment.