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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
34 changes: 34 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,36 @@
**.C linguist-language=C++
**.H linguist-language=C++

# Default: normalize all text files to LF in repo
* text=auto eol=lf

# Windows-specific scripts
*.bat text eol=crlf
*.cmd text eol=crlf

# Shell scripts must stay LF
*.sh text eol=lf
*.pl text eol=lf

# C/C++ / CMake
*.C text eol=lf
*.H text eol=lf
*.cmake text eol=lf
CMakeLists.txt text eol=lf

# Binary files
*.png binary
*.jpg binary
*.exe binary
*.app binary
*.bin binary
*.dll binary
*.so binary
*.dylib binary
*.a binary
*.lib binary
*.o binary
*.obj binary
*.pyc binary
*.pyo binary
*.pyd binary
32 changes: 19 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build
name: Build and Test

on:
push:
Expand All @@ -7,21 +7,27 @@ on:
branches: [ "master" ]

jobs:
gcc-pipeline:
name: GCC Build and Test
runs-on: ubuntu-latest
build-and-test:
name: Build and Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y perl cmake gcc g++
- name: Setup Conan
uses: conan-io/setup-conan@v1

- name: Build deltaFlow
run: perl ./bin/build.pl -t
- name: Build
run: perl ./bin/build.pl -t

- name: CMake Tests
run: ctest --output-on-failure
- name: Test
run: ctest --output-on-failure --test-dir build --build-config Release

- name: Tests
run: perl ./bin/test.pl
- name: Upload bin/ artifacts
uses: actions/upload-artifact@v4
with:
name: binaries-${{ runner.os }}
path: bin/
63 changes: 28 additions & 35 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,53 +1,46 @@
name: Generate Docs and Deploy
name: Documentation

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

permissions:
pages: write
id-token: write

jobs:
docs-deploy:
name: Generate Docs and Deploy
documentation:
name: Generate Documentation
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup micromamba
uses: mamba-org/setup-micromamba@v2
- uses: actions/checkout@v6
with:
environment-name: docs-env
create-args: >
doxygen=1.13.2
graphviz
perl
generate-run-shell: true
fetch-depth: 0

- name: Verify Doxygen
run: doxygen --version
shell: micromamba-shell {0}
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y doxygen graphviz

- name: Generate documentation
run: |
perl ./bin/build.pl -d
echo "Contents of docs folder after generation:"
ls -R ./docs
shell: micromamba-shell {0}
run: ./bin/build.pl --doc

- name: Verify docs exist
- name: Set Artifact Name
id: artifact-name
run: |
if [ -z "$(ls -A ./docs/html)" ]; then
echo "No docs found! Exiting."
exit 1
fi
shell: micromamba-shell {0}

- name: Deploy docs to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
echo "artifact_name=${{ github.run_id }}[${{ github.run_attempt }}]--docs-artifacts" \
| tee -a $GITHUB_OUTPUT

- name: Upload Pages Artifacts
uses: actions/upload-pages-artifact@v4
with:
name: ${{ steps.artifact-name.outputs.artifact_name }}
path: docs/html

- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/html
publish_branch: gh-pages
keep_files: false
artifact_name: ${{ steps.artifact-name.outputs.artifact_name }}
132 changes: 128 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,132 @@ docs/html/

# ---------------- Catch2 ----------------

/bin/test_*
/bin/Test*
/build/test/*
bin/test_*
bin/Test*
build/test/*
**/catch2-*


# ---------------- Python ----------------

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[codz]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py.cover
.hypothesis/
.pytest_cache/
cover/

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
# Pipfile.lock

# UV
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# uv.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
# poetry.lock
# poetry.toml

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
# pdm.lock
# pdm.toml
.pdm-python
.pdm-build/

# pixi
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
# pixi.lock
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
# in the .venv directory. It is recommended not to include this directory in version control.
.pixi

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Environments
.env
.envrc
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# mkdocs documentation
/site

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
# .idea/

# Ruff stuff:
.ruff_cache/

# PyPI configuration file
.pypirc


# ---------------- Visual Studio Code ----------------

.vscode/**/*.json
Expand All @@ -90,12 +210,16 @@ docs/html/
ehthumbs.db
Thumbs.db
Version.H
deltaFlow
deltaFlow*
deltaFlow.csv
*.sta
*.msg
*.dat
*.csv~
*.zip
*.tar.gz
*.tgz
*.7z
*.gz
*.rar
!*.svg
28 changes: 16 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,30 @@
cmake_minimum_required(VERSION 3.22)
project(deltaFlow VERSION 1.1.5)
cmake_minimum_required(VERSION 3.25)
project(deltaFlow LANGUAGES CXX VERSION ${PROJECT_VERSION})

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin)

# Include Conan-generated files
include(${CMAKE_BINARY_DIR}/conan_toolchain.cmake)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin)
add_compile_definitions(_USE_MATH_DEFINES)

file(GLOB CMAKE_FILES "${CMAKE_SOURCE_DIR}/cmake/*.cmake")

foreach(CMAKE_FILE ${CMAKE_FILES})
include(${CMAKE_FILE})
endforeach()

find_package(fmt REQUIRED)
find_package(Eigen3 REQUIRED)

SYSTEM_INFO()

set(EXECUTABLE_NAME "${PROJECT_NAME}-${PROJECT_VERSION}")

add_subdirectory(src)

configure_file(
Expand All @@ -25,13 +35,7 @@ configure_file(
option(BUILD_TEST "Build tests" OFF)

if(BUILD_TEST)
include(FetchContent)
FetchContent_Declare(
catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG v3.5.4
)
FetchContent_MakeAvailable(catch2)

enable_testing()
find_package(Catch2 REQUIRED)
add_subdirectory(test)
endif()
2 changes: 1 addition & 1 deletion Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ PROJECT_BRIEF =
# when the HTML document is shown. Doxygen will copy the logo to the output
# directory.

PROJECT_ICON = docs/deltaFlow.ico
PROJECT_ICON = docs/deltaFlow.svg

# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
# into which the generated documentation will be written. If a relative path is
Expand Down
Loading
Loading