-
Notifications
You must be signed in to change notification settings - Fork 728
70 lines (68 loc) · 2.34 KB
/
basic-build-ci.yaml
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
name: Basic Build Workflow
on:
push:
branches: [rolling]
pull_request:
types: [opened, reopened, synchronize]
jobs:
build-rolling:
runs-on: ubuntu-latest
strategy:
fail-fast: false
container:
image: osrf/ros2:devel
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Create Workspace
run: |
mkdir src_tmp
mv `find -maxdepth 1 -not -name . -not -name src_tmp` src_tmp/
mv src_tmp/ src/
- name: Install Prerequisites
run: |
bash -c 'source /opt/ros/rolling/setup.bash; \
apt-get update && apt-get upgrade -y && rosdep update; \
rosdep install --from-paths src --ignore-src --rosdistro=rolling -y'
- name: Build Workspace
run: |
bash -c 'source /opt/ros/rolling/setup.bash; \
colcon build'
- name: Run Tests
run: |
bash -c 'source /opt/ros/rolling/setup.bash; \
colcon test; \
colcon test-result --verbose'
build-rolling-testing:
runs-on: ubuntu-latest
strategy:
fail-fast: false
container:
image: osrf/ros2:testing
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Create Workspace
run: |
mkdir src_tmp
mv `find -maxdepth 1 -not -name . -not -name src_tmp` src_tmp/
mv src_tmp/ src/
- name: Install Prerequisites
run: |
apt update -qq
apt install -qq -y lsb-release wget curl gnupg2 git
curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros2-testing-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros2-testing-archive-keyring.gpg] http://packages.ros.org/ros2-testing/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | tee /etc/apt/sources.list.d/ros2.list > /dev/null
apt-get update && apt-get upgrade -q -y
bash -c 'source /opt/ros/$ROS_DISTRO/setup.bash; \
apt-get update && apt-get upgrade -y && rosdep update; \
rosdep install --from-paths src --ignore-src -y'
- name: Build Workspace
run: |
bash -c 'source /opt/ros/$ROS_DISTRO/setup.bash; \
colcon build'
- name: Run Tests
run: |
bash -c 'source /opt/ros/$ROS_DISTRO/setup.bash; \
colcon test; \
colcon test-result --verbose'