Skip to content

Commit ec6a3cc

Browse files
committed
ATTEMPT Fix; Failing doc gen CI job due to always building on rolling
1 parent f0960d1 commit ec6a3cc

2 files changed

Lines changed: 31 additions & 7 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,19 @@ permissions:
1515

1616
jobs:
1717
htmlproofer:
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
include:
22+
- container: 'moveit/moveit2:rolling-source'
23+
rosdistro: 'rolling'
24+
- container: 'moveit/moveit2:jazzy-source'
25+
rosdistro: 'jazzy'
26+
- container: 'moveit/moveit2:humble-source'
27+
rosdistro: 'humble'
1828
runs-on: ubuntu-latest
1929
container:
20-
image: moveit/moveit2:jazzy-release
30+
image: ${{ matrix.container }}
2131
steps:
2232
- uses: actions/checkout@v4
2333

@@ -40,10 +50,10 @@ jobs:
4050
- name: Run htmlproofer.sh
4151
shell: bash
4252
run: |
43-
source /opt/ros/rolling/setup.bash
53+
source /opt/ros/${{ matrix.rosdistro }}/setup.bash
4454
source /root/ws_moveit/install/setup.bash
4555
source .venv/bin/activate
46-
./htmlproofer.sh
56+
./htmlproofer.sh ${{ matrix.rosdistro }}
4757
4858
upload_site_artifacts:
4959
strategy:

htmlproofer.sh

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,26 @@
11
#!/bin/bash
22
# Note that a virtual environment is required when running this script in CI
3+
#
4+
# Usage: ./htmlproofer.sh [ros_distro]
5+
# ros_distro: ROS distro to build docs against (e.g. rolling, jazzy, humble).
6+
# Defaults to the ROS_DISTRO environment variable, or "rolling".
37
set -e
48

9+
# Resolve the target ROS distro from the first argument, the ROS_DISTRO env var, or fall back to rolling
10+
ROS_DISTRO_ARG=${1:-${ROS_DISTRO:-rolling}}
11+
12+
# Map the ROS distro to the corresponding moveit2 git branch.
13+
# main serves both rolling and jazzy; humble has its own branch.
14+
case "$ROS_DISTRO_ARG" in
15+
humble) MOVEIT_BRANCH=humble ;;
16+
*) MOVEIT_BRANCH=main ;;
17+
esac
18+
519
# Define some config vars
620
export NOKOGIRI_USE_SYSTEM_LIBRARIES=true
721
export REPOSITORY_NAME=${PWD##*/}
8-
export MOVEIT_BRANCH=main
9-
echo "Testing branch $MOVEIT_BRANCH of $REPOSITORY_NAME"
22+
export MOVEIT_BRANCH
23+
echo "Testing branch $MOVEIT_BRANCH of $REPOSITORY_NAME (ROS distro: $ROS_DISTRO_ARG)"
1024

1125
# Install htmlpoofer
1226
gem install --user-install html-proofer -v 3.19.4 # newer 4.x requires different cmdline options
@@ -38,8 +52,8 @@ grep -rl 'https:\/\/github.com\/moveit\/moveit2_tutorials\/blob\/main\/' ./build
3852
xargs sed -i "s|https://github.com/moveit/moveit2_tutorials/blob/main/|file://$PWD|g"
3953

4054
# Replace internal links with local file paths
41-
grep -rl 'https:\/\/moveit.picknik.ai\/rolling\/' ./build/ | \
42-
xargs sed -i "s|https://moveit.picknik.ai/rolling/|file://$PWD|g"
55+
grep -rl "https:\/\/moveit.picknik.ai\/${ROS_DISTRO_ARG}\/" ./build/ | \
56+
xargs sed -i "s|https://moveit.picknik.ai/${ROS_DISTRO_ARG}/|file://$PWD|g"
4357

4458
# Run HTML tests on generated build output to check for 404 errors, etc
4559
# 429 or 403 - happens when GitHub rate-limits requests

0 commit comments

Comments
 (0)