diff --git a/.github/actions/set-package-list/action.yml b/.github/actions/set-package-list/action.yml index 535d6c1..8115035 100644 --- a/.github/actions/set-package-list/action.yml +++ b/.github/actions/set-package-list/action.yml @@ -8,6 +8,9 @@ outputs: package_list: description: "A white-space separated list of packages" value: ${{ steps.colcon.outputs.package_list }} + package_path_list: + description: "A white-space separated list of package paths" + value: ${{ steps.colcon.outputs.package_path_list }} repo_name: description: "The name of the repo, last part of github.repository" value: ${{ steps.split_repo.outputs.repo_name }} @@ -22,8 +25,10 @@ runs: run: | if [[ -n "${{ inputs.path }}" ]]; then echo "package_list=$(colcon list --paths ${{ inputs.path }} --names-only | tr '\n' ' ') $(colcon list --paths ${{ inputs.path }}/* --names-only | tr '\n' ' ')" >> $GITHUB_OUTPUT + echo "package_path_list=$(colcon list --paths ${{ inputs.path }} --paths-only | tr '\n' ' ') $(colcon list --paths ${{ inputs.path }}/* --paths-only | tr '\n' ' ')" >> $GITHUB_OUTPUT else echo "package_list=$(colcon list --names-only | tr '\n' ' ')" >> $GITHUB_OUTPUT + echo "package_path_list=$(colcon list --paths-only | tr '\n' ' ')" >> $GITHUB_OUTPUT fi shell: bash - id: split_repo diff --git a/.github/workflows/reusable-rosdoc2.yml b/.github/workflows/reusable-rosdoc2.yml new file mode 100644 index 0000000..4167dcc --- /dev/null +++ b/.github/workflows/reusable-rosdoc2.yml @@ -0,0 +1,37 @@ +name: rosdoc2 +# author: Christoph Froehlich + +on: + workflow_call: + +jobs: + check: + runs-on: ubuntu-latest + env: + # this will be src/{repo-owner}/{repo-name} + path: src/${{ github.repository }} + steps: + - uses: ros-tooling/setup-ros@0.7.1 + - name: Install rosdoc2 and deps + run: | + sudo apt-get update + sudo apt install -y python3-pip git doxygen graphviz + python3 -m venv .venv + source .venv/bin/activate + git clone https://github.com/ros-infrastructure/rosdoc2.git + pip install --upgrade rosdoc2/ + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + path: ${{ env.path }} + - id: package_list_action + uses: ros-controls/ros2_control_ci/.github/actions/set-package-list@master + with: + path: ${{ env.path }} + - name: run rosdoc2 + run: | + source .venv/bin/activate + for path in ${{ steps.package_list_action.outputs.package_path_list }} + do + rosdoc2 build --package-path $path + done