forked from gazebosim/sdformat
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Backport bionic actions CI to sdf9 (gazebosim#311)
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
- Loading branch information
1 parent
b143480
commit c6ebc19
Showing
1 changed file
with
72 additions
and
0 deletions.
There are no files selected for viewing
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
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; |