From dc01a445d98be9dd2be963382cef7e174bdbece2 Mon Sep 17 00:00:00 2001 From: Christoph Froehlich Date: Mon, 25 Nov 2024 20:22:45 +0000 Subject: [PATCH 01/10] Install boost --- .../reusable-ros-tooling-win-build.yml | 25 +++++++++++++------ 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/.github/workflows/reusable-ros-tooling-win-build.yml b/.github/workflows/reusable-ros-tooling-win-build.yml index 22a884f..2e54d5c 100644 --- a/.github/workflows/reusable-ros-tooling-win-build.yml +++ b/.github/workflows/reusable-ros-tooling-win-build.yml @@ -45,6 +45,19 @@ jobs: required-ros-distributions: ${{ inputs.ros_distro }} use-ros2-testing: true + - name: Install boost + uses: MarkusJx/install-boost@v2.4.5 + id: install-boost + with: + # REQUIRED: Specify the required boost version + # A list of supported versions can be found here: + # https://github.com/MarkusJx/prebuilt-boost/blob/main/versions-manifest.json + boost_version: 1.86.0 + # OPTIONAL: Specify a platform version + platform_version: 2019 + # OPTIONAL: Specify a toolset + toolset: msvc + - name: Checkout default ref when build is not scheduled if: ${{ github.event_name != 'schedule' }} uses: actions/checkout@v4 @@ -73,11 +86,9 @@ jobs: "repo_file=" | Out-File -FilePath $Env:GITHUB_OUTPUT -Append } - - uses: actions/setup-python@v5 - with: - python-version: '3.8' - - uses: ros-tooling/action-ros-ci@0.3.15 + env: + BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }} with: target-ros2-distro: ${{ inputs.ros_distro }} package-name: ${{ steps.package_list_action.outputs.package_list }} @@ -86,9 +97,9 @@ jobs: colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml colcon-defaults: | { - "test": { - "executor": "sequential" - } + "test": { + "executor": "sequential" + } } id: action-ros From 29506f260139ac60a04e7df4a022044efc645b8e Mon Sep 17 00:00:00 2001 From: Christoph Froehlich Date: Mon, 25 Nov 2024 20:24:01 +0000 Subject: [PATCH 02/10] Is BOOST_ROOT necessary? --- .github/workflows/reusable-ros-tooling-win-build.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/reusable-ros-tooling-win-build.yml b/.github/workflows/reusable-ros-tooling-win-build.yml index 2e54d5c..e10f4bb 100644 --- a/.github/workflows/reusable-ros-tooling-win-build.yml +++ b/.github/workflows/reusable-ros-tooling-win-build.yml @@ -87,8 +87,6 @@ jobs: } - uses: ros-tooling/action-ros-ci@0.3.15 - env: - BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }} with: target-ros2-distro: ${{ inputs.ros_distro }} package-name: ${{ steps.package_list_action.outputs.package_list }} From 927e81b2e1f13c99cb25e83d1ee45574d5738412 Mon Sep 17 00:00:00 2001 From: Christoph Froehlich Date: Mon, 25 Nov 2024 20:24:39 +0000 Subject: [PATCH 03/10] Make boost optional --- .github/workflows/reusable-ros-tooling-win-build.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/reusable-ros-tooling-win-build.yml b/.github/workflows/reusable-ros-tooling-win-build.yml index e10f4bb..9b6f0bd 100644 --- a/.github/workflows/reusable-ros-tooling-win-build.yml +++ b/.github/workflows/reusable-ros-tooling-win-build.yml @@ -24,6 +24,11 @@ on: required: false default: '' type: string + install_boost: + description: 'Install boost for the build' + required: false + default: false + type: boolean jobs: reusable_ros_tooling_source_build: @@ -47,6 +52,7 @@ jobs: - name: Install boost uses: MarkusJx/install-boost@v2.4.5 + if: ${{ inputs.install_boost }} id: install-boost with: # REQUIRED: Specify the required boost version From 49f727971d5209e568a93f6a5fda28560afa97c9 Mon Sep 17 00:00:00 2001 From: Christoph Froehlich Date: Mon, 25 Nov 2024 22:02:42 +0000 Subject: [PATCH 04/10] Revert "Is BOOST_ROOT necessary?" This reverts commit cc163ad0352df79c8c55d4c3f9e74d7e80561a25. --- .github/workflows/reusable-ros-tooling-win-build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/reusable-ros-tooling-win-build.yml b/.github/workflows/reusable-ros-tooling-win-build.yml index 9b6f0bd..6e79057 100644 --- a/.github/workflows/reusable-ros-tooling-win-build.yml +++ b/.github/workflows/reusable-ros-tooling-win-build.yml @@ -93,6 +93,8 @@ jobs: } - uses: ros-tooling/action-ros-ci@0.3.15 + env: + BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }} with: target-ros2-distro: ${{ inputs.ros_distro }} package-name: ${{ steps.package_list_action.outputs.package_list }} From 05c8e6e6f0a02f3ec7eaba90d2ee87898f07d2b4 Mon Sep 17 00:00:00 2001 From: Christoph Froehlich Date: Tue, 26 Nov 2024 12:02:47 +0000 Subject: [PATCH 05/10] Add windows_dependencies input --- .github/workflows/reusable-ros-tooling-win-build.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/reusable-ros-tooling-win-build.yml b/.github/workflows/reusable-ros-tooling-win-build.yml index 6e79057..1f3e3d8 100644 --- a/.github/workflows/reusable-ros-tooling-win-build.yml +++ b/.github/workflows/reusable-ros-tooling-win-build.yml @@ -24,6 +24,11 @@ on: required: false default: '' type: string + windows_dependencies: + description: 'Path to a repos file with additional windows dependencies' + required: false + default: '' + type: string install_boost: description: 'Install boost for the build' required: false @@ -100,6 +105,7 @@ jobs: package-name: ${{ steps.package_list_action.outputs.package_list }} vcs-repo-file-url: | ${{ steps.check_local_repos.outputs.repo_file }} + ${{ env.repo_path }}/${{ inputs.windows_dependencies }} colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml colcon-defaults: | { From 2028254098c19ec317d1dc6af69281695204a6cc Mon Sep 17 00:00:00 2001 From: Christoph Froehlich Date: Thu, 2 Jan 2025 23:21:27 +0000 Subject: [PATCH 06/10] Fix case of empty windows repos file --- .../workflows/reusable-ros-tooling-win-build.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reusable-ros-tooling-win-build.yml b/.github/workflows/reusable-ros-tooling-win-build.yml index 1f3e3d8..b124b0e 100644 --- a/.github/workflows/reusable-ros-tooling-win-build.yml +++ b/.github/workflows/reusable-ros-tooling-win-build.yml @@ -97,6 +97,17 @@ jobs: "repo_file=" | Out-File -FilePath $Env:GITHUB_OUTPUT -Append } + - name: Set windows dependencies variable + id: set_windows_dependencies + run: | + if (Test-Path ${{ env.repo_path }}/${{ inputs.windows_dependencies }}) { + Write-Output "Windows repos file found" + "repo_file=${{ env.repo_path }}/${{ inputs.windows_dependencies }}" | Out-File -FilePath $Env:GITHUB_OUTPUT -Append + } else { + Write-Output "No local repos file found" + "repo_file=" | Out-File -FilePath $Env:GITHUB_OUTPUT -Append + } + - uses: ros-tooling/action-ros-ci@0.3.15 env: BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }} @@ -105,7 +116,8 @@ jobs: package-name: ${{ steps.package_list_action.outputs.package_list }} vcs-repo-file-url: | ${{ steps.check_local_repos.outputs.repo_file }} - ${{ env.repo_path }}/${{ inputs.windows_dependencies }} + ${{ steps.set_windows_dependencies.outputs.repo_file }} + colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml colcon-defaults: | { From 88f11391a98bd4ce48f19244af8bc80e1b3718aa Mon Sep 17 00:00:00 2001 From: Christoph Froehlich Date: Thu, 2 Jan 2025 23:33:02 +0000 Subject: [PATCH 07/10] Fix case of empty windows repos file --- .github/workflows/reusable-ros-tooling-win-build.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/reusable-ros-tooling-win-build.yml b/.github/workflows/reusable-ros-tooling-win-build.yml index b124b0e..95ec246 100644 --- a/.github/workflows/reusable-ros-tooling-win-build.yml +++ b/.github/workflows/reusable-ros-tooling-win-build.yml @@ -100,13 +100,13 @@ jobs: - name: Set windows dependencies variable id: set_windows_dependencies run: | - if (Test-Path ${{ env.repo_path }}/${{ inputs.windows_dependencies }}) { + if (${{ inputs.windows_dependencies }} -ne '' -and Test-Path ${{ env.repo_path }}/${{ inputs.windows_dependencies }}) { Write-Output "Windows repos file found" "repo_file=${{ env.repo_path }}/${{ inputs.windows_dependencies }}" | Out-File -FilePath $Env:GITHUB_OUTPUT -Append - } else { - Write-Output "No local repos file found" - "repo_file=" | Out-File -FilePath $Env:GITHUB_OUTPUT -Append - } + } else { + Write-Output "No windows dependencies provided or file not found" + "repo_file=" | Out-File -FilePath $Env:GITHUB_OUTPUT -Append + } - uses: ros-tooling/action-ros-ci@0.3.15 env: From 7b3e70a209bd7466e9ba1cfbacb16eeadfe1face Mon Sep 17 00:00:00 2001 From: Christoph Froehlich Date: Fri, 3 Jan 2025 09:00:53 +0000 Subject: [PATCH 08/10] Try fixing pwsh syntax --- .../reusable-ros-tooling-win-build.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/reusable-ros-tooling-win-build.yml b/.github/workflows/reusable-ros-tooling-win-build.yml index 95ec246..60f2644 100644 --- a/.github/workflows/reusable-ros-tooling-win-build.yml +++ b/.github/workflows/reusable-ros-tooling-win-build.yml @@ -89,9 +89,9 @@ jobs: - name: Check for local repos file id: check_local_repos run: | - if (Test-Path ${{ env.repo_path }}/${{ steps.package_list_action.outputs.repo_name }}.${{ inputs.ros_distro }}.repos) { + if (Test-Path ${{ env.repo_path }}\${{ steps.package_list_action.outputs.repo_name }}.${{ inputs.ros_distro }}.repos) { Write-Output "Local repos file found" - "repo_file=${{ env.repo_path }}/${{ steps.package_list_action.outputs.repo_name }}.${{ inputs.ros_distro }}.repos" | Out-File -FilePath $Env:GITHUB_OUTPUT -Append + "repo_file=${{ env.repo_path }}\${{ steps.package_list_action.outputs.repo_name }}.${{ inputs.ros_distro }}.repos" | Out-File -FilePath $Env:GITHUB_OUTPUT -Append } else { Write-Output "No local repos file found" "repo_file=" | Out-File -FilePath $Env:GITHUB_OUTPUT -Append @@ -100,13 +100,13 @@ jobs: - name: Set windows dependencies variable id: set_windows_dependencies run: | - if (${{ inputs.windows_dependencies }} -ne '' -and Test-Path ${{ env.repo_path }}/${{ inputs.windows_dependencies }}) { - Write-Output "Windows repos file found" - "repo_file=${{ env.repo_path }}/${{ inputs.windows_dependencies }}" | Out-File -FilePath $Env:GITHUB_OUTPUT -Append - } else { - Write-Output "No windows dependencies provided or file not found" - "repo_file=" | Out-File -FilePath $Env:GITHUB_OUTPUT -Append - } + if (![string]::IsNullOrWhiteSpace("${{ inputs.windows_dependencies }}") -and (Test-Path "${{ env.repo_path }}\${{ inputs.windows_dependencies }}")) { + Write-Output "Windows repos file found" + "repo_file=${{ env.repo_path }}\${{ inputs.windows_dependencies }}" | Out-File -FilePath $Env:GITHUB_OUTPUT -Append + } else { + Write-Output "No windows dependencies provided or file not found" + "repo_file=" | Out-File -FilePath $Env:GITHUB_OUTPUT -Append + } - uses: ros-tooling/action-ros-ci@0.3.15 env: From 870ad6bc3b1386cbb521971d7e80554c7f258eac Mon Sep 17 00:00:00 2001 From: Christoph Froehlich Date: Fri, 3 Jan 2025 12:07:21 +0000 Subject: [PATCH 09/10] Add comment --- .github/workflows/reusable-ros-tooling-win-build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/reusable-ros-tooling-win-build.yml b/.github/workflows/reusable-ros-tooling-win-build.yml index 60f2644..9001f72 100644 --- a/.github/workflows/reusable-ros-tooling-win-build.yml +++ b/.github/workflows/reusable-ros-tooling-win-build.yml @@ -109,6 +109,7 @@ jobs: } - uses: ros-tooling/action-ros-ci@0.3.15 + # tests are disabled https://github.com/ros-tooling/action-ros-ci/pull/712#issuecomment-969495087 env: BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }} with: From cb38705964ab4159b42dd439174c3a3d9ccff297 Mon Sep 17 00:00:00 2001 From: Christoph Froehlich Date: Fri, 3 Jan 2025 12:07:37 +0000 Subject: [PATCH 10/10] Use shared boost libraries --- .github/workflows/reusable-ros-tooling-win-build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/reusable-ros-tooling-win-build.yml b/.github/workflows/reusable-ros-tooling-win-build.yml index 9001f72..b0c9053 100644 --- a/.github/workflows/reusable-ros-tooling-win-build.yml +++ b/.github/workflows/reusable-ros-tooling-win-build.yml @@ -68,6 +68,8 @@ jobs: platform_version: 2019 # OPTIONAL: Specify a toolset toolset: msvc + # Whether the boost libraries will be supplied through static or shared libraries + link: shared - name: Checkout default ref when build is not scheduled if: ${{ github.event_name != 'schedule' }}