From aa0888fa4ad97a18f960d6eef22c5705093400b8 Mon Sep 17 00:00:00 2001 From: Ivan Paden Date: Fri, 25 Aug 2023 10:19:53 +0200 Subject: [PATCH 1/4] Add CI for older ubuntu versions --- .github/workflows/build.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4cf820ab..da4fe142 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,6 +21,32 @@ jobs: mkdir build && cd build cmake .. && make -j4 + build_linux_2004: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v3 + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install libcgal-dev libboost-all-dev libeigen3-dev libomp-dev libgdal-dev + - name: Build + run: | + mkdir build && cd build + cmake .. && make -j4 + + build_linux_1804: + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v3 + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install libcgal-dev libboost-all-dev libeigen3-dev libomp-dev libgdal-dev + - name: Build + run: | + mkdir build && cd build + cmake .. && make -j4 + build_macos: runs-on: macos-latest steps: From 073ad8e88d78ecba75bfdd92c5a05eb2690c643f Mon Sep 17 00:00:00 2001 From: Ivan Paden Date: Fri, 25 Aug 2023 10:46:47 +0200 Subject: [PATCH 2/4] Fix GDAL casting issue on older versions --- src/io.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/io.cpp b/src/io.cpp index 130e35ad..a11279cd 100644 --- a/src/io.cpp +++ b/src/io.cpp @@ -224,7 +224,7 @@ void IO::read_polygons(std::string& file, PolyVecPtr& polygons, std::string* crs for (int currentPolygon = 0; currentPolygon < inputMultipolygon->getNumGeometries(); ++currentPolygon) { - OGRPolygon *inputPolygon = inputMultipolygon->getGeometryRef(currentPolygon); + OGRPolygon* inputPolygon = static_cast(inputMultipolygon->getGeometryRef(currentPolygon)); polygons.push_back(std::make_unique()); // polygons.back()->id = std::to_string(inputFeature->GetFID()) + "-" + std::to_string(currentPolygon); // polygons.back().semantic_class = cityjson_class; From cd837bd1c9f8f3c61f414c128b208794e0030e3e Mon Sep 17 00:00:00 2001 From: Ivan Paden Date: Fri, 25 Aug 2023 11:31:23 +0200 Subject: [PATCH 3/4] Fix CMake warning --- .github/workflows/build.yml | 15 +-------------- CMakeLists.txt | 2 +- tools/prepare_point_cloud/CMakeLists.txt | 2 +- 3 files changed, 3 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index da4fe142..c1e63ab7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,7 +8,7 @@ on: - cron: '0 6 1 * *' # Run on the first day of every month at 06:00 UTC jobs: - build_linux: + build_linux_latest: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -34,19 +34,6 @@ jobs: mkdir build && cd build cmake .. && make -j4 - build_linux_1804: - runs-on: ubuntu-18.04 - steps: - - uses: actions/checkout@v3 - - name: Install dependencies - run: | - sudo apt-get update - sudo apt-get install libcgal-dev libboost-all-dev libeigen3-dev libomp-dev libgdal-dev - - name: Build - run: | - mkdir build && cd build - cmake .. && make -j4 - build_macos: runs-on: macos-latest steps: diff --git a/CMakeLists.txt b/CMakeLists.txt index f21b9e46..525242e7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.9) project(city4cfd) diff --git a/tools/prepare_point_cloud/CMakeLists.txt b/tools/prepare_point_cloud/CMakeLists.txt index 75f79fc2..18da6b6d 100644 --- a/tools/prepare_point_cloud/CMakeLists.txt +++ b/tools/prepare_point_cloud/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.9) project(city4cfd_pcprep) set(CMAKE_CXX_FLAGS "-O3") From 61c8fbd65d9c70ad10925f7893bb881f824d9b67 Mon Sep 17 00:00:00 2001 From: Ivan Paden Date: Fri, 25 Aug 2023 11:39:02 +0200 Subject: [PATCH 4/4] Add changelog and bump version --- CHANGELOG.md | 4 ++++ src/main.cpp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 643fadad..4cc57692 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## [0.4.3] - 2023-08-25 +### Fixed +- Issue with GDAL on Ubuntu 20.04 + ## [0.4.2] - 2023-07-12 ### Fixed - Problematic compilation in debug mode diff --git a/src/main.cpp b/src/main.cpp index 826e12af..c27d64dc 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -31,7 +31,7 @@ #include -std::string CITY4CFD_VERSION = "0.4.2"; +std::string CITY4CFD_VERSION = "0.4.3"; void printWelcome() { auto logo{