Adds CI. #17
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: Map Generation CI | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
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: Clone repo this repo | |
run: | | |
git clone https://github.com/maliput/maliput_xodr.git | |
- name: Checkout branch | |
run: | | |
git fetch origin pull/${{ github.event.number }}/head:pr | |
git checkout pr | |
- 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 |