From 8005d5538196910be2138119adaaca5beb3e2714 Mon Sep 17 00:00:00 2001 From: Louise Poubel Date: Fri, 31 Jul 2020 15:48:53 -0700 Subject: [PATCH] Fix tests on actions (#115) Signed-off-by: Louise Poubel --- .github/ci/after_make.sh | 10 ++++++++++ .github/ci/packages.apt | 13 +++++++++++++ .github/workflows/ci-bionic.yml | 17 ----------------- .github/workflows/ci.yml | 27 +++++++++++++++++++++++++++ test/integration/depth_camera.cc | 2 +- 5 files changed, 51 insertions(+), 18 deletions(-) create mode 100644 .github/ci/after_make.sh create mode 100644 .github/ci/packages.apt delete mode 100644 .github/workflows/ci-bionic.yml create mode 100644 .github/workflows/ci.yml diff --git a/.github/ci/after_make.sh b/.github/ci/after_make.sh new file mode 100644 index 000000000..89971a370 --- /dev/null +++ b/.github/ci/after_make.sh @@ -0,0 +1,10 @@ +#!/bin/sh -l + +set -x + +make install + +Xvfb :1 -screen 0 1280x1024x24 & +export DISPLAY=:1.0 +export RENDER_ENGINE_VALUES=ogre2 +export MESA_GL_VERSION_OVERRIDE=3.3 diff --git a/.github/ci/packages.apt b/.github/ci/packages.apt new file mode 100644 index 000000000..8464ef631 --- /dev/null +++ b/.github/ci/packages.apt @@ -0,0 +1,13 @@ +freeglut3-dev +libfreeimage-dev +libglew-dev +libignition-cmake2-dev +libignition-common3-dev +libignition-math6-dev +libignition-plugin-dev +libogre-1.9-dev +libogre-2.1-dev +libxi-dev +libxmu-dev +uuid-dev +xvfb diff --git a/.github/workflows/ci-bionic.yml b/.github/workflows/ci-bionic.yml deleted file mode 100644 index a489246d6..000000000 --- a/.github/workflows/ci-bionic.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: Ubuntu Bionic CI - -on: [push, pull_request] - -jobs: - bionic-ci: - runs-on: ubuntu-latest - name: Ubuntu Bionic CI - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Bionic CI - id: ci - uses: ignition-tooling/ubuntu-bionic-ci-action@master - with: - apt-dependencies: 'libogre-1.9-dev libogre-2.1-dev libglew-dev libfreeimage-dev freeglut3-dev libxmu-dev libxi-dev uuid-dev xvfb libignition-cmake2-dev libignition-common3-dev libignition-math6-dev libignition-plugin-dev' - codecov-token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..5d9be4dd1 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,27 @@ +name: Ubuntu CI + +on: [push] + +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 + with: + codecov-token: ${{ secrets.CODECOV_TOKEN }} diff --git a/test/integration/depth_camera.cc b/test/integration/depth_camera.cc index 04fc0e082..851713a0e 100644 --- a/test/integration/depth_camera.cc +++ b/test/integration/depth_camera.cc @@ -398,7 +398,7 @@ void DepthCameraTest::DepthCameraBoxes( for (unsigned int j = 0; j < depthCamera->ImageWidth(); ++j) { float x = pointCloudData[step + j*pointCloudChannelCount]; - EXPECT_FLOAT_EQ(expectedRange, x); + EXPECT_NEAR(expectedRange, x, DOUBLE_TOL); } }