-
Notifications
You must be signed in to change notification settings - Fork 381
49 lines (46 loc) · 1.54 KB
/
main.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
name: CI
on: [push, pull_request]
defaults:
run:
shell: bash
jobs:
ci:
name: ${{ matrix.ros_distro }} (node ${{ matrix.node_version }})
if: ${{ github.actor != 'RWT-bot' }}
runs-on: ubuntu-latest
container:
image: ros:${{ matrix.ros_distro }}-ros-core
options: --cap-add=SYS_ADMIN
strategy:
fail-fast: false
matrix:
ros_distro: [noetic]
node_version: [18, 20]
env:
ROS_DISTRO: ${{ matrix.ros_distro }}
steps:
- name: Install git in container
run: |
apt-get update
apt-get install -q -y git
- name: Set git safe directory
run: |
git config --global safe.directory '*'
- uses: actions/checkout@v4
env:
TOKEN: "${{ github.event_name == 'push' && endsWith(github.ref, 'develop') && matrix.ros_distro == 'noetic' && secrets.RWT_BOT_PAT || github.token }}"
with:
token: ${{ env.TOKEN }}
- uses: actions/setup-node@v4
with:
cache: npm
node-version: ${{ matrix.node_version }}
- name: Own /github/home and PWD
run: |
chown -hR 1001:121 /github/home .
- name: Install apt dependencies
run: |
apt-get install -q -y libasound2 libnss3 ros-$ROS_DISTRO-rosbridge-server ros-$ROS_DISTRO-tf2-web-republisher ros-$ROS_DISTRO-common-tutorials ros-$ROS_DISTRO-rospy-tutorials ros-$ROS_DISTRO-actionlib-tutorials
- name: Tests
run: |
bash -c "source /opt/ros/$ROS_DISTRO/setup.bash && bash test/build.bash"