Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework checks and add html-with-errors make target (backport #266) #272

Merged
merged 1 commit into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/sphinx-check-links-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: "Check Page for Broken Links - PR"
on:
workflow_dispatch:
pull_request:

jobs:
check-links:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade --requirement requirements.txt
shell: bash
- name: Install generate_parameter_library
run: |
cd
git clone https://github.com/PickNikRobotics/generate_parameter_library.git
cd generate_parameter_library/generate_parameter_library_py/
python -m pip install .
shell: bash
- name: Install doxygen and graphviz
run: sudo apt-get install -y doxygen graphviz
- name: Restore stats
uses: actions/cache/restore@v4
with:
key: reviewer-stats-${{ github.run_id }}
restore-keys: |
reviewer-stats
path: ~/reviews
- name: Build page with API and run linkchecker
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
make linkcheck-all-subrepos-with-api
6 changes: 5 additions & 1 deletion .github/workflows/sphinx-check-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,19 @@ on:
schedule:
# Run every morning to ensure component documentation is up to date on deployment
- cron: '23 5 * * *'
pull_request: # only runs up through build of sphinx

jobs:
check-links:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
BRANCH: [humble, iron, master]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ matrix.BRANCH }}
- uses: actions/setup-python@v5
with:
python-version: '3.10'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Check Page for Warnings Iron"
name: "Check Page for Warnings"
on:
workflow_dispatch:
push:
Expand All @@ -11,10 +11,15 @@ on:
jobs:
build-halt-on-warnings:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
BRANCH: [humble, iron, master]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ matrix.BRANCH }}
- uses: actions/setup-python@v5
with:
python-version: '3.10'
Expand Down
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ BUILDDIR = _build
help:
@$(SPHINXBUILD) -M help $(SOURCEDIR) $(BUILDDIR) $(SPHINXOPTS) $(O)
@echo " html-with-api"
@echo " html-with-errors"
@echo " html-all-subrepos"
@echo " html-all-subrepos-with-errors"
@echo " html-all-subrepos-with-api"
Expand All @@ -20,8 +21,12 @@ help:
@echo " multiversion-with-errors"
@echo " linkcheck-all-subrepos-with-api"

html-with-errors: Makefile
@echo Single version without API, no checkout of sub_repos
$(SPHINXBUILD) $(SPHINXOPTS) -W --keep-going $(SOURCEDIR) $(BUILDDIR)/html

html-with-api: Makefile
@echo Single html file with API
@echo Single version with API
@echo Step 1: Creating html files
$(SPHINXBUILD) $(SPHINXOPTS) $(SOURCEDIR) $(BUILDDIR)/html
@echo Step 2: Building API
Expand Down Expand Up @@ -102,7 +107,7 @@ multiversion-with-api: Makefile
@echo Step 5: Create correct index
@echo "<html><head><meta http-equiv=\"refresh\" content=\"0; url=master/index.html\" /></head></html>" > "$(BUILDDIR)"/html/index.html

.PHONY: help Makefile html-with-api multiversion multiversion-with-api multiversion-with-errors html-all-subrepos html-all-subrepos-with-api html-all-subrepos-with-errors linkcheck-all-subrepos-with-api
.PHONY: help Makefile html-with-errors html-with-api multiversion multiversion-with-api multiversion-with-errors html-all-subrepos html-all-subrepos-with-api html-all-subrepos-with-errors linkcheck-all-subrepos-with-api

# TODO(denis): Enable this!
# # # # Generate the doxygen xml (for Sphinx) and copy the doxygen html to the
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Status

[![Build & Deploy Page](https://github.com/ros-controls/control.ros.org/actions/workflows/sphinx-make-page.yml/badge.svg)](https://github.com/ros-controls/control.ros.org/actions/workflows/sphinx-make-page.yml)[![Sphinx Warnings](https://github.com/ros-controls/control.ros.org/actions/workflows/sphinx-check-warnings.yml/badge.svg?branch=iron)](https://github.com/ros-controls/control.ros.org/actions/workflows/sphinx-check-warnings.yml)[![Broken Links](https://github.com/ros-controls/control.ros.org/actions/workflows/sphinx-check-links.yml/badge.svg?branch=iron)](https://github.com/ros-controls/control.ros.org/actions/workflows/sphinx-check-links.yml)

[![Build & Deploy Page](https://github.com/ros-controls/control.ros.org/actions/workflows/sphinx-make-page.yml/badge.svg)](https://github.com/ros-controls/control.ros.org/actions/workflows/sphinx-make-page.yml)
[![Broken Links](https://github.com/ros-controls/control.ros.org/actions/workflows/sphinx-check-links.yml/badge.svg?branch=master)](https://github.com/ros-controls/control.ros.org/actions/workflows/sphinx-check-links.yml)
[![Sphinx Warnings](https://github.com/ros-controls/control.ros.org/actions/workflows/sphinx-check-warnings.yml/badge.svg?branch=master)](https://github.com/ros-controls/control.ros.org/actions/workflows/sphinx-check-warnings.yml)

# control.ros.org
https://control.ros.org/
Expand Down