Skip to content

Update generate_recipes.yml #26

Update generate_recipes.yml

Update generate_recipes.yml #26

name: Generate Bitbake Recipes
on:
push:
branches: ['devel']
# Allow for manually running
workflow_dispatch:
jobs:
generate-recipes:
runs-on: ubuntu-latest
env:
ROS_HOME: "$GITHUB_WORKSPACE/roshome"
ROSDEP_SOURCE_PATH: "$GITHUB_WORKSPACE/rosdep"
ROS_DISTRO: "humble"
ROSDISTRO_URL: "https://raw.githubusercontent.com/ros/rosdistro/master/rosdep"
GIT_FULLNAME: "Rob Woolley"
GIT_EMAIL: "[email protected]"
steps:
- run: pwd
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
- name: Check out repository code
uses: actions/checkout@v4
with:
path: meta-ros
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install superflore and rosdep
run: pip install superflore
- run: mkdir -p ${ROS_HOME}
- run: mkdir -p ${ROSDEP_SOURCE_PATH}
- name: Initialize rosdep cache
run: rosdep init
- name: Update rosdep cache
run: rosdep update
- name: Set local rosdep
run: sed -i -e "s|${ROSDISTRO_URL}|file://${GITHUB_WORKSPACE}/rosdistro/rosdep|" ${ROSDEP_SOURCE_PATH}/20-default.list
- name: Check 20-default.list
run: cat ${ROSDEP_SOURCE_PATH}/20-default.list
- name: Check out rosdistro
uses: actions/checkout@v4
with:
repository: ros/rosdistro
path: rosdistro
fetch-tags: true
fetch-depth: 0
- name: Gather ros distro parameters
run: |
cd ${GITHUB_WORKSPACE}/rosdistro
ROS_DISTRO_RELEASE_DATE=$(git tag --list "${ROS_DISTRO}/*" | sort | tail -n1)
echo "ROS_DISTRO_RELEASE_DATE=${ROS_DISTRO_RELEASE_DATE}" >> "${GITHUB_WORKSPACE}/rosdistro_commit.env"
ROSDISTRO_COMMIT=$(git rev-parse ${ROS_DISTRO_RELEASE_DATE})
echo "ROSDISTRO_COMMIT=${ROSDISTRO_COMMIT}" >> "${GITHUB_WORKSPACE}/rosdistro_commit.env"
ROS_DISTRO_RELEASE_DATE_ONLY=$(echo ${ROS_DISTRO_RELEASE_DATE} | cut -d/ -f2)
echo "ROS_DISTRO_RELEASE_DATE_ONLY=${ROS_DISTRO_RELEASE_DATE_ONLY}" >> "${GITHUB_WORKSPACE}/rosdistro_commit.env"
shell: bash
- name: Output the meta-ros parameters to use
run: cat ${GITHUB_WORKSPACE}/rosdistro_commit.env
- name: Set git config
run: |
git config --global user.name "${GIT_FULLNAME}"
git config --global user.email "${GIT_EMAIL}"
- name: Run ros-generate-cache.sh
run: |
cd ${GITHUB_WORKSPACE}/meta-ros
source "${GITHUB_WORKSPACE}/rosdistro_commit.env"
sh scripts/ros-generate-cache.sh ${ROS_DISTRO} ${ROS_DISTRO_RELEASE_DATE_ONLY} ${GITHUB_WORKSPACE}/rosdistro/ ${ROSDISTRO_COMMIT}
- name: Run ros-generate-recipes.sh
run: |
cd ${GITHUB_WORKSPACE}/meta-ros
sh scripts/ros-generate-recipes.sh ${ROS_DISTRO}
- run: echo "🍏 This job's status is ${{ job.status }}."