mirror of
https://github.com/westonrobot/ugv_sdk
synced 2023-04-08 06:32:14 +08:00
52 lines
1.7 KiB
YAML
52 lines
1.7 KiB
YAML
## Build and test as standard C++ package
|
|
cpp-build:
|
|
stage: build
|
|
image: rduweston/ubuntu-ci:18.04
|
|
before_script:
|
|
- apt update && apt -y install libasio-dev
|
|
script:
|
|
- mkdir build && cd build
|
|
- cmake ..
|
|
- cmake --build . && cpack
|
|
# artifacts:
|
|
# paths:
|
|
# - build/bin
|
|
# depending on your build setup it's most likely a good idea to cache outputs to reduce the build time
|
|
# cache:
|
|
# paths:
|
|
# - "*.o"
|
|
|
|
cpp-test:
|
|
stage: test
|
|
image: rduweston/ubuntu-ci:18.04
|
|
before_script:
|
|
- apt update && apt -y install libasio-dev
|
|
script:
|
|
- mkdir build && cd build
|
|
- cmake -DBUILD_TESTS=ON ..
|
|
- cmake --build .
|
|
- ./bin/gtest_all
|
|
# dependencies:
|
|
# - cpp-build
|
|
|
|
## Build and test as catkin package
|
|
melodic-catkin-build:
|
|
stage: build
|
|
image: rduweston/ubuntu-ci:melodic-bionic
|
|
before_script:
|
|
- apt update && apt -y install libasio-dev
|
|
script:
|
|
- mkdir -p /catkin_ws/src && cd /catkin_ws/src && /bin/bash -c "source /opt/ros/${ROS_DISTRO}/setup.bash; catkin_init_workspace"
|
|
- cp -r /builds/$CI_PROJECT_PATH /catkin_ws/src/wrp_sdk
|
|
- cd /catkin_ws && /bin/bash -c "source /opt/ros/${ROS_DISTRO}/setup.bash; catkin_make"
|
|
|
|
## Build and test as catkin package
|
|
melodic-catkin-isolated-build:
|
|
stage: build
|
|
image: rduweston/ubuntu-ci:melodic-bionic
|
|
before_script:
|
|
- apt update && apt -y install libasio-dev
|
|
script:
|
|
- mkdir -p /catkin_ws/src && cd /catkin_ws/src && /bin/bash -c "source /opt/ros/${ROS_DISTRO}/setup.bash; catkin_init_workspace"
|
|
- cp -r /builds/$CI_PROJECT_PATH /catkin_ws/src/wrp_sdk
|
|
- cd /catkin_ws && /bin/bash -c "source /opt/ros/${ROS_DISTRO}/setup.bash; catkin_make_isolated --install" |