From 9b0896c40c1fa2221594e6bc449de988c92aac0a Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Fri, 4 Apr 2025 13:52:27 +0200 Subject: [PATCH 1/5] Remove check for .yaml modification before recipe generated in testpr CI job --- .github/workflows/testpr.yml | 35 +++++++++-------------------------- 1 file changed, 9 insertions(+), 26 deletions(-) diff --git a/.github/workflows/testpr.yml b/.github/workflows/testpr.yml index f7bf39c14..52d410ac4 100644 --- a/.github/workflows/testpr.yml +++ b/.github/workflows/testpr.yml @@ -55,26 +55,9 @@ jobs: rm -rf /c/Strawberry rm -rf "/c/Program Files (x86)/Windows Kits/10/Include/10.0.17763.0/" - - name: Check what files have changed - id: filecheck - shell: bash -l {0} - run: | - git fetch origin main - # continue on error - set +e - git diff --exit-code --name-only origin/main -- vinca_linux_64.yaml > /dev/null - echo "::set-output name=LINUX_YAML_CHANGED::${?}" - git diff --exit-code --name-only origin/main -- vinca_linux_aarch64.yaml > /dev/null - echo "::set-output name=LINUX_AARCH_YAML_CHANGED::${?}" - git diff --exit-code --name-only origin/main -- vinca_osx.yaml > /dev/null - echo "::set-output name=OSX_YAML_CHANGED::${?}" - git diff --exit-code --name-only origin/main -- vinca_osx_arm64.yaml > /dev/null - echo "::set-output name=OSX_ARM_YAML_CHANGED::${?}" - git diff --exit-code --name-only origin/main -- vinca_win.yaml > /dev/null - echo "::set-output name=WIN_YAML_CHANGED::${?}" - name: Generate recipes for linux-64 shell: bash -l {0} - if: steps.filecheck.outputs.LINUX_YAML_CHANGED == 1 && matrix.platform == 'linux-64' + if: matrix.platform == 'linux-64' run: | cp vinca_linux_64.yaml vinca.yaml mkdir -p recipes @@ -82,7 +65,7 @@ jobs: ls -la recipes - name: Generate recipes for linux-aarch64 shell: bash -l {0} - if: steps.filecheck.outputs.LINUX_AARCH_YAML_CHANGED == 1 && matrix.platform == 'linux-aarch64' + if: matrix.platform == 'linux-aarch64' run: | cp vinca_linux_aarch64.yaml vinca.yaml mkdir -p recipes @@ -98,7 +81,7 @@ jobs: ls -la recipes - name: Generate recipes for osx-arm64 shell: bash -l {0} - if: steps.filecheck.outputs.OSX_ARM_YAML_CHANGED == 1 && matrix.platform == 'osx-arm64' + if: matrix.platform == 'osx-arm64' run: | cp vinca_osx_arm64.yaml vinca.yaml mkdir -p recipes @@ -106,7 +89,7 @@ jobs: ls -la recipes - name: Generate recipes for win-64 shell: bash -l {0} - if: steps.filecheck.outputs.WIN_YAML_CHANGED == 1 && matrix.platform == 'win-64' + if: matrix.platform == 'win-64' run: | # Workaround for problem related to long paths echo "CONDA_BLD_PATH=C:\\bld\\" >> $GITHUB_ENV @@ -125,31 +108,31 @@ jobs: echo "::set-output name=RECIPE_CREATED::${?}" - name: Build recipes for linux-64 shell: bash -l {0} - if: steps.newrecipecheck.outputs.RECIPE_CREATED == 1 && steps.filecheck.outputs.LINUX_YAML_CHANGED == 1 && matrix.platform == 'linux-64' + if: steps.newrecipecheck.outputs.RECIPE_CREATED == 1 && matrix.platform == 'linux-64' run: | env -i $HOME/.pixi/bin/pixi run -e beta rattler-build build --recipe-dir additional_recipes --target-platform linux-64 -m ./conda_build_config.yaml -c robostack-staging -c conda-forge --skip-existing env -i $HOME/.pixi/bin/pixi run -e beta rattler-build build --recipe-dir recipes --target-platform linux-64 -m ./conda_build_config.yaml -c robostack-staging -c conda-forge --skip-existing - name: Build recipes for linux-aarch64 shell: bash -l {0} - if: steps.newrecipecheck.outputs.RECIPE_CREATED == 1 && steps.filecheck.outputs.LINUX_AARCH_YAML_CHANGED == 1 && matrix.platform == 'linux-aarch64' + if: steps.newrecipecheck.outputs.RECIPE_CREATED == 1 && matrix.platform == 'linux-aarch64' run: | env -i $HOME/.pixi/bin/pixi run -e beta rattler-build build --recipe-dir additional_recipes --target-platform linux-aarch64 -m ./conda_build_config.yaml -c robostack-staging -c conda-forge --skip-existing env -i $HOME/.pixi/bin/pixi run -e beta rattler-build build --recipe-dir recipes --target-platform linux-aarch64 -m ./conda_build_config.yaml -c robostack-staging -c conda-forge --skip-existing - name: Build recipes for osx-64 shell: bash -l {0} - if: steps.newrecipecheck.outputs.RECIPE_CREATED == 1 && steps.filecheck.outputs.OSX_YAML_CHANGED == 1 && matrix.platform == 'osx-64' + if: steps.newrecipecheck.outputs.RECIPE_CREATED == 1 && matrix.platform == 'osx-64' run: | env -i $HOME/.pixi/bin/pixi run -e beta rattler-build build --recipe-dir additional_recipes --target-platform osx-64 -m ./conda_build_config.yaml -c robostack-staging -c conda-forge --skip-existing env -i $HOME/.pixi/bin/pixi run -e beta rattler-build build --recipe-dir recipes --target-platform osx-64 -m ./conda_build_config.yaml -c robostack-staging -c conda-forge --skip-existing - name: Build recipes for osx-arm64 shell: bash -l {0} - if: steps.newrecipecheck.outputs.RECIPE_CREATED == 1 && steps.filecheck.outputs.OSX_ARM_YAML_CHANGED == 1 && matrix.platform == 'osx-arm64' + if: steps.newrecipecheck.outputs.RECIPE_CREATED == 1 && matrix.platform == 'osx-arm64' run: | env -i $HOME/.pixi/bin/pixi run -e beta rattler-build build --recipe-dir additional_recipes --target-platform osx-arm64 -m ./conda_build_config.yaml -c robostack-staging -c conda-forge --skip-existing env -i $HOME/.pixi/bin/pixi run -e beta rattler-build build --recipe-dir recipes --target-platform osx-arm64 -m ./conda_build_config.yaml -c robostack-staging -c conda-forge --skip-existing - name: Build recipes for win-64 shell: bash -l {0} - if: steps.newrecipecheck.outputs.RECIPE_CREATED == 1 && steps.filecheck.outputs.WIN_YAML_CHANGED == 1 && matrix.platform == 'win-64' + if: steps.newrecipecheck.outputs.RECIPE_CREATED == 1 && matrix.platform == 'win-64' run: | $HOME/.pixi/bin/pixi run -e beta rattler-build build --recipe-dir additional_recipes --target-platform win-64 -m ./conda_build_config.yaml -c robostack-staging -c conda-forge --skip-existing $HOME/.pixi/bin/pixi run -e beta rattler-build build --recipe-dir recipes -m ./conda_build_config.yaml --target-platform win-64 -c robostack-staging -c conda-forge --skip-existing From 62ccbc4fd4826501e200242567afe562ec16e67d Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Tue, 8 Apr 2025 09:04:41 +0200 Subject: [PATCH 2/5] Remove filter on .yaml files change in PR trigger --- .github/workflows/testpr.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/testpr.yml b/.github/workflows/testpr.yml index 52d410ac4..50a86d220 100644 --- a/.github/workflows/testpr.yml +++ b/.github/workflows/testpr.yml @@ -1,7 +1,6 @@ on: pull_request: - paths: - - '*.yaml' + workflow_dispatch: env: ROS_VERSION: 2 @@ -73,7 +72,7 @@ jobs: ls -la recipes - name: Generate recipes for osx-64 shell: bash -l {0} - if: steps.filecheck.outputs.OSX_YAML_CHANGED == 1 && matrix.platform == 'osx-64' + if: matrix.platform == 'osx-64' run: | cp vinca_osx.yaml vinca.yaml mkdir -p recipes From 72f279a795189be10345404e5b930e93de575066 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Tue, 8 Apr 2025 09:16:13 +0200 Subject: [PATCH 3/5] Fix warning as error in ffmpeg encoder decoder --- patch/ros-humble-ffmpeg-encoder-decoder.patch | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/patch/ros-humble-ffmpeg-encoder-decoder.patch b/patch/ros-humble-ffmpeg-encoder-decoder.patch index 07fa9f5fb..1e08a074a 100644 --- a/patch/ros-humble-ffmpeg-encoder-decoder.patch +++ b/patch/ros-humble-ffmpeg-encoder-decoder.patch @@ -52,3 +52,23 @@ index da089e4..01e8eea 100644 formats.push_back(*p); } } + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7ba08db..b283bda 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -16,7 +16,13 @@ + cmake_minimum_required(VERSION 3.16) + project(ffmpeg_encoder_decoder) + +-add_compile_options(-Wall -Wextra -Wpedantic -Werror) ++add_compile_options(-Wall -Wextra -Wpedantic) ++if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.24.0") ++ option(CMAKE_COMPILE_WARNING_AS_ERROR "Treat compiler warnings as errors." ON) ++ mark_as_advanced(CMAKE_COMPILE_WARNING_AS_ERROR) ++else() ++ add_compile_options(-Werror) ++endif() + + # find dependencies + find_package(ament_cmake REQUIRED) From e8c4b9c709a704851567dce1f600f666ea59faf2 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Tue, 8 Apr 2025 09:38:02 +0200 Subject: [PATCH 4/5] Update testpr.yml --- .github/workflows/testpr.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/testpr.yml b/.github/workflows/testpr.yml index 50a86d220..8a1678d99 100644 --- a/.github/workflows/testpr.yml +++ b/.github/workflows/testpr.yml @@ -101,10 +101,14 @@ jobs: id: newrecipecheck shell: bash -l {0} run: | + if [ ! -d recipes ] || [ -z "$(ls -A recipes)" ]; then + echo "RECIPE_CREATED=0" >> $GITHUB_OUTPUT + else + echo "RECIPE_CREATED=1" >> $GITHUB_OUTPUT + fi # continue on error set +e test ! -d recipes - echo "::set-output name=RECIPE_CREATED::${?}" - name: Build recipes for linux-64 shell: bash -l {0} if: steps.newrecipecheck.outputs.RECIPE_CREATED == 1 && matrix.platform == 'linux-64' From 7819b056d8b3b119d6947a999349fde6bf7aa67c Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Tue, 8 Apr 2025 09:42:10 +0200 Subject: [PATCH 5/5] Update testpr.yml --- .github/workflows/testpr.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/testpr.yml b/.github/workflows/testpr.yml index 8a1678d99..5fe7f6579 100644 --- a/.github/workflows/testpr.yml +++ b/.github/workflows/testpr.yml @@ -101,14 +101,12 @@ jobs: id: newrecipecheck shell: bash -l {0} run: | + set +e if [ ! -d recipes ] || [ -z "$(ls -A recipes)" ]; then echo "RECIPE_CREATED=0" >> $GITHUB_OUTPUT else echo "RECIPE_CREATED=1" >> $GITHUB_OUTPUT fi - # continue on error - set +e - test ! -d recipes - name: Build recipes for linux-64 shell: bash -l {0} if: steps.newrecipecheck.outputs.RECIPE_CREATED == 1 && matrix.platform == 'linux-64'