Skip to content

Commit cd964be

Browse files
author
Minggang Wang
committed
Upgrade to Ubuntu 18.04
We disabled the syntax check for cppcheck, as the macro doesn't get expended which caused syntax error. Fix #397
1 parent 8793d02 commit cd964be

File tree

2 files changed

+26
-36
lines changed

2 files changed

+26
-36
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ branches:
1010
- actionlib
1111

1212
before_install:
13-
- sudo docker pull ubuntu:xenial
13+
- sudo docker pull ubuntu:bionic
1414
- sudo docker build -t rcldocker .
1515

1616
script:
17-
- sudo docker run -v $(pwd):/root/rclnodejs --rm rcldocker bash -i -c 'cd /root/rclnodejs && cppcheck --enable=all src/*.cpp src/*.hpp && ./scripts/build.sh && npm test'
17+
- sudo docker run -v $(pwd):/root/rclnodejs --rm rcldocker bash -i -c 'cd /root/rclnodejs && cppcheck --suppress=syntaxError --enable=all src/*.cpp src/*.hpp && ./scripts/build.sh && npm test'

Dockerfile

Lines changed: 24 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,31 @@
1-
FROM ubuntu:xenial
1+
FROM ubuntu:bionic
22

33
ENV GIT_USER_NAME mrbuild
44
ENV GIT_USER_EMAIL [email protected]
5-
ENV LANG en_US.UTF-8
65

7-
RUN apt-get update && apt-get install -y git wget locales python
6+
RUN apt update && apt install -y git locales python curl wget
87
RUN locale-gen en_US en_US.UTF-8 && update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
8+
ENV LANG en_US.UTF-8
99

10-
RUN /bin/bash -c 'echo "deb http://packages.ros.org/ros/ubuntu xenial main" > /etc/apt/sources.list.d/ros-latest.list' \
11-
&& apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 421C365BD9FF1F717815A3895523BAEEB01FA116
10+
RUN apt install -y gnupg2 lsb-release
11+
RUN curl http://repo.ros2.org/repos.key | apt-key add -
12+
RUN sh -c 'echo "deb [arch=amd64,arm64] http://packages.ros.org/ros2/ubuntu `lsb_release -cs` main" > /etc/apt/sources.list.d/ros2-latest.list'
1213

1314
# Install prerequisites
14-
RUN apt update && apt install -y \
15-
libopencv-dev \
16-
libasio-dev \
17-
libeigen3-dev \
18-
libtinyxml2.6.2v5 \
19-
libtinyxml2-dev \
20-
libfreetype6 \
21-
libgles2-mesa-dev \
22-
libglu1-mesa-dev \
23-
libqt5core5a \
24-
libqt5gui5 \
25-
libqt5opengl5 \
26-
libqt5widgets5 \
27-
libx11-dev \
28-
libxaw7 \
29-
libcurl4-openssl-dev \
30-
python3-argcomplete \
31-
python3-catkin-pkg-modules \
32-
python3-empy \
33-
python3-pip \
34-
python3-pyparsing \
35-
python3-setuptools \
36-
python3-yaml \
37-
python3-colcon-common-extensions \
38-
cmake \
39-
cppcheck
40-
41-
RUN pip3 install -U setuptools
15+
RUN export DEBIAN_FRONTEND=noninteractive && apt update && apt install -y \
16+
build-essential \
17+
cmake \
18+
python3-colcon-common-extensions \
19+
python3-pip \
20+
python-rosdep \
21+
python3-vcstool \
22+
libpython3-dev \
23+
libtinyxml2.6.2v5 \
24+
libtinyxml2-dev \
25+
cppcheck
26+
27+
RUN rosdep init
28+
RUN rosdep update
4229

4330
# Configure git
4431
RUN git config --global user.name $GIT_USER_NAME \
@@ -48,9 +35,12 @@ RUN git config --global user.name $GIT_USER_NAME \
4835
ENV ROS2_WS=/root
4936
WORKDIR $ROS2_WS
5037

51-
RUN wget https://ci.ros2.org/view/packaging/job/packaging_xenial_linux/lastSuccessfulBuild/artifact/ws/ros2-package-linux-x86_64.tar.bz2 \
38+
RUN wget https://ci.ros2.org/view/packaging/job/packaging_linux/lastSuccessfulBuild/artifact/ws/ros2-package-linux-x86_64.tar.bz2 \
5239
&& tar xf ros2-package-linux-x86_64.tar.bz2
5340

41+
# [Ubuntu 18.04]
42+
RUN export CHOOSE_ROS_DISTRO=crystal && rosdep install --default-yes --from-paths $ROS2_WS/ros2-linux/share --ignore-src --rosdistro $CHOOSE_ROS_DISTRO --skip-keys "console_bridge fastcdr fastrtps libopensplice67 libopensplice69 osrf_testing_tools_cpp poco_vendor rmw_connext_cpp rosidl_typesupport_connext_c rosidl_typesupport_connext_cpp rti-connext-dds-5.3.1 tinyxml_vendor tinyxml2_vendor urdfdom urdfdom_headers"
43+
5444
RUN echo "source $ROS2_WS/ros2-linux/local_setup.bash" >> $HOME/.bashrc
5545

5646
# Install nvm, Node.js and node-gyp

0 commit comments

Comments
 (0)