Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve github actions #184

Merged
merged 15 commits into from
Jul 19, 2024
58 changes: 58 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Build

on:
push:
# branches: [ main, develop ]
pull_request:
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install libgmp-dev libmpfr-dev libboost-all-dev libeigen3-dev libgeos-dev
- name: Download CGAL
run: |
wget https://github.com/CGAL/cgal/releases/download/v5.6.1/CGAL-5.6.1-library.tar.xz -P ${{ github.workspace }}
cd ${{ github.workspace }}
tar -xvf CGAL-5.6.1-library.tar.xz
- name: Build
run: |
mkdir build && cd build
cmake .. -DCGAL_DIR=${{ github.workspace }}/CGAL-5.6.1 && make -j4

build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
brew update
brew upgrade || true
brew install cmake boost cgal eigen geos
- name: Build
run: |
mkdir build && cd build
cmake .. && make -j4

build-windows:
runs-on: windows-latest
env:
VCPKG_DEFAULT_TRIPLET: x64-windows
VCPKG_INSTALLATION_ROOT: C:\vcpkg
VCPKG_FEATURE_FLAGS: manifests
steps:
- uses: actions/checkout@v4
- name: Build
run: |
vcpkg install
mkdir Release
cd Release
cmake .. -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT\scripts\buildsystems\vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows
cmake --build . --parallel 4 --config Release

Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
# This is a basic workflow to help you get started with Actions

name: CI

name: Win CD

# on:
# push:
# branches: [ main, develop ]

on:
release:
types: [created]
types: [published]
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
Windows-build:
build-windows:
name: Build Windows
runs-on: windows-latest
env:
Expand All @@ -37,4 +35,4 @@ jobs:
uses: actions/upload-artifact@main
with:
name: val3dity-win64
path: Release/val3dity-win64.zip
path: Release/val3dity-win64.zip
17 changes: 9 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ cmake_minimum_required (VERSION 3.16)
project( val3dity )



add_definitions(-std=c++14)

set( CMAKE_BUILD_TYPE "Release")
Expand Down Expand Up @@ -46,17 +45,20 @@ include(CGAL_Eigen3_support)
find_package( Boost REQUIRED COMPONENTS filesystem)

if ( NOT Boost_FOUND )
message(SEND_ERROR "val3dity requires the Boost library")
message( SEND_ERROR "val3dity requires the Boost library" )
return()
endif()

# GEOS
find_package( GEOS REQUIRED )
if ( NOT GEOS_FOUND )
message(SEND_ERROR "val3dity requires the GEOS library")
find_package( GEOS CONFIG REQUIRED )
if ( GEOS_FOUND )
get_target_property(GEOS_LOCATION GEOS::geos_c LOCATION)
message( STATUS "Found GEOS: ${GEOS_LOCATION}" )
else()
message( SEND_ERROR "val3dity requires the GEOS library" )
endif()

include_directories( ${GEOS_INCLUDE_DIR} )
#include_directories( ${GEOS_INCLUDE_DIR} )
include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty )

FILE(GLOB_RECURSE THIRDPARTY thirdparty/*.cpp)
Expand All @@ -77,7 +79,6 @@ else()
add_executable(val3dity ${SRC_FILES})
endif()


target_link_libraries(val3dity CGAL::CGAL CGAL::Eigen3_support ${GEOS_LIBRARY} val3dity_thirdparty Boost::filesystem)
target_link_libraries(val3dity CGAL::CGAL CGAL::Eigen3_support GEOS::geos_c val3dity_thirdparty Boost::filesystem)

install(TARGETS val3dity DESTINATION bin)
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ In the folder `tools/viz3dity/`, there is a simple Python script where you can l
However, it's not possible to see where in an object the error is (eg which surface is not planar).
This tool helps to quickly visualise where the errors are in a large dataset, for instance a city.


## Documentation and help

Read the full documentation at [https://val3dity.rtfd.io](https://val3dity.rtfd.io).
Expand Down
2 changes: 1 addition & 1 deletion bumpver.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpver]
current_version = "2.5.0b2"
current_version = "2.5.0"
version_pattern = "MAJOR.MINOR.PATCH[PYTAGNUM]"
commit = false
tag = false
Expand Down
2 changes: 1 addition & 1 deletion changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
- validation of topological relationships between features, eg ensuring that buildings in a city do not overlap


## [2.5.0] -
## [2.5.0] - 2024-07-17
### Added
- val3dity now accepts a stream of CityJSONSeq as input from stdin: `cat myfile.jsonl | val3dity stdin` and it validates each line and outputs the result to stdout
- a new error was added: error 905--INVALID_JSON for handling wrong JSON lines in a CityJSONSeq stream
Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@
# built documents.
#
# The short X.Y version.
version = u'2.5.0b2'
version = u'2.5.0'
# The full version, including alpha/beta/rc tags.
release = u'2.5.0b2'
release = u'2.5.0'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ using namespace std;
using namespace val3dity;
using json = nlohmann::json;

std::string VAL3DITY_VERSION = "2.5.0b2";
std::string VAL3DITY_VERSION = "2.5.0";


std::string print_summary_validation(std::vector<Feature*>& lsFeatures, IOErrors& ioerrs);
Expand Down
2 changes: 1 addition & 1 deletion src/val3dity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
namespace val3dity
{

std::string VAL3DITY_VERSION = "2.5.0b2";
std::string VAL3DITY_VERSION = "2.5.0";

struct verror : std::exception {
std::string whattext;
Expand Down
2 changes: 1 addition & 1 deletion vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "val3dity",
"version-string": "2.5.0b2",
"version-string": "2.5.0",
"dependencies": [
"boost-program-options",
"boost-geometry",
Expand Down
Loading