@@ -29,10 +29,12 @@ jobs:
29
29
rhel_binary :
30
30
name : ${{ inputs.ros_distro }} RHEL binary build
31
31
runs-on : ubuntu-latest
32
- env :
33
- path : src/control_toolbox
34
32
container : ghcr.io/ros-controls/ros:${{ inputs.ros_distro }}-rhel
35
33
steps :
34
+ - name : Get repository name
35
+ # Extract the repository name from the GITHUB_REPOSITORY environment variable
36
+ # ${{ github.event.repository.name }} seems to be not working with act
37
+ run : echo "path=src/${GITHUB_REPOSITORY#*/}" >> $GITHUB_ENV
36
38
- name : Checkout default ref when build is not scheduled
37
39
if : ${{ github.event_name != 'schedule' }}
38
40
uses : actions/checkout@v4
45
47
ref : ${{ inputs.ref_for_scheduled_build }}
46
48
path : ${{ env.path }}
47
49
- name : Install dependencies
50
+ shell : bash
48
51
run : |
49
52
source /opt/ros/${{ inputs.ros_distro }}/setup.bash
50
53
source /opt/ros2_ws/install/local_setup.bash
@@ -53,19 +56,22 @@ jobs:
53
56
fi
54
57
rosdep update
55
58
rosdep install -iyr --from-path src || true
59
+ - name : Get list of packages
60
+ # we need both paths, there is no wildcard/glob for packages defined in the root folder and subfolders at the same time
61
+ run : |
62
+ echo "package_list=$(colcon list --paths ${{ env.path }} --names-only) $(colcon list --paths ${{ env.path }}/* --names-only)" >> $GITHUB_ENV
56
63
- name : Build workspace
64
+ shell : bash
57
65
# source also underlay workspace with generate_parameter_library on rhel9
58
66
run : |
59
67
source /opt/ros/${{ inputs.ros_distro }}/setup.bash
60
68
source /opt/ros2_ws/install/local_setup.bash
61
- # we need both paths, there is no wildcard/glob for packages defined in the root folder and subfolders at the same time
62
- colcon build --packages-up-to $(colcon list --paths ${{ env.path }} --names-only) $(colcon list --paths ${{ env.path }}/* --names-only) --packages-skip ${{ inputs.skip_packages }}
69
+ colcon build --packages-up-to ${{ env.package_list }} --packages-skip ${{ inputs.skip_packages }}
63
70
- name : Test workspace
64
71
shell : bash
65
72
continue-on-error : true
66
73
run : |
67
74
source /opt/ros/${{ inputs.ros_distro }}/setup.bash
68
75
source /opt/ros2_ws/install/local_setup.bash
69
- # we need both paths, there is no wildcard/glob for packages defined in the root folder and subfolders at the same time
70
- colcon test --packages-select $(colcon list --paths ${{ env.path }} --names-only) $(colcon list --paths ${{ env.path }}/* --names-only) --packages-skip ${{ inputs.skip_packages }}
76
+ colcon test --packages-select ${{ env.package_list }} --packages-skip ${{ inputs.skip_packages }}
71
77
colcon test-result --verbose
0 commit comments