-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (82 loc) · 3.14 KB
/
ci-action.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: Ouroboros CI
run-name: Ouroboros CI
on:
push:
branches: main
pull_request:
branches:
- main
- develop
jobs:
Ouroboros-CI:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.13"]
steps:
- name: Check out repository code
uses: actions/checkout@v4
with:
path: ouroboros_repo
submodules: recursive
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Pre-commit
run: pip install pre-commit && cd ${{ github.workspace }}/ouroboros_repo && pre-commit run --all-files
- name: Dependencies
run: sudo apt install libeigen3-dev pkg-config
- name: Install Ouroboros
run: cd ${{ github.workspace }}/ouroboros_repo && pwd && pip install .
- name: Run test script
run: cd ${{ github.workspace }}/ouroboros_repo && pytest --ignore=third_party --ignore=extra/ouroboros_ros
- run: echo "🍏 This job's status is ${{ job.status }}."
Ouroboros-ROS-CI:
runs-on: ubuntu-20.04
steps:
- name: Check out repository code
uses: actions/checkout@v4
with:
path: ouroboros_repo
submodules: recursive
- name: Install ROS
run: |
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt install curl -y
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
sudo apt-get update -qq
sudo apt-get install -y ros-noetic-desktop-full
sudo apt-get install dpkg
sudo apt-get install -y python3-rosinstall python3-rosinstall-generator build-essential
sudo apt-get install -y python3-catkin-tools
sudo apt-get install -y python3-rosdep
sudo apt-get install -y python3-wstool
- name: Check if ROS installed
run: |
if [ -d "/opt/ros/noetic" ]; then
echo "ROS Noetic is installed!"
else
echo "ROS Noetic is NOT installed!"
fi
- name: Install ROS packages with rosdep
run: |
source /opt/ros/noetic/setup.bash
sudo rosdep init
rosdep update
mkdir -p ~/catkin_ws/src
mv ${{ github.workspace }}/ouroboros_repo ~/catkin_ws/src/
cd ~/catkin_ws
rosdep install --from-paths src --ignore-src -r -s # do a dry-run first
rosdep install --from-paths src --ignore-src -r -y
- name: catkin build
run: |
source /opt/ros/noetic/setup.bash
cd ~/catkin_ws
catkin build -s
source devel/setup.bash
- name: Install Ouroboros
run: cd ~/catkin_ws/src/ouroboros_repo && python -m pip install --upgrade pip && pip install .
- name: Run test script
run: cd ~/catkin_ws/src/ouroboros_repo && source ~/catkin_ws/devel/setup.bash && pytest --ignore=third_party
- run: echo "🍏 This job's status is ${{ job.status }}."