Skip to content

Adds CI.

Adds CI. #20

Workflow file for this run

name: Map Generation CI
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
# Cancel previously running PR jobs
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true
jobs:
Map:
name: Verify Map Generation
runs-on: ubuntu-latest
container:
image: ubuntu:20.04
steps:
- name: Install prereqs
run: |
apt-get update
apt-get install -y git python3-pip python3-empy
- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch
- name: Clone repo and checkout branch
run: |
git clone -b ${{ steps.extract_branch.outputs.branch }} https://github.com/maliput/maliput_xodr.git .
- name: Git setup
run: |
git config --global --add safe.directory .
- name: Install requirements
run: |
pip3 install -r requirements.txt
- name: Generate maps
run: |
bash tools/update_resources.sh
- name: Output git status
run: |
git status
- name: Verify there is no changes
run: |
ret=git status --porcelain | wc -l
if [ $ret -ne 0 ]; then
echo "There are changes in the generated files. Please run tools/update_resources.sh and commit the changes."
exit 1
fi