diff --git a/.github/workflows/linux-ubuntu-bionic.yml b/.github/workflows/linux-ubuntu-bionic.yml new file mode 100644 index 000000000..236f50289 --- /dev/null +++ b/.github/workflows/linux-ubuntu-bionic.yml @@ -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; diff --git a/README.md b/README.md index 1dd553aaf..245665150 100644 --- a/README.md +++ b/README.md @@ -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 ## diff --git a/codecov.yml b/codecov.yml deleted file mode 100644 index 6f25123af..000000000 --- a/codecov.yml +++ /dev/null @@ -1,2 +0,0 @@ -codecov: - branch: default