From 0a141a2c20ac3c9f09c1ae0e4169adb55bb2328f Mon Sep 17 00:00:00 2001 From: Louise Poubel Date: Tue, 9 Mar 2021 10:14:56 -0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=A9=E2=80=8D=F0=9F=8C=BE=20Backport=20?= =?UTF-8?q?action-ignition-ci=20(#452)=20(#501)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Louise Poubel Co-authored-by: Steve Peters --- .github/ci/after_make_test.sh | 18 ++++++ .github/ci/between_cmake_make.sh | 5 ++ .github/workflows/ci.yml | 26 +++++++++ .github/workflows/linux-ubuntu-bionic.yml | 69 ----------------------- 4 files changed, 49 insertions(+), 69 deletions(-) create mode 100644 .github/ci/after_make_test.sh create mode 100644 .github/ci/between_cmake_make.sh create mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/linux-ubuntu-bionic.yml diff --git a/.github/ci/after_make_test.sh b/.github/ci/after_make_test.sh new file mode 100644 index 000000000..0aca36841 --- /dev/null +++ b/.github/ci/after_make_test.sh @@ -0,0 +1,18 @@ +#!/bin/sh -l + +set -x + +BUILD_DIR=`pwd` + +# Install +make install + +# Compile examples +cd ../examples +mkdir build; +cd build; +cmake ..; +make; +./simple ../simple.sdf; + +cd $BUILD_DIR diff --git a/.github/ci/between_cmake_make.sh b/.github/ci/between_cmake_make.sh new file mode 100644 index 000000000..f52a3c693 --- /dev/null +++ b/.github/ci/between_cmake_make.sh @@ -0,0 +1,5 @@ +#!/bin/sh -l + +set -x + +make sdf_descriptions diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..0a4c280d8 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,26 @@ +name: Ubuntu + +on: [push, pull_request] + +jobs: + bionic-ci: + runs-on: ubuntu-latest + name: Ubuntu Bionic CI + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Compile and test + id: ci + uses: ignition-tooling/action-ignition-ci@bionic + with: + codecov-token: ${{ secrets.CODECOV_TOKEN }} + focal-ci: + runs-on: ubuntu-latest + name: Ubuntu Focal CI + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Compile and test + id: ci + uses: ignition-tooling/action-ignition-ci@focal + diff --git a/.github/workflows/linux-ubuntu-bionic.yml b/.github/workflows/linux-ubuntu-bionic.yml deleted file mode 100644 index de34e7ad5..000000000 --- a/.github/workflows/linux-ubuntu-bionic.yml +++ /dev/null @@ -1,69 +0,0 @@ -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 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 \ - $(sort -u $(find .github -iname 'packages-'`lsb_release -cs`'.apt' -o -iname 'packages.apt') | tr '\n' ' ') - - 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;