Skip to content

Commit

Permalink
Add github action CI for uploading to codecov (#255)
Browse files Browse the repository at this point in the history
* Add github action CI for uploading to codecov

Signed-off-by: Steven Peters <[email protected]>

* Update codecov badge

Signed-off-by: Steven Peters <[email protected]>
  • Loading branch information
scpeters authored May 1, 2020
1 parent c6dac91 commit 9eb6b99
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 3 deletions.
72 changes: 72 additions & 0 deletions .github/workflows/linux-ubuntu-bionic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Ubuntu Bionic / Linux

on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-18.04

steps:
- uses: actions/checkout@v2
- name: Install base dependencies
run: |
sudo apt update;
sudo apt -y install wget lsb-release gnupg;
sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -cs) main" > /etc/apt/sources.list.d/gazebo-stable.list';
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys D2486D2DD83DB69272AFE98867170598AF249743;
sudo apt-get update;
sudo apt -y install cmake build-essential curl g++-8 git mercurial libtinyxml-dev libxml2-utils ruby-dev python-psutil cppcheck;
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 800 --slave /usr/bin/g++ g++ /usr/bin/g++-8 --slave /usr/bin/gcov gcov /usr/bin/gcov-8;
# workaround for https://github.com/rubygems/rubygems/issues/3068
# suggested in https://github.com/rubygems/rubygems/issues/3068#issuecomment-574775885
sudo gem update --system 3.0.6;
- name: Install lcov
run: |
git clone https://github.com/linux-test-project/lcov.git -b v1.14;
cd lcov;
sudo make install;
cd ..;
- name: Static checking before building - fail fast
run: sh tools/code_check.sh
- name: Install ignition dependencies
run: |
sudo apt -y install \
libignition-cmake2-dev \
libignition-math6-dev \
libignition-tools-dev \
liburdfdom-dev;
- name: cmake
run: |
mkdir build;
cd build;
cmake .. -DCMAKE_BUILD_TYPE=coverage;
- name: make sdf_descriptions
working-directory: build
run: make sdf_descriptions
- name: make
working-directory: build
run: make
- name: make test
env:
CTEST_OUTPUT_ON_FAILURE: 1
working-directory: build
run: make test
- name: make coverage
working-directory: build
run: make coverage VERBOSE=1
- name: Upload to codecov
working-directory: build
# disable gcov output with `-X gcovout -X gcov`
run: bash <(curl -s https://codecov.io/bash) -X gcovout -X gcov
- name: make install
working-directory: build
run: sudo make install
- name: Compile example code
working-directory: examples
run: |
mkdir build;
cd build;
cmake ..;
make;
./simple ../simple.sdf;
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ allows conversion from previous versions.

Test coverage:

[![codecov](https://codecov.io/bb/osrf/sdformat/branch/default/graph/badge.svg)](https://codecov.io/bb/osrf/sdformat)
[![codecov](https://codecov.io/gh/osrf/sdformat/branch/master/graph/badge.svg)](https://codecov.io/gh/osrf/sdformat)


## Installation ##
Expand Down
2 changes: 0 additions & 2 deletions codecov.yml

This file was deleted.

0 comments on commit 9eb6b99

Please sign in to comment.