Update proto2ros
CMake macros documentation
#231
Workflow file for this run
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
name: ros_utilities CI | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
env: | |
# Use docker.io for Docker Hub if empty | |
REGISTRY: ghcr.io | |
# github.repository as <account>/<repo> | |
IMAGE_NAME: bdaiinstitute/ros_utilities_jammy_humble | |
defaults: | |
run: | |
shell: bash | |
concurrency: | |
group: ${{ github.repository }}-${{ github.workflow }}-${{ github.ref }}-${{ github.ref == 'refs/heads/main' && github.sha || ''}} | |
cancel-in-progress: true | |
jobs: | |
lint: | |
name: Lint ros_utilities packages | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- uses: actions/setup-python@v3 | |
- name: Lint sources | |
uses: pre-commit/action@v3.0.0 | |
prepare_container: | |
name: Prepare Humble container for tests | |
runs-on: ubuntu-latest | |
needs: lint | |
permissions: | |
contents: read | |
packages: write | |
# This is used to complete the identity challenge | |
# with sigstore/fulcio when running outside of PRs. | |
id-token: write | |
outputs: | |
image: ${{ fromJSON(steps.meta.outputs.json).tags[0] }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Docker buildx # to workaround: https://github.com/docker/build-push-action/issues/461 | |
uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf | |
- name: Log into registry ${{ env.REGISTRY }} | |
uses: docker/login-action@v3 # https://github.com/docker/login-action | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract metadata (tags, labels) for Docker | |
uses: docker/metadata-action@v5 # https://github.com/docker/metadata-action | |
with: | |
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
id: meta | |
- name: Build and push Docker image (may be cached) | |
uses: docker/build-push-action@v5 # https://github.com/docker/build-push-action | |
with: | |
context: . | |
file: .devcontainer/Dockerfile | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
build_and_test: | |
name: Build and test ros_utilities packages | |
runs-on: ubuntu-latest | |
needs: prepare_container | |
container: | |
image: ${{ needs.prepare_container.outputs.image }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Build and run tests | |
run: | | |
source /opt/ros/humble/setup.bash | |
colcon build --symlink-install | |
source install/setup.bash | |
colcon test --event-handlers console_direct+ | |
colcon test-result --all --verbose |