From dfeee387bd041e83087dbc596db7db909e197d3b Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Fri, 1 Jan 2021 15:24:59 -0800 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=91=A9=E2=80=8D=F0=9F=8C=BE=20Backpor?= =?UTF-8?q?t=20action-ignition-ci=20(#452)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Louise Poubel --- .github/ci/after_make_test.sh | 14 +++++ .github/ci/between_cmake_make.sh | 5 ++ .github/workflows/ci.yml | 26 +++++++++ .github/workflows/linux-ubuntu-bionic.yml | 69 ----------------------- 4 files changed, 45 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..fd884385c --- /dev/null +++ b/.github/ci/after_make_test.sh @@ -0,0 +1,14 @@ +#!/bin/sh -l + +set -x + +# Install +make install + +# Compile examples +cd ../examples +mkdir build; +cd build; +cmake ..; +make; +./simple ../simple.sdf; 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..2f752261f --- /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@master + 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; From f689ce8f51a1f4a3fb3d8f03fa89b19b9d547841 Mon Sep 17 00:00:00 2001 From: Louise Poubel Date: Wed, 24 Feb 2021 16:36:33 -0800 Subject: [PATCH 2/3] Go back to build dir Signed-off-by: Louise Poubel --- .github/ci/after_make_test.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/ci/after_make_test.sh b/.github/ci/after_make_test.sh index fd884385c..0aca36841 100644 --- a/.github/ci/after_make_test.sh +++ b/.github/ci/after_make_test.sh @@ -2,6 +2,8 @@ set -x +BUILD_DIR=`pwd` + # Install make install @@ -12,3 +14,5 @@ cd build; cmake ..; make; ./simple ../simple.sdf; + +cd $BUILD_DIR From 2b31a4f2dbd58463b65a88c655849e27f39e3d7f Mon Sep 17 00:00:00 2001 From: Louise Poubel Date: Mon, 8 Mar 2021 15:37:52 -0800 Subject: [PATCH 3/3] Use bionic Signed-off-by: Louise Poubel --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2f752261f..0a4c280d8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: uses: actions/checkout@v2 - name: Compile and test id: ci - uses: ignition-tooling/action-ignition-ci@master + uses: ignition-tooling/action-ignition-ci@bionic with: codecov-token: ${{ secrets.CODECOV_TOKEN }} focal-ci: