Skip to content

Commit 88c2889

Browse files
Merge pull request #277 from traversaro/removechecks
Remove check for .yaml modification before recipe generated in testpr CI job and fix testpr job
2 parents 320b403 + 7819b05 commit 88c2889

File tree

2 files changed

+36
-32
lines changed

2 files changed

+36
-32
lines changed

.github/workflows/testpr.yml

Lines changed: 16 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
on:
22
pull_request:
3-
paths:
4-
- '*.yaml'
3+
workflow_dispatch:
54

65
env:
76
ROS_VERSION: 2
@@ -55,58 +54,41 @@ jobs:
5554
rm -rf /c/Strawberry
5655
rm -rf "/c/Program Files (x86)/Windows Kits/10/Include/10.0.17763.0/"
5756
58-
- name: Check what files have changed
59-
id: filecheck
60-
shell: bash -l {0}
61-
run: |
62-
git fetch origin main
63-
# continue on error
64-
set +e
65-
git diff --exit-code --name-only origin/main -- vinca_linux_64.yaml > /dev/null
66-
echo "::set-output name=LINUX_YAML_CHANGED::${?}"
67-
git diff --exit-code --name-only origin/main -- vinca_linux_aarch64.yaml > /dev/null
68-
echo "::set-output name=LINUX_AARCH_YAML_CHANGED::${?}"
69-
git diff --exit-code --name-only origin/main -- vinca_osx.yaml > /dev/null
70-
echo "::set-output name=OSX_YAML_CHANGED::${?}"
71-
git diff --exit-code --name-only origin/main -- vinca_osx_arm64.yaml > /dev/null
72-
echo "::set-output name=OSX_ARM_YAML_CHANGED::${?}"
73-
git diff --exit-code --name-only origin/main -- vinca_win.yaml > /dev/null
74-
echo "::set-output name=WIN_YAML_CHANGED::${?}"
7557
- name: Generate recipes for linux-64
7658
shell: bash -l {0}
77-
if: steps.filecheck.outputs.LINUX_YAML_CHANGED == 1 && matrix.platform == 'linux-64'
59+
if: matrix.platform == 'linux-64'
7860
run: |
7961
cp vinca_linux_64.yaml vinca.yaml
8062
mkdir -p recipes
8163
$HOME/.pixi/bin/pixi run -e beta -v vinca --platform linux-64 -m
8264
ls -la recipes
8365
- name: Generate recipes for linux-aarch64
8466
shell: bash -l {0}
85-
if: steps.filecheck.outputs.LINUX_AARCH_YAML_CHANGED == 1 && matrix.platform == 'linux-aarch64'
67+
if: matrix.platform == 'linux-aarch64'
8668
run: |
8769
cp vinca_linux_aarch64.yaml vinca.yaml
8870
mkdir -p recipes
8971
$HOME/.pixi/bin/pixi run -e beta -v vinca --platform linux-aarch64 -m
9072
ls -la recipes
9173
- name: Generate recipes for osx-64
9274
shell: bash -l {0}
93-
if: steps.filecheck.outputs.OSX_YAML_CHANGED == 1 && matrix.platform == 'osx-64'
75+
if: matrix.platform == 'osx-64'
9476
run: |
9577
cp vinca_osx.yaml vinca.yaml
9678
mkdir -p recipes
9779
$HOME/.pixi/bin/pixi run -e beta -v vinca --platform osx-64 -m
9880
ls -la recipes
9981
- name: Generate recipes for osx-arm64
10082
shell: bash -l {0}
101-
if: steps.filecheck.outputs.OSX_ARM_YAML_CHANGED == 1 && matrix.platform == 'osx-arm64'
83+
if: matrix.platform == 'osx-arm64'
10284
run: |
10385
cp vinca_osx_arm64.yaml vinca.yaml
10486
mkdir -p recipes
10587
$HOME/.pixi/bin/pixi run -e beta -v vinca --platform osx-arm64 -m
10688
ls -la recipes
10789
- name: Generate recipes for win-64
10890
shell: bash -l {0}
109-
if: steps.filecheck.outputs.WIN_YAML_CHANGED == 1 && matrix.platform == 'win-64'
91+
if: matrix.platform == 'win-64'
11092
run: |
11193
# Workaround for problem related to long paths
11294
echo "CONDA_BLD_PATH=C:\\bld\\" >> $GITHUB_ENV
@@ -119,37 +101,39 @@ jobs:
119101
id: newrecipecheck
120102
shell: bash -l {0}
121103
run: |
122-
# continue on error
123104
set +e
124-
test ! -d recipes
125-
echo "::set-output name=RECIPE_CREATED::${?}"
105+
if [ ! -d recipes ] || [ -z "$(ls -A recipes)" ]; then
106+
echo "RECIPE_CREATED=0" >> $GITHUB_OUTPUT
107+
else
108+
echo "RECIPE_CREATED=1" >> $GITHUB_OUTPUT
109+
fi
126110
- name: Build recipes for linux-64
127111
shell: bash -l {0}
128-
if: steps.newrecipecheck.outputs.RECIPE_CREATED == 1 && steps.filecheck.outputs.LINUX_YAML_CHANGED == 1 && matrix.platform == 'linux-64'
112+
if: steps.newrecipecheck.outputs.RECIPE_CREATED == 1 && matrix.platform == 'linux-64'
129113
run: |
130114
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
131115
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
132116
- name: Build recipes for linux-aarch64
133117
shell: bash -l {0}
134-
if: steps.newrecipecheck.outputs.RECIPE_CREATED == 1 && steps.filecheck.outputs.LINUX_AARCH_YAML_CHANGED == 1 && matrix.platform == 'linux-aarch64'
118+
if: steps.newrecipecheck.outputs.RECIPE_CREATED == 1 && matrix.platform == 'linux-aarch64'
135119
run: |
136120
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
137121
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
138122
- name: Build recipes for osx-64
139123
shell: bash -l {0}
140-
if: steps.newrecipecheck.outputs.RECIPE_CREATED == 1 && steps.filecheck.outputs.OSX_YAML_CHANGED == 1 && matrix.platform == 'osx-64'
124+
if: steps.newrecipecheck.outputs.RECIPE_CREATED == 1 && matrix.platform == 'osx-64'
141125
run: |
142126
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
143127
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
144128
- name: Build recipes for osx-arm64
145129
shell: bash -l {0}
146-
if: steps.newrecipecheck.outputs.RECIPE_CREATED == 1 && steps.filecheck.outputs.OSX_ARM_YAML_CHANGED == 1 && matrix.platform == 'osx-arm64'
130+
if: steps.newrecipecheck.outputs.RECIPE_CREATED == 1 && matrix.platform == 'osx-arm64'
147131
run: |
148132
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
149133
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
150134
- name: Build recipes for win-64
151135
shell: bash -l {0}
152-
if: steps.newrecipecheck.outputs.RECIPE_CREATED == 1 && steps.filecheck.outputs.WIN_YAML_CHANGED == 1 && matrix.platform == 'win-64'
136+
if: steps.newrecipecheck.outputs.RECIPE_CREATED == 1 && matrix.platform == 'win-64'
153137
run: |
154138
$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
155139
$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

patch/ros-humble-ffmpeg-encoder-decoder.patch

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,23 @@ index da089e4..01e8eea 100644
5252
formats.push_back(*p);
5353
}
5454
}
55+
56+
diff --git a/CMakeLists.txt b/CMakeLists.txt
57+
index 7ba08db..b283bda 100644
58+
--- a/CMakeLists.txt
59+
+++ b/CMakeLists.txt
60+
@@ -16,7 +16,13 @@
61+
cmake_minimum_required(VERSION 3.16)
62+
project(ffmpeg_encoder_decoder)
63+
64+
-add_compile_options(-Wall -Wextra -Wpedantic -Werror)
65+
+add_compile_options(-Wall -Wextra -Wpedantic)
66+
+if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.24.0")
67+
+ option(CMAKE_COMPILE_WARNING_AS_ERROR "Treat compiler warnings as errors." ON)
68+
+ mark_as_advanced(CMAKE_COMPILE_WARNING_AS_ERROR)
69+
+else()
70+
+ add_compile_options(-Werror)
71+
+endif()
72+
73+
# find dependencies
74+
find_package(ament_cmake REQUIRED)

0 commit comments

Comments
 (0)