Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add github action CI for uploading to codecov #255

Merged
merged 5 commits into from
May 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.