Open source #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: C++ CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
container: | |
image: ros:melodic-ros-base | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Environment | |
run: | | |
apt-get update | |
apt-get install -y cmake g++ ninja-build libgtest-dev | |
cd /usr/src/gtest | |
cmake CMakeLists.txt | |
make | |
cp *.a /usr/lib | |
cd $GITHUB_WORKSPACE | |
- name: Configure and Build | |
run: | | |
mkdir build | |
cd build | |
cmake -DBUILD_TESTS=ON -DCATKIN_BUILD_BINARY_PACKAGE=OFF .. | |
cmake --build . -j8 | |
- name: Run tests | |
run: | | |
cd build | |
ctest |