Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
587adc7
Bundle complete python on MacOS (#79)
orting Dec 18, 2025
24390f7
Flatpak build (#80)
orting Dec 18, 2025
30635ae
Cleanup macos workflow
orting Dec 18, 2025
d34809f
Also set DAISY_BIN_NAME when not on macos
orting Dec 18, 2025
f876857
build boost.system in flatpak because filesystem depends on it
orting Dec 18, 2025
9779c29
Updated linux build + instructions
orting Dec 18, 2025
5cb42c4
Update MacOs and Linux workflows
orting Dec 18, 2025
ff3469f
Fix linux workflow
orting Dec 18, 2025
b772728
Explicitly get boost system + temporarily diable win workflow
orting Dec 18, 2025
f21db11
From Boost 1.89 system is header only
orting Dec 18, 2025
5d1fd1e
Use Boost 1.90 on MacOS
orting Dec 18, 2025
f74c5b3
Switch from uvx to uv run
orting Dec 18, 2025
facd7a5
Makefile target for building documentation
orting Jan 5, 2026
c59edad
Change test-colloid-tracer to use default units in Chemical Content log
orting Jan 5, 2026
03fe713
Fix wrong param order in documentation
orting Jan 6, 2026
60f3e5a
Use uv python for windows build
orting Jan 6, 2026
67d7178
Make AM_table a dai-unit-test
orting Jan 6, 2026
e4e2ade
New workflow for windows
orting Jan 6, 2026
c955c42
Try to fix Windows workflow
orting Jan 7, 2026
7def663
Try to fix workflow for windows
orting Jan 7, 2026
f704745
Fix typo in windows workflow
orting Jan 7, 2026
0f1a51e
Cleaner Makefile + update build instructions to use Makefile
orting Jan 7, 2026
88e7387
Rewrite macos github workflow in same style as windows
orting Jan 7, 2026
68ab257
Linux build instrictions formatting
orting Jan 7, 2026
4d5f7b4
Fix MacOS Makefile + find_python_root_dir
orting Jan 7, 2026
b6a998d
Dont run any workflows
orting Jan 7, 2026
3132cb1
Fix windows Makefile + build instructions
orting Jan 7, 2026
bbb4716
Update linux workflow
orting Jan 7, 2026
3af56ce
Run all workflows
orting Jan 7, 2026
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
51 changes: 51 additions & 0 deletions .github/workflows/build-and-test-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Build daisy and run tests on linux

on:
pull_request:
branches: [ "main" ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v5

- name: Install build dependencies
run: sudo apt install cmake libsuitesparse-dev libboost-filesystem-dev python3-pybind11

- name: Install uv for testing
uses: astral-sh/setup-uv@v7
with:
version: "0.9.18"

- name: Install python
run: uv python install 3.13

- name: Create build dir
run: mkdir ci-build

- name: Configure CMake
working-directory: ci-build
run: cmake .. --preset linux-gcc-portable

- name: Build
working-directory: ci-build
run: cmake --build . -j 4

- name: Test environment
working-directory: ci-build
run: |
uv venv
uv pip install git+https://github.com/daisy-model/daisypy-test

- name: Test
working-directory: ci-build
run: ctest --output-on-failure

- name: Upload test log
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v4
with:
name: test-output-ubuntu
path: build/Testing
62 changes: 62 additions & 0 deletions .github/workflows/build-and-test-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Build daisy and run tests on MacOS

on:
pull_request:
branches: [ "main" ]

jobs:
build:
runs-on: macos-latest

steps:
- uses: actions/checkout@v5

- name: Install build dependencies using brew
run: brew install cmake boost suite-sparse pybind11

- name: Install uv
uses: astral-sh/setup-uv@v7
with:
version: "0.9.18"

- name: Install python
run: uv python install 3.13

- name: Create build dir
run: mkdir ci-build

- name: Configure CMake
working-directory: ci-build
run: >
cmake ..
-DUV_INSTALLED_PYTHON_ROOT_DIR=$( ls -d $( uv python dir )/* | grep 3.13 )
--preset macos-clang-portable

- name: Build
working-directory: ci-build
run: cmake --build . -j 4

- name: Pack
working-directory: ci-build
run: cpack -G ZIP

- name: Install
working-directory: ci-build
run: unzip $( ls | grep -e "daisy.*Darwin-python.*zip" )

- name: Setup test environment
working-directory: ci-build
run: |
uv venv
uv pip install git+https://github.com/daisy-model/daisypy-test

- name: Test
working-directory: ci-build
run: ctest --output-on-failure

- name: Upload test log
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v4
with:
name: test-output-macos
path: ci-build/Testing
79 changes: 42 additions & 37 deletions .github/workflows/build-and-test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,66 +3,71 @@ name: Build daisy and run tests on windows
on:
pull_request:
branches: [ "main" ]

jobs:
build:
runs-on: ${{ matrix.os }}
runs-on: windows-latest

strategy:
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations.
# Consider changing this to true when your workflow is stable.
fail-fast: false
matrix:
os: [windows-latest]
include:
- { sys: ucrt64, env: ucrt-x86_64 }
defaults:
run:
shell: msys2 {0}

steps:
- uses: msys2/setup-msys2@v2
with:
msystem: ${{matrix.sys}}
msystem: UCRT64
update: true
install: >-
git
mingw-w64-${{matrix.env}}-cmake
mingw-w64-${{matrix.env}}-gcc
mingw-w64-${{matrix.env}}-ninja
mingw-w64-${{matrix.env}}-suitesparse
mingw-w64-${{matrix.env}}-boost
mingw-w64-${{matrix.env}}-pybind11
mingw-w64-${{matrix.env}}-python
mingw-w64-${{matrix.env}}-python-pip
mingw-w64-${{matrix.env}}-python-pandas
mingw-w64-ucrt-x86_64-cmake
mingw-w64-ucrt-x86_64-gcc
mingw-w64-ucrt-x86_64-ninja
mingw-w64-ucrt-x86_64-suitesparse
mingw-w64-ucrt-x86_64-boost
mingw-w64-ucrt-x86_64-pybind11
mingw-w64-ucrt-x86_64-uv
unzip

- name: Install python dependencies
run: pip install pint daisypy-test@git+https://github.com/daisy-model/daisypy-test
- uses: actions/checkout@v5

- name: Install python
run: uv python install 3.13

- uses: actions/checkout@v4
- name: Create build dir
run: mkdir ci-build

- name: Get embeddable python
run: mkdir -p python/python &&
wget https://www.python.org/ftp/python/3.12.10/python-3.12.10-embed-amd64.zip -O python/python.zip &&
unzip python/python.zip -d python/python &&
cp python/python/python312.dll python/python/libpython3.12.dll

- name: Configure CMake
working-directory: ci-build
run: >
cmake -B build --preset mingw-gcc-portable
cmake ..
-DUV_INSTALLED_PYTHON_ROOT_DIR=$( ls -d $( uv python dir | tr \\\\ / )/* | grep 3.13 )
--preset mingw-gcc-portable

- name: Build
run: cmake --build build

- name: Test
working-directory: build
working-directory: ci-build
run: cmake --build .

- name: Pack
working-directory: ci-build
run: cpack -G ZIP

- name: Install
working-directory: ci-build
run: unzip $( ls | grep -e "daisy-.*-Windows-python.*zip" )

- name: Setup test environment
working-directory: ci-build
run: |
ctest --output-on-failure
uv venv
uv pip install git+https://github.com/daisy-model/daisypy-test

- name: Test
working-directory: ci-build
run: ctest --output-on-failure

- name: Upload test logs
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v4
with:
name: test-output-win
path: build/Testing
name: test-output-windows
path: ci-build/Testing
79 changes: 0 additions & 79 deletions .github/workflows/build-and-test.yml

This file was deleted.

20 changes: 12 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ option(MAKE_PORTABLE "Set to ON to make a generic build" OFF)
if (${BUILD_PYTHON})
add_definitions( -DBUILD_PYTHON )
include(cmake/python.cmake)
else()
set(CPACK_PACKAGE_NAME "${CMAKE_PROJECT_NAME}-no-python")
endif()

if (NOT CMAKE_BUILD_TYPE)
Expand All @@ -53,7 +51,11 @@ if (${OS} STREQUAL "macos")
message("Using HOMEBREW_PREFIX = ${HOMEBREW_PREFIX}")
endif()

find_package(Boost 1.74 REQUIRED CONFIG COMPONENTS filesystem system)
if (${OS} STREQUAL "macos")
find_package(Boost 1.90 REQUIRED CONFIG COMPONENTS filesystem)
else()
find_package(Boost 1.83 REQUIRED CONFIG COMPONENTS filesystem system)
endif()
message(STATUS "Boost version: ${Boost_VERSION}")

SET(COMPILE_OPTIONS
Expand All @@ -69,11 +71,12 @@ SET(LINKER_OPTIONS
"$<$<BOOL:${MAKE_PORTABLE}>:${LINKER_OPTIONS_PORTABLE}>"
)

if (${OS} STREQUAL "macos" AND ${BUILD_PYTHON})
if (${OS} STREQUAL "macos")
set(DAISY_BIN_NAME daisy-bin)
else()
set(DAISY_BIN_NAME daisy)
endif()

add_executable(${DAISY_BIN_NAME})
if (${OS} STREQUAL "mingw")
include(cmake/MinGW.cmake)
Expand All @@ -86,10 +89,6 @@ endif()
# Sources are added with target_sources in CMakeLists in the source tree
add_subdirectory(src)

# Test
include(CTest)
add_subdirectory(test)

# Packaging
# lib/ and sample/ contain .dai files that define functionality that should be installed
add_subdirectory(lib)
Expand All @@ -113,3 +112,8 @@ include(CPack)

# Documentation
include(cmake/Doc.cmake)

# Test
# We do it last so we have access to variables set during build and packaging
include(CTest)
add_subdirectory(test)
Loading
Loading