Skip to content

Commit

Permalink
4 ➡️ 5 (#97)
Browse files Browse the repository at this point in the history
Signed-off-by: Louise Poubel <[email protected]>
  • Loading branch information
chapulina authored Aug 7, 2020
2 parents 6a9ea3a + 84417d8 commit 9d2e18a
Show file tree
Hide file tree
Showing 10 changed files with 165 additions and 113 deletions.
13 changes: 0 additions & 13 deletions .github/ci-bionic/after_make.sh

This file was deleted.

5 changes: 0 additions & 5 deletions .github/ci-bionic/dependencies.yaml

This file was deleted.

18 changes: 18 additions & 0 deletions .github/ci/after_make.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/sh -l

set -x

# Install
make install

# So ign-tools finds fuel-tools
export IGN_CONFIG_PATH=/usr/local/share/ignition
export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH

# Compile example
cd ../example
mkdir build
cd build
cmake ..
make
cd ../../build
12 changes: 12 additions & 0 deletions .github/ci/packages.apt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
curl
libcurl4-openssl-dev
libgflags-dev
libignition-cmake2-dev
libignition-common3-dev
libignition-math6-dev
libignition-msgs6-dev
libignition-tools-dev
libjsoncpp-dev
libtinyxml2-dev
libyaml-dev
libzip-dev
36 changes: 0 additions & 36 deletions .github/workflows/ci-bionic.yml

This file was deleted.

27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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 }}
17 changes: 17 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,23 @@

### Ignition Fuel Tools 3.x.x (20xx-xx-xx)

### Ignition Fuel Tools 3.3.0 (2020-07-29)

1. openrobotics to OpenRobotics
* [Pull request 75](https://github.com/ignitionrobotics/ign-fuel-tools/pull/75)

1. Fix world tests
* [Pull request 76](https://github.com/ignitionrobotics/ign-fuel-tools/pull/76)

1. Add missing dependency in Actions CI
* [Pull request 86](https://github.com/ignitionrobotics/ign-fuel-tools/pull/86)

1. Backport file fetching
* [Pull request 84](https://github.com/ignitionrobotics/ign-fuel-tools/pull/84)

1. Convert model:// to Fuel URLs instead of absolute paths
* [Pull request 85](https://github.com/ignitionrobotics/ign-fuel-tools/pull/85)

### Ignition Fuel Tools 3.2.2 (2020-05-18)

1. Fix URL encodings in RestClient.
Expand Down
25 changes: 16 additions & 9 deletions src/FuelClient_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -473,10 +473,10 @@ TEST_F(FuelClientTest, DownloadModel)
"/test_cache/fuel.ignitionrobotics.org/iche033/models/Rescue Randy/2");
EXPECT_TRUE(common::exists(
"test_cache/fuel.ignitionrobotics.org/iche033/models/Rescue Randy/2"));
const std::string model_sdf_path =
const std::string modelSdfPath =
"test_cache/fuel.ignitionrobotics.org/iche033/models/Rescue Randy/2/"
"model.sdf";
EXPECT_TRUE(common::exists(model_sdf_path));
EXPECT_TRUE(common::exists(modelSdfPath));
EXPECT_TRUE(common::exists(
"test_cache/fuel.ignitionrobotics.org/iche033/models/Rescue Randy/2/"
"model.config"));
Expand All @@ -494,14 +494,21 @@ TEST_F(FuelClientTest, DownloadModel)
"/test_cache/fuel.ignitionrobotics.org/iche033/models/Rescue Randy/2",
cachedPath);

// Check that pbr paths have been updated.
std::ifstream ifs(model_sdf_path);
std::string model_sdf((std::istreambuf_iterator<char>(ifs)),
// Check that URIs have been updated.
std::ifstream ifs(modelSdfPath);
std::string modelSdf((std::istreambuf_iterator<char>(ifs)),
std::istreambuf_iterator<char>());
EXPECT_EQ(std::string::npos, model_sdf.find("<albedo_map>model://"));
EXPECT_EQ(std::string::npos, model_sdf.find("<normal_map>model://"));
EXPECT_EQ(std::string::npos, model_sdf.find("<metalness_map>model://"));
EXPECT_EQ(std::string::npos, model_sdf.find("<roughness_map>model://"));
EXPECT_EQ(std::string::npos, modelSdf.find("<uri>model://"));
EXPECT_EQ(std::string::npos, modelSdf.find("<albedo_map>model://"));
EXPECT_EQ(std::string::npos, modelSdf.find("<normal_map>model://"));
EXPECT_EQ(std::string::npos, modelSdf.find("<metalness_map>model://"));
EXPECT_EQ(std::string::npos, modelSdf.find("<roughness_map>model://"));

EXPECT_NE(std::string::npos, modelSdf.find("<uri>https://"));
EXPECT_NE(std::string::npos, modelSdf.find("<albedo_map>https://"));
EXPECT_NE(std::string::npos, modelSdf.find("<normal_map>https://"));
EXPECT_NE(std::string::npos, modelSdf.find("<metalness_map>https://"));
EXPECT_NE(std::string::npos, modelSdf.find("<roughness_map>https://"));
}

// Try using nonexistent URL
Expand Down
19 changes: 9 additions & 10 deletions src/Interface_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ TEST(Interface, FetchResources)
{
// Check it's not cached
common::URI worldUrl{
"https://fuel.ignitionrobotics.org/1.0/nate/worlds/Empty"};
"https://fuel.ignitionrobotics.org/1.0/openrobotics/worlds/Test world"};
{
Result res = client.CachedWorld(worldUrl, cachedPath);
EXPECT_FALSE(res) << "Cached Path: " << cachedPath;
Expand All @@ -177,22 +177,21 @@ TEST(Interface, FetchResources)
std::string path = fetchResourceWithClient(worldUrl.Str(), client);

// Check it was downloaded to `1`
EXPECT_EQ(path, common::cwd() +
"/test_cache/fuel.ignitionrobotics.org/nate/worlds/Empty/1");
EXPECT_TRUE(common::exists(
"test_cache/fuel.ignitionrobotics.org/nate/worlds/Empty/1"));
EXPECT_TRUE(common::exists(
"test_cache/fuel.ignitionrobotics.org/nate/worlds/Empty/1/"
"empty.world"));
EXPECT_EQ(path, common::cwd() + "/test_cache/fuel.ignitionrobotics.org/"
"openrobotics/worlds/Test world/1");
EXPECT_TRUE(common::exists("test_cache/fuel.ignitionrobotics.org/"
"openrobotics/worlds/Test world/1"));
EXPECT_TRUE(common::exists("test_cache/fuel.ignitionrobotics.org/"
"openrobotics/worlds/Test world/1/test.world"));

// Check it is cached
{
Result res = client.CachedWorld(worldUrl, cachedPath);
EXPECT_TRUE(res);
EXPECT_EQ(Result(ResultType::FETCH_ALREADY_EXISTS), res);
EXPECT_EQ(common::cwd() +
"/test_cache/fuel.ignitionrobotics.org/nate/worlds/Empty/1",
cachedPath);
"/test_cache/fuel.ignitionrobotics.org/openrobotics/worlds/"
"Test world/1", cachedPath);
}
}

Expand Down
Loading

0 comments on commit 9d2e18a

Please sign in to comment.