Skip to content

Compile

Compile #1851

Workflow file for this run

name: Compile
on:
push:
pull_request:
branches:
- main
workflow_dispatch:
schedule:
- cron: '0 9 * * *' # 9:00am UTC, 1:00am PST.
env:
PACKAGE_NAME: maliput_documentation
ROS_DISTRO: foxy
ROS_WS: maliput_ws
jobs:
compile:
name: Compile
runs-on: ubuntu-latest
container:
image: ubuntu:20.04
steps:
# setup-ros first since it installs git, which is needed to fetch all branches from actions/checkout
- uses: ros-tooling/[email protected]
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
- uses: actions/checkout@v4
with:
path: ${{ env.ROS_WS }}/src/${{ env.PACKAGE_NAME }}
# clone public dependencies
- name: vcs import
shell: bash
working-directory: ${{ env.ROS_WS }}
run: vcs import src < src/${PACKAGE_NAME}/.github/dependencies.repos
- name: check if dependencies have a matching branch
shell: bash
working-directory: ${{ env.ROS_WS }}/src
run: ./${PACKAGE_NAME}/.github/try_vcs_checkout ${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} .
- run: colcon graph
shell: bash
working-directory: ${{ env.ROS_WS }}
- name: rosdep install
shell: bash
working-directory: ${{ env.ROS_WS }}
run: |
rosdep update --include-eol-distros;
rosdep install -i -y --rosdistro ${ROS_DISTRO} --from-paths src
- name: install drake
shell: bash
working-directory: ${{ env.ROS_WS }}/src/drake_vendor
run: ./drake_installer
- name: colcon build ament_cmake_doxygen
shell: bash
working-directory: ${{ env.ROS_WS }}
run: |
. /opt/ros/${ROS_DISTRO}/setup.bash;
colcon build --packages-select ament_cmake_doxygen --event-handlers=console_direct+;
- name: colcon build
shell: bash
working-directory: ${{ env.ROS_WS }}
run: |
. /opt/ros/${ROS_DISTRO}/setup.bash;
. install/setup.bash;
colcon build --packages-up-to ${PACKAGE_NAME} --packages-skip ament_cmake_doxygen --cmake-args " -DBUILD_DOCS=On" --event-handlers=console_direct+;
# checkout to rtd branch
- uses: actions/checkout@v4
with:
path: ${{ env.ROS_WS }}/src/${{ env.PACKAGE_NAME }}
ref: rtd-pages
# dump the content into rtd-pages
- name: push to rtd-pages
if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
shell: bash
working-directory: ${{ env.ROS_WS }}
run: |
rm -rf src/${{ env.PACKAGE_NAME }}/*
cp -r install/maliput_documentation/share/docs/ src/${{ env.PACKAGE_NAME }}/
cp -r install/maliput_documentation/share/.readthedocs.yaml src/${{ env.PACKAGE_NAME }}/
echo $(date) > src/${{ env.PACKAGE_NAME }}/build_stamp
cd src/${{ env.PACKAGE_NAME }}
git config --local user.email 'github-actions[bot]@users.noreply.github.com'
git config --local user.name 'github-actions[bot]'
git add --all
git commit -m "Github actions build on: $(date)" -a
git push