-
-
Notifications
You must be signed in to change notification settings - Fork 17
41 lines (41 loc) · 1.89 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: CI
on:
pull_request:
branches:
- master
- integration
push:
branches:
- master
jobs:
ci:
name: CI
runs-on: ubuntu-latest
container:
image: umrover1/ros:latest
# GitHub is silly and requires us to be running as root for their checkout action
# Our docker container exports the user mrover, so we have to specific this explicitly
options: --user root
steps:
- uses: actions/checkout@v4
with:
lfs: "true"
# This makes sure that $GITHUB_WORKSPACE is the catkin workspace path
path: "src/mrover"
- name: Style Check
run: . /home/mrover/catkin_ws/src/mrover/venv/bin/activate && cd $GITHUB_WORKSPACE/src/mrover/ && ./style.sh
- name: Copy Catkin Profiles
if: github.event.pull_request.draft == false
run: rsync -r $GITHUB_WORKSPACE/src/mrover/ansible/roles/build/files/profiles $GITHUB_WORKSPACE/.catkin_tools
- name: Initialize
if: github.event.pull_request.draft == false
run: . /opt/ros/noetic/setup.sh && catkin init && catkin profile set ci
- name: Build Without Clang Tidy
if: github.event.pull_request.draft == false && github.event.pull_request.base.ref != 'refs/heads/master'
run: . /opt/ros/noetic/setup.sh && . /home/mrover/catkin_ws/src/mrover/venv/bin/activate && catkin build
- name: Build With Clang Tidy
if : github.event_name == 'push' && github.event.pull_request.base.ref == 'refs/heads/master'
run: . /opt/ros/noetic/setup.sh && . /home/mrover/catkin_ws/src/mrover/venv/bin/activate && catkin build -DCMAKE_CXX_CLANG_TIDY=clang-tidy-16
- name: Test
if: github.event.pull_request.draft == false
run: . /opt/ros/noetic/setup.sh && . /home/mrover/catkin_ws/src/mrover/venv/bin/activate && . $GITHUB_WORKSPACE/devel/setup.sh && catkin test && rostest mrover integration.test --text