Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,10 @@ runs:
if: ${{ inputs.os == 'macos-latest' }}
run: |
echo "MACOSX_DEPLOYMENT_TARGET=15.0" >> $GITHUB_ENV

- name: Setup vcpkg (Windows)
shell: bash
if: ${{ inputs.os == 'windows-latest' }}
run: |
git clone https://github.com/microsoft/vcpkg.git
./vcpkg/bootstrap-vcpkg.bat
35 changes: 29 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ jobs:
runs-on: ${{ matrix.os }}
container: ${{ matrix.container }}

env:
VCPKG_DEFAULT_BINARY_CACHE: ${{ github.workspace }}/.vcpkg-bincache

name: "🧪 Test on ${{ matrix.os }} (⚙️: ${{ matrix.config }}, 💿: ${{ matrix.container || matrix.os }})"

steps:
Expand All @@ -45,17 +48,37 @@ jobs:

- name: 📋 Install MacOS Dependencies
if: ${{ matrix.os == 'macos-latest' }}
run: brew install vtk

- name: Create vcpkg binary cache dir
if: ${{ matrix.os == 'windows-latest' }}
shell: pwsh
run: |
brew install vtk
New-Item -ItemType Directory -Force -Path "${{ env.VCPKG_DEFAULT_BINARY_CACHE }}"

- name: 🦥 Cache Dependencies
- name: 🦥 Cache VTK vcpkg build
if: ${{ matrix.os == 'windows-latest' }}
uses: actions/cache@v4
with:
key: test-${{ matrix.os }}-${{ matrix.config }}
path: build/_deps/
path: ${{ env.VCPKG_DEFAULT_BINARY_CACHE }}
key: vcpkg-${{ matrix.os }}-${{ matrix.config }}

- name: 🛠️ Build VTK (Windows)
if: ${{ matrix.os == 'windows-latest' }}
run: |
./vcpkg/vcpkg install vtk

- name: 🏗️ Compile
run: cmake -DVIENNALS_BUILD_TESTS=ON -B build && cmake --build build --config ${{ matrix.config }}
- name: 🏗️ Compile (Windows)
if: ${{ matrix.os == 'windows-latest' }}
run: |
cmake -DVIENNALS_BUILD_TESTS=ON -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake -B build
cmake --build build --config ${{ matrix.config }}

- name: 🏗️ Compile (other)
if: ${{ matrix.os != 'windows-latest' }}
run: |
cmake -DVIENNALS_BUILD_TESTS=ON -B build
cmake --build build --config ${{ matrix.config }}

- name: 🧪 Test
run: ctest --output-on-failure -E "Benchmark|Performance" -C ${{ matrix.config }} --test-dir build
23 changes: 19 additions & 4 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ jobs:
runs-on: ${{ matrix.os }}
container: ${{ matrix.container }}

env:
VCPKG_DEFAULT_BINARY_CACHE: ${{ github.workspace }}/.vcpkg-bincache

name: "🐍 Test Bindings on ${{ matrix.os }}"

steps:
Expand All @@ -42,14 +45,25 @@ jobs:

- name: 📋 Install MacOS Dependencies
if: ${{ matrix.os == 'macos-latest' }}
run: brew install vtk

- name: Create vcpkg binary cache dir
if: ${{ matrix.os == 'windows-latest' }}
shell: pwsh
run: |
brew install vtk
New-Item -ItemType Directory -Force -Path "${{ env.VCPKG_DEFAULT_BINARY_CACHE }}"

- name: 🦥 Cache Dependencies
- name: 🦥 Cache VTK vcpkg build
if: ${{ matrix.os == 'windows-latest' }}
uses: actions/cache@v4
with:
key: python-${{ matrix.os }}
path: build/_deps/
path: ${{ env.VCPKG_DEFAULT_BINARY_CACHE }}
key: vcpkg-${{ matrix.os }}-Release

- name: 🛠️ Build VTK (Windows)
if: ${{ matrix.os == 'windows-latest' }}
run: |
./vcpkg/vcpkg install vtk

- name: 🛠️ Disable IPO
if: ${{ matrix.os == 'ubuntu-latest' }}
Expand All @@ -60,6 +74,7 @@ jobs:
- name: 🐍 Build and check Python Module (Windows)
if: ${{ matrix.os == 'windows-latest' }}
run: |
$env:CMAKE_ARGS = "-DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake"
python -m venv venv
./venv/Scripts/activate.bat
pip install .
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ _generate/
.eggs/
test.ipynb
testall.sh
*_old*
5 changes: 2 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.20 FATAL_ERROR)
project(
ViennaLS
LANGUAGES CXX
VERSION 5.7.0)
VERSION 5.7.1)

# --------------------------------------------------------------------------------------------------------
# Library options
Expand Down Expand Up @@ -76,7 +76,6 @@ endif()
# --------------------------------------------------------------------------------------------------------

add_library(${PROJECT_NAME} INTERFACE)
add_library(ViennaTools::${PROJECT_NAME} ALIAS ${PROJECT_NAME})

target_compile_features(${PROJECT_NAME} INTERFACE cxx_std_17)
set_target_properties(
Expand Down Expand Up @@ -112,7 +111,7 @@ include(cmake/vtk.cmake)

CPMAddPackage(
NAME ViennaCore
VERSION 2.0.0
VERSION 2.1.1
GIT_REPOSITORY "https://github.com/ViennaTools/ViennaCore"
OPTIONS "VIENNACORE_FORMAT_EXCLUDE build/"
EXCLUDE_FROM_ALL ${VIENNALS_BUILD_PYTHON})
Expand Down
4 changes: 2 additions & 2 deletions include/viennals/lsVersion.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
namespace viennals {

// Version information generated by CMake
inline constexpr const char *version = "5.7.0";
inline constexpr const char *version = "5.7.1";
inline constexpr int versionMajor = 5;
inline constexpr int versionMinor = 7;
inline constexpr int versionPatch = 0;
inline constexpr int versionPatch = 1;

// Utility functions for version comparison
inline constexpr uint32_t versionAsInteger() {
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ requires = [
build-backend = "scikit_build_core.build"

[project]
version = "5.7.0"
version = "5.7.1"
name = "ViennaLS"
readme = "README.md"
license = {file = "LICENSE"}
Expand Down
8 changes: 4 additions & 4 deletions python/viennals/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ from viennals._core import Mesh
from viennals._core import NormalCalculationMethodEnum
from viennals._core import PointData
from viennals._core import Slice
from viennals._core import SpatialSchemeEnum
from viennals._core import SpatialSchemeEnum as IntegrationSchemeEnum
from viennals._core import SpatialSchemeEnum
from viennals._core import TemporalSchemeEnum
from viennals._core import TransformEnum
from viennals._core import TransformMesh
Expand All @@ -46,8 +46,8 @@ from viennals.d2 import CompareChamfer
from viennals.d2 import CompareCriticalDimensions
from viennals.d2 import CompareNarrowBand
from viennals.d2 import CompareSparseField
from viennals.d2 import CompareVolume as CompareArea
from viennals.d2 import CompareVolume
from viennals.d2 import CompareVolume as CompareArea
from viennals.d2 import ConvexHull
from viennals.d2 import CustomSphereDistribution
from viennals.d2 import Cylinder
Expand Down Expand Up @@ -112,6 +112,6 @@ def setDimension(d: int):

"""
PROXY_DIM: int = 2
__version__: str = '5.7.0'
version: str = '5.7.0'
__version__: str = '5.7.1'
version: str = '5.7.1'
_C = _core
6 changes: 3 additions & 3 deletions python/viennals/_core.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import enum
import typing
from viennals import d2
import viennals.d2
from viennals import d3
import viennals.d3
from viennals import d3
__all__: list[str] = ['BooleanOperationEnum', 'BoundaryConditionEnum', 'CurvatureEnum', 'Extrude', 'FeatureDetectionEnum', 'FileFormatEnum', 'IntegrationSchemeEnum', 'LogLevel', 'Logger', 'MaterialMap', 'Mesh', 'NormalCalculationMethodEnum', 'PointData', 'Slice', 'SpatialSchemeEnum', 'TemporalSchemeEnum', 'TransformEnum', 'TransformMesh', 'VTKReader', 'VTKRenderWindow', 'VTKWriter', 'VelocityField', 'VoidTopSurfaceEnum', 'd2', 'd3', 'setNumThreads', 'version']
class BooleanOperationEnum(enum.IntEnum):
INTERSECT: typing.ClassVar[BooleanOperationEnum] # value = <BooleanOperationEnum.INTERSECT: 0>
Expand Down Expand Up @@ -549,6 +549,6 @@ class VoidTopSurfaceEnum(enum.IntEnum):
"""
def setNumThreads(arg0: typing.SupportsInt | typing.SupportsIndex) -> None:
...
__version__: str = '5.7.0'
version: str = '5.7.0'
__version__: str = '5.7.1'
version: str = '5.7.1'
IntegrationSchemeEnum = SpatialSchemeEnum
Loading