Skip to content

Commit cd3a8ea

Browse files
Merge branch 'ros2-rust:main' into main
2 parents b07fd43 + 3c706a2 commit cd3a8ea

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

.github/workflows/generate-bindings.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,18 @@ jobs:
6565
- name: Install bindgen
6666
run: cargo binstall -y bindgen-cli
6767

68+
- name: Install GitHub CLI tool
69+
run: |
70+
(type -p wget >/dev/null || (sudo apt update && sudo apt install wget -y)) \
71+
&& sudo mkdir -p -m 755 /etc/apt/keyrings \
72+
&& out=$(mktemp) && wget -nv -O$out https://cli.github.com/packages/githubcli-archive-keyring.gpg \
73+
&& cat $out | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \
74+
&& sudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \
75+
&& sudo mkdir -p -m 755 /etc/apt/sources.list.d \
76+
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
77+
&& sudo apt update \
78+
&& sudo apt install gh -y
79+
6880
- name: Generate bindings
6981
run: |
7082
. /opt/ros/${{ matrix.ros_distribution }}/setup.sh
@@ -73,6 +85,8 @@ jobs:
7385
7486
- name: Submit PR
7587
run: |
88+
cd $GITHUB_WORKSPACE
89+
git config --global --add safe.directory $GITHUB_WORKSPACE
7690
if git diff --exit-code; then
7791
exit 0
7892
fi

rclrs/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ fn main() {
2121
let ros_distro = if let Ok(value) = env::var(ROS_DISTRO) {
2222
value
2323
} else {
24-
use rustflags;
2524
cfg_if::cfg_if! {
2625
if #[cfg(feature="use_ros_shim")] {
26+
use rustflags;
2727
// // Look for --cfg ros_distro=<ros_distro>
2828
for flag in rustflags::from_env() {
2929
if matches!(flag, rustflags::Flag::Cfg { ref name, value : _ } if name == "ros_distro") {

0 commit comments

Comments
 (0)