From d60b380ce3bdf8604000b234046967eb4149270a Mon Sep 17 00:00:00 2001 From: Louise Poubel Date: Mon, 27 Dec 2021 09:50:30 -0800 Subject: [PATCH 1/7] Bumps in garden : ci_matching_branch/bump_garden_sdformat13 Signed-off-by: Louise Poubel --- .github/ci/packages.apt | 2 +- bitbucket-pipelines.yml | 2 +- cmake/SearchForStuff.cmake | 10 +++++----- configure.bat | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/ci/packages.apt b/.github/ci/packages.apt index e7c92efa0..a8de89d3d 100644 --- a/.github/ci/packages.apt +++ b/.github/ci/packages.apt @@ -1,5 +1,5 @@ libignition-cmake2-dev -libignition-math6-dev +libignition-math7-dev libignition-tools-dev libignition-utils1-dev libtinyxml2-dev diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml index e1dad3b7d..3566b1596 100644 --- a/bitbucket-pipelines.yml +++ b/bitbucket-pipelines.yml @@ -23,7 +23,7 @@ pipelines: - sh tools/code_check.sh # Dependency: Ignition packages - apt-get -y install - libignition-cmake2-dev libignition-tools-dev libignition-math6-dev + libignition-cmake2-dev libignition-tools-dev libignition-math7-dev liburdfdom-dev # SDFormat - mkdir build diff --git a/cmake/SearchForStuff.cmake b/cmake/SearchForStuff.cmake index 54bcc61db..9f257decb 100644 --- a/cmake/SearchForStuff.cmake +++ b/cmake/SearchForStuff.cmake @@ -110,12 +110,12 @@ set(IGN_CMAKE_VER ${ignition-cmake2_VERSION_MAJOR}) ######################################## # Find ignition math # Set a variable for generating ProjectConfig.cmake -find_package(ignition-math6 6.8 QUIET) -if (NOT ignition-math6_FOUND) - message(STATUS "Looking for ignition-math6-config.cmake - not found") - BUILD_ERROR ("Missing: Ignition math (libignition-math6-dev)") +find_package(ignition-math7 QUIET) +if (NOT ignition-math7_FOUND) + message(STATUS "Looking for ignition-math7-config.cmake - not found") + BUILD_ERROR ("Missing: Ignition math (libignition-math7-dev)") else() - set(IGN_MATH_VER ${ignition-math6_VERSION_MAJOR}) + set(IGN_MATH_VER ${ignition-math7_VERSION_MAJOR}) message(STATUS "Looking for ignition-math${IGN_MATH_VER}-config.cmake - found") endif() diff --git a/configure.bat b/configure.bat index c009f39be..92b2bbad4 100644 --- a/configure.bat +++ b/configure.bat @@ -4,7 +4,7 @@ :: Install dependencies -call %win_lib% :install_ign_project ign-math ign-math6 +call %win_lib% :install_ign_project ign-math main :: Set configuration variables @set build_type=Release From 9c7a2b6dee7f078b684f3f14dead2e1159c3ff50 Mon Sep 17 00:00:00 2001 From: Louise Poubel Date: Mon, 27 Dec 2021 11:11:36 -0800 Subject: [PATCH 2/7] Address ign-math7 deprecations Signed-off-by: Louise Poubel --- src/Light.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Light.cc b/src/Light.cc index 692a925b9..f98332c3d 100644 --- a/src/Light.cc +++ b/src/Light.cc @@ -410,7 +410,7 @@ ignition::math::Angle Light::SpotInnerAngle() const ///////////////////////////////////////////////// void Light::SetSpotInnerAngle(const ignition::math::Angle &_angle) { - this->dataPtr->spotInnerAngle.Radian(std::max(0.0, _angle.Radian())); + this->dataPtr->spotInnerAngle.SetRadian(std::max(0.0, _angle.Radian())); } ///////////////////////////////////////////////// @@ -422,7 +422,7 @@ ignition::math::Angle Light::SpotOuterAngle() const ///////////////////////////////////////////////// void Light::SetSpotOuterAngle(const ignition::math::Angle &_angle) { - this->dataPtr->spotOuterAngle.Radian(std::max(0.0, _angle.Radian())); + this->dataPtr->spotOuterAngle.SetRadian(std::max(0.0, _angle.Radian())); } ///////////////////////////////////////////////// From 3ab919e8faca42de014da528d20d6b6c94fab9db Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Tue, 28 Dec 2021 19:21:36 -0800 Subject: [PATCH 3/7] Expext 0 instead of -0 in tests Caused by ignitionrobotics/ign-math#206 Signed-off-by: Steve Peters --- test/integration/nested_model_with_frames_expected.sdf | 2 +- test/integration/print_config.cc | 2 +- .../integration/two_level_nested_model_with_frames_expected.sdf | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/integration/nested_model_with_frames_expected.sdf b/test/integration/nested_model_with_frames_expected.sdf index f0ff5ec4d..04cf0cf89 100644 --- a/test/integration/nested_model_with_frames_expected.sdf +++ b/test/integration/nested_model_with_frames_expected.sdf @@ -67,7 +67,7 @@ 1 0 0 0 0 0 - 10 0 0 0 -0 1.5708 + 10 0 0 0 0 1.5708 diff --git a/test/integration/print_config.cc b/test/integration/print_config.cc index ded642ab2..511b6b69e 100644 --- a/test/integration/print_config.cc +++ b/test/integration/print_config.cc @@ -193,7 +193,7 @@ R"( const std::string expectedIncludeMerge = R"( - 0 0 0.5 0 -0 0 + 0 0 0.5 0 0 0 diff --git a/test/integration/two_level_nested_model_with_frames_expected.sdf b/test/integration/two_level_nested_model_with_frames_expected.sdf index 8f5e32e99..34bc32674 100644 --- a/test/integration/two_level_nested_model_with_frames_expected.sdf +++ b/test/integration/two_level_nested_model_with_frames_expected.sdf @@ -70,7 +70,7 @@ 0 10 0 1.570796326794895 0 0 - 10 0 0 0 -0 1.5708 + 10 0 0 0 0 1.5708 From bba6a7bbe5630134d469f19f0a32b9facd63ea5d Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Tue, 28 Dec 2021 19:48:37 -0800 Subject: [PATCH 4/7] macos workflow: try to checkout ci_matching_branch Signed-off-by: Steve Peters --- .github/workflows/macos.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index a48e42e96..3e7047e84 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -18,6 +18,18 @@ jobs: - name: Install base dependencies run: | brew tap osrf/simulation; + if [[ -n "${ghprbSourceBranch}" ]] && \ + brew install wget + wget https://github.com/ignition-tooling/release-tools/raw/master/jenkins-scripts/tools/detect_ci_matching_branch.py + python3 detect_ci_matching_branch.py "${ghprbSourceBranch}" + then + echo "# BEGIN SECTION: trying to checkout branch ${ghprbSourceBranch} from osrf/simulation" + pushd $(brew --repo osrf/simulation) + git fetch origin ${ghprbSourceBranch} || true + git checkout ${ghprbSourceBranch} || true + popd + echo '# END SECTION' + fi brew install --only-dependencies ${PACKAGE}; - run: mkdir build From cd570e52947e933fe6b9aada57b6ee0ab59e3803 Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Tue, 28 Dec 2021 19:57:32 -0800 Subject: [PATCH 5/7] fix TRY_BRANCH name Signed-off-by: Steve Peters --- .github/workflows/macos.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 3e7047e84..2ad65317f 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -18,15 +18,16 @@ jobs: - name: Install base dependencies run: | brew tap osrf/simulation; - if [[ -n "${ghprbSourceBranch}" ]] && \ - brew install wget - wget https://github.com/ignition-tooling/release-tools/raw/master/jenkins-scripts/tools/detect_ci_matching_branch.py - python3 detect_ci_matching_branch.py "${ghprbSourceBranch}" + # check for ci_matching_branch + brew install wget + wget https://github.com/ignition-tooling/release-tools/raw/master/jenkins-scripts/tools/detect_ci_matching_branch.py + TRY_BRANCH="${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" + if python3 detect_ci_matching_branch.py ${TRY_BRANCH} then - echo "# BEGIN SECTION: trying to checkout branch ${ghprbSourceBranch} from osrf/simulation" + echo "# BEGIN SECTION: trying to checkout branch ${TRY_BRANCH} from osrf/simulation" pushd $(brew --repo osrf/simulation) - git fetch origin ${ghprbSourceBranch} || true - git checkout ${ghprbSourceBranch} || true + git fetch origin ${TRY_BRANCH} || true + git checkout ${TRY_BRANCH} || true popd echo '# END SECTION' fi From 199b63215a46a6f13d80551a79b3e45101088b37 Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Tue, 28 Dec 2021 20:55:05 -0800 Subject: [PATCH 6/7] debug macos workflow Signed-off-by: Steve Peters --- .github/workflows/macos.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 2ad65317f..bfd024eb3 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -14,6 +14,7 @@ jobs: id: set-up-homebrew uses: Homebrew/actions/setup-homebrew@master - run: brew config + - run: brew list - name: Install base dependencies run: | @@ -31,7 +32,7 @@ jobs: popd echo '# END SECTION' fi - brew install --only-dependencies ${PACKAGE}; + brew install --only-dependencies ${PACKAGE} || brew install ignition-math7 --verbose; - run: mkdir build - name: cmake From 71d8181c5712d5984df344ee1a282916cbedda1a Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Tue, 28 Dec 2021 20:59:09 -0800 Subject: [PATCH 7/7] Remove swig to fix ignition-math7 build Signed-off-by: Steve Peters --- .github/workflows/macos.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index bfd024eb3..7df08f33a 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -32,7 +32,9 @@ jobs: popd echo '# END SECTION' fi - brew install --only-dependencies ${PACKAGE} || brew install ignition-math7 --verbose; + # ignition-math7 has problems with swig, remove it for now + brew remove swig || true + brew install --only-dependencies ${PACKAGE}; - run: mkdir build - name: cmake