From fcf357afe2bdc3d72f7a3e914c4b4b5c86666a5d Mon Sep 17 00:00:00 2001 From: JesusPoderoso Date: Thu, 18 Jul 2024 10:22:53 +0200 Subject: [PATCH 1/2] Refs #21387: Remove windows merge metas action Signed-off-by: JesusPoderoso --- README.md | 5 ---- versions.md | 3 ++ windows/merge_yaml_metas/action.yml | 43 ----------------------------- 3 files changed, 3 insertions(+), 48 deletions(-) delete mode 100644 windows/merge_yaml_metas/action.yml diff --git a/README.md b/README.md index f4f965c5..bba5ceb6 100644 --- a/README.md +++ b/README.md @@ -157,11 +157,6 @@ For more information about versioning handle of this project, check following [f - [setup_python_venv](ubuntu/setup_python_venv/action.yml) - Setup a Python virtual environment and add it to the PATH. -### Windows - -- [merge_yaml_metas](windows/merge_yaml_metas/action.yml) - - Merge a set of yaml meta files into a single meta file - ### macOS - [install_brew_packages](macos/install_brew_packages/action.yml) diff --git a/versions.md b/versions.md index 078ddd3a..fee8a8d9 100644 --- a/versions.md +++ b/versions.md @@ -37,6 +37,9 @@ The [Forthcoming](#forthcoming) section includes those features added in `main` The upcoming release will include the following **features**: +- Fix the windows action colcon build to accept multiple colcon meta files. +- Remove the windows action merge yaml meta files. + ## v0.23.0 - Check if python venv already exists in `setup_python_venv` action. diff --git a/windows/merge_yaml_metas/action.yml b/windows/merge_yaml_metas/action.yml deleted file mode 100644 index b457daa4..00000000 --- a/windows/merge_yaml_metas/action.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: 'merge_yaml_metas' -description: Merge given metas into a single meta file. Required because colcon in Windows does not merge them automatically. - -inputs: - - metas: - description: 'Array of yaml metas to merge' - required: true - path: - description: 'Path to save the merged meta file' - required: true - -runs: - using: composite - steps: - - - name: Merge yaml metas - shell: pwsh - run: | - $combined_content = @() - - foreach ($meta in ${{ inputs.metas }}) - { - if ($meta -eq ${{ inputs.metas }}[0]) - { - # Read the content of the first meta file - $meta_content = Get-Content -Path $meta - } - else - { - # Read the content of the meta file, starting from line 2 - # (skipping "name" line [1], but keeping cmake project name line [2] and "cmake-args" line [3]) - $meta_content = Get-Content -Path $meta | Select-Object -Skip 1 - } - $combined_content += $meta_content - } - - # Write the combined content to the output meta file - $combined_content | Out-File -FilePath ${{ inputs.path }} -Encoding UTF8 - - # Display the combined content - echo "Merged .meta content" - echo $combined_content From cff248e347f6ab9c5ee457e1aebc546e0fbffb75 Mon Sep 17 00:00:00 2001 From: JesusPoderoso Date: Thu, 18 Jul 2024 12:39:24 +0200 Subject: [PATCH 2/2] Refs #21387: Update colcon build action to avoid double quotes on colcon meta arg Signed-off-by: JesusPoderoso --- windows/colcon_build/action.yml | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/windows/colcon_build/action.yml b/windows/colcon_build/action.yml index d89df963..1f66acb5 100644 --- a/windows/colcon_build/action.yml +++ b/windows/colcon_build/action.yml @@ -4,9 +4,9 @@ description: Use colcon build command to build multiple packages inputs: colcon_meta_file: - description: colcon.meta file to set cmake options. If empty, it uses an empty file + description: colcon.meta file to set cmake options. If empty, it uses a non-existing file required: false - default: '' + default: '__invalid.meta' colcon_build_args: description: Arguments to pass to colcon build command (use cmake_args input for CMake options) @@ -57,14 +57,7 @@ runs: ${{ inputs.workspace_dependencies }}/setup.ps1 } - if ([string]::IsNullOrEmpty("${{ inputs.colcon_meta_file }}")) { - New-Item -ItemType File "${{ inputs.workspace }}\colcon.meta" - $env:COLCON_BUILD_META_ = "${{ inputs.workspace }}\colcon.meta" - } else { - $env:COLCON_BUILD_META_ = "${{ inputs.colcon_meta_file }}" - } - - echo "Using colcon.meta file <$env:COLCON_BUILD_META_>" + echo "Using colcon.meta file(s) <${{ inputs.colcon_meta_file }}>" cd ${{ inputs.workspace }} @@ -77,16 +70,10 @@ runs: -StartInPath (pwd) -DevCmdArguments '/arch=x64 /host_arch=x64' colcon build ` - --metas $env:COLCON_BUILD_META_ ` + --metas ${{ inputs.colcon_meta_file }} ` ${{ inputs.colcon_build_args_default }} ` ${{ inputs.colcon_build_args }} ` --cmake-args ` -DCMAKE_BUILD_TYPE=${{ inputs.cmake_build_type }} ${{ inputs.cmake_args_default }} ${{ inputs.cmake_args }} - cd - - - if ([string]::IsNullOrEmpty("${{ inputs.colcon_meta_file }}")) { - Remove-Item -Path "${{ inputs.workspace }}\colcon.meta" - } - "::endgroup::"