-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Initial ros2 pipeline. * Don't run noetic CI on jazzy. * Updated documentation build. * Github only supports one pages deployment, so we only deploy on latest branch. * Updated documentation build. * Updated documentation setup step. * Added missing sudo. * Updated docs conf. * Add asan to CI tests to find memory issues. * Build hector_math_py before building documentation to enable automatic generation of graphics. * Disable asan new-delete-type-mismatch since rcutils triggers it. * $default-branch is only available in templates not in actual workflow instances. Only deploy if not a PR. * Changed upload pages artifact version to v3. * Update sourcing of built packages. * Make entire documentation deploy job conditional on "is not a pull request" not just the deploy step. * Fixed check for GITHUB_REF_NAME in docs build. * Install python3-git in docs workflow.
- Loading branch information
1 parent
81aff2f
commit df6009d
Showing
5 changed files
with
111 additions
and
269 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Build & Test | ||
on: | ||
push: | ||
branches: [ jazzy ] | ||
pull_request: | ||
branches: [ jazzy ] | ||
|
||
jobs: | ||
Linting: | ||
name: Lint Code Base | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup | ||
run: | | ||
sudo apt-get update && sudo apt-get install -y clang-format cppcheck libxml2-utils | ||
- name: Lint C++ | ||
run: | | ||
clang-format -Werror -n -style=file $(find . -name '*.cpp' -o -name '*.hpp' -o -name '*.h' -o -name '*.c' -o -name '*.cc') | ||
- name: Check C++ | ||
run: | | ||
cppcheck --force --quiet --error-exitcode=1 . | ||
- name: Lint package.xml | ||
run: | | ||
xmllint --noout --schema http://download.ros.org/schema/package_format3.xsd $(find . -name 'package.xml') | ||
build-and-test: | ||
needs: Linting | ||
runs-on: ubuntu-latest | ||
# Disable asan new-delete-type-mismatch to workaround rcutils issue | ||
# https://github.com/ros2/rclcpp/issues/2220 | ||
env: | ||
ASAN_OPTIONS: new_delete_type_mismatch=0 | ||
strategy: | ||
matrix: | ||
ros_distro: [humble, jazzy] | ||
container: | ||
image: ros:${{matrix.ros_distro}}-ros-base | ||
steps: | ||
- uses: ros-tooling/[email protected] | ||
with: | ||
required-ros-distributions: ${{ matrix.ros_distro }} | ||
- uses: ros-tooling/[email protected] | ||
with: | ||
target-ros2-distro: ${{ matrix.ros_distro }} | ||
colcon-defaults: | # Use asan to find memory issues | ||
{ | ||
"build": { | ||
"mixin": ["asan-gcc"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,50 @@ | ||
name: Documentation Build | ||
name: Documentation | ||
on: | ||
push: | ||
branches: [ master ] | ||
branches: [ jazzy ] | ||
pull_request: | ||
branches: [ jazzy ] | ||
|
||
jobs: | ||
documentation: | ||
build: | ||
runs-on: ubuntu-latest | ||
container: debian:buster-slim | ||
container: | ||
image: ros:jazzy-ros-base | ||
steps: | ||
- name: Prerequisites | ||
run: | | ||
apt-get update | ||
apt-get install -y git doxygen graphviz | ||
shell: bash | ||
|
||
- name: Checkout Code | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
# ref: master # make sure to use documentation script from master branch | ||
|
||
- name: Execute script to build our documentation and update pages | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Setup | ||
run: | | ||
cd .github | ||
./build_docs_on_github.sh | ||
shell: bash | ||
sudo apt-get update && sudo apt-get install -y git doxygen graphviz python3-sphinx python3-breathe python3-sphinx-rtd-theme python3-git | ||
- uses: ros-tooling/[email protected] | ||
with: | ||
required-ros-distributions: jazzy | ||
- uses: ros-tooling/[email protected] | ||
id: action_ros_ci_step | ||
with: | ||
package-name: hector_math hector_math_py | ||
target-ros2-distro: jazzy | ||
skip-tests: true | ||
- name: Build documentation | ||
run: | | ||
. ${{ steps.action_ros_ci_step.outputs.ros-workspace-directory-name }}/install/setup.sh && cd docs && make html | ||
- uses: actions/upload-pages-artifact@v3 | ||
with: | ||
name: github-pages | ||
path: docs/_build/html | ||
deploy: | ||
if: github.event_name != 'pull_request' | ||
needs: build | ||
permissions: | ||
pages: write | ||
id-token: write | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
Oops, something went wrong.