Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
8a2c03b
Added readme_cpp and CMakeLists changes
orzel320 May 8, 2026
51e8928
Fortran compilator for windows/mac, turned off some .yml files
orzel320 May 13, 2026
d246b3c
Merge branch 'main' into PyPart++
orzel320 May 13, 2026
90d0eda
Added env var for fortran to readme_listings, .yml files on pull to off.
orzel320 May 13, 2026
9ff610c
python-setup@v1 to @v6
orzel320 May 13, 2026
e842776
fix CMake setup for Windows builds
slayoo May 13, 2026
91654d6
Linked nanobind to CMakeLists in readme_cpp, some test changes to CMa…
orzel320 May 18, 2026
6e4c609
Attempted to fix cross platform linking, forced C++17 standard in rea…
orzel320 May 18, 2026
a8b1b93
Add library shared -> unknown in readme_cpp CMakeLists, to fix compil…
orzel320 May 18, 2026
99956a4
update cmake version in CI/CD
orzel320 May 20, 2026
1fa6808
Corrected cmake version typo, and added ctest
orzel320 May 20, 2026
1667789
Moved to correct directory before running tests
orzel320 May 20, 2026
f092840
Testing if conditionally applying SHARED module type to nanobind on m…
orzel320 May 20, 2026
cc5b27c
Re-enabling .yml files, adding names to run instructions in cpp tests…
orzel320 May 20, 2026
010416e
Added #pragma_once to input_guard.hpp, corrected si.hpp generation, i…
orzel320 Jun 10, 2026
82e0ab6
Re-enabled urlcheck.yml
orzel320 Jun 10, 2026
c4c9602
Ran black, commiting __init__ to remove duplicates with __generate_si.
orzel320 Jun 10, 2026
c737e62
Re-run black formatter
orzel320 Jun 10, 2026
0dfb7ee
Added #pragma_once to *_parameters.hpp files, removed ctest form read…
orzel320 Jun 10, 2026
75100d3
added mkdir for readme_cpp outputs, testing for test.cpp segfault sol…
orzel320 Jun 10, 2026
770e4c2
Attempt to add tests on platforms other then windows for diffrent lan…
orzel320 Jun 10, 2026
5d2a42e
Changed python versions to 3.13 in readme_listings
orzel320 Jun 10, 2026
0f19e0b
Returned matlab to default state, added fortran compiler installation…
orzel320 Jun 10, 2026
137cfe0
Cut mac from julia and python, and and windows from julia. Changed cp…
orzel320 Jun 10, 2026
03e554a
Corrected an oversight that was made when changing mingw64 to ucrt64
orzel320 Jun 10, 2026
3ba785d
Changed msys is being added to cmake env variables to it being added …
orzel320 Jun 10, 2026
321b030
Added fortran compiler back for cpp and python on windows
orzel320 Jun 10, 2026
0a9d3a0
added m4 to env for cpp and python tests on windows
orzel320 Jun 10, 2026
036761c
Attempt to install m4 with Chocolatey instead
orzel320 Jun 10, 2026
22d9596
Tried linking m4 downloaded with msys via cygpath
orzel320 Jun 10, 2026
7abd91b
Attempted to move some necessary cmake setup away from the end user
orzel320 Jun 14, 2026
0f4296b
made sure linux recognizes _PyPartMC file
orzel320 Jun 14, 2026
8fe770c
Moved readme_listings to buildwheels
orzel320 Jun 17, 2026
5e1b665
removed need for prebuilt packages from fortran in buildwheels, added…
orzel320 Jun 17, 2026
ea3db38
Merge remote-tracking branch 'upstream/main' into PyPart++
orzel320 Jun 17, 2026
b1f9694
Moved readme_cpp to README, made sure buildwheels pulls its code from…
orzel320 Jun 17, 2026
7e5e5e2
Installed numba and llvmlite idependently for cpp on macos, unified c…
orzel320 Jun 17, 2026
476073d
ran black for __init__.py
orzel320 Jun 17, 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
254 changes: 251 additions & 3 deletions .github/workflows/buildwheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:

- uses: actions/upload-artifact@v4
with:
name: dist-${{matrix.os}}-${{matrix.manylinux}}
name: dist-${{matrix.os}}
path: dist

run_example_notebooks:
Expand All @@ -106,7 +106,7 @@ jobs:

- uses: actions/download-artifact@v4
with:
name: dist-${{matrix.os}}-${{matrix.manylinux}}
name: dist-${{matrix.os}}
path: dist

# install fortran compiler needed by dustpy
Expand Down Expand Up @@ -155,7 +155,7 @@ jobs:
- run: pip install twine auditwheel
- uses: actions/download-artifact@v4
with:
name: dist-${{matrix.os}}-${{matrix.manylinux}}
name: dist-${{matrix.os}}
path: dist
- run: twine check --strict dist/*
- run: for i in dist/*-manylinux*.whl; do auditwheel show $i; done;
Expand Down Expand Up @@ -223,3 +223,251 @@ jobs:
uses: pypa/gh-action-pypi-publish@release/v1.14
with:
attestations: false

readme_julia:
runs-on: ${{ matrix.os }}
needs: [build_wheels]
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, ubuntu-24.04-arm]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- uses: actions/setup-python@v6
with:
python-version: "3.13"

- uses: actions/download-artifact@v4
with:
name: dist-${{matrix.os}}
path: dist

- run: |
temp=`find dist/ -name "*cp313*.whl"`
python -m pip install $temp[examples]
- run: pip install pytest-codeblocks pytest
- run: python -c "import pytest_codeblocks; code=pytest_codeblocks.extract_from_file('README.md'); f=open('readme.jl', 'w'); f.writelines(block.code for block in code if block.syntax=='Julia'); f.close()"
- run: cat -n readme.jl

- uses: julia-actions/setup-julia@v3
- run: mkdir readme_output
- run: julia readme.jl > readme_output/julia_${{ matrix.os }}.txt
- uses: actions/upload-artifact@v4
with:
name: readme_output-julia_${{matrix.os}}
path: readme_output

readme_python:
runs-on: ${{ matrix.os }}
needs: [build_wheels]
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- uses: actions/setup-python@v6
with:
python-version: "3.13"

- uses: actions/download-artifact@v4
with:
name: dist-${{matrix.os}}
path: dist

- run: |
temp=`find dist/ -name "*cp313*.whl"`
python -m pip install $temp[examples]

- run: pip install pytest-codeblocks pytest
- run: python -c "import pytest_codeblocks; code=pytest_codeblocks.extract_from_file('README.md'); f=open('readme.py', 'w'); f.writelines(block.code for block in code if block.syntax=='Python'); f.close()"
- run: cat -n readme.py

- run: mkdir readme_output
- run: python -We readme.py > readme_output/python_${{ matrix.os }}.txt
- uses: actions/upload-artifact@v4
with:
name: readme_output-python_${{matrix.os}}
path: readme_output

readme_fortran:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, ubuntu-24.04-arm]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- run: |
sudo apt-get update
sudo apt-get install libnetcdff-dev
- run: |
cd readme_fortran
mkdir build
cd build
PARTMC_HOME=../../gitmodules/partmc cmake ..
make

- run: |
mkdir readme_output
cd readme_fortran
./build/main > ../readme_output/fortran_${{matrix.os}}.txt

- uses: actions/upload-artifact@v4
with:
name: readme_output-fortran_${{matrix.os}}
path: readme_output

readme_assert:
runs-on: ubuntu-latest
needs: [readme_julia, readme_python, readme_matlab, readme_fortran, readme_cpp]
steps:
- uses: actions/setup-python@v6
- run: pip install numpy
- uses: actions/download-artifact@v4
with:
pattern: readme_output-*
merge-multiple: true
path: readme_output
- run : python -c 'import numpy as np; import os; dir="readme_output/"; data=[float(np.loadtxt(dir+file)) for file in os.listdir(dir)]; print("data:", data); similar_as_first = np.array([abs(data[0]-k)/data[0] for k in data[1:]]); print("similar_as_first", similar_as_first); assert((similar_as_first < .5).all())'

readme_cpp:
runs-on: ${{ matrix.os }}
needs: [build_wheels]
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, ubuntu-24.04-arm, macos-15, macos-15-intel, windows-latest]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- uses: actions/setup-python@v6
with:
python-version: "3.12"

- uses: jwlawson/actions-setup-cmake@v2.2.0
with:
cmake-version: '3.26.x'

- if: matrix.os == 'windows-latest'
uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
update: false
install: >-
mingw-w64-ucrt-x86_64-gcc
mingw-w64-ucrt-x86_64-ninja
m4

- if: matrix.os == 'windows-latest'
shell: msys2 {0}
run: |
echo "$(cygpath -m /ucrt64/bin)" >> $GITHUB_PATH
echo "$(cygpath -m /usr/bin)" >> $GITHUB_PATH
echo "CMAKE_GENERATOR=Ninja" >> $GITHUB_ENV
echo "CMAKE_ARGS=-DNC_M4=$(cygpath -m $(which m4))" >> $GITHUB_ENV

- if: startsWith(matrix.os, 'macos-')
run: |
brew reinstall gcc
pip install --only-binary=llvmlite numba llvmlite!=0.46.0b1

- uses: actions/download-artifact@v4
with:
name: dist-${{matrix.os}}
path: dist

- run: |
temp=`find dist/ -name "*cp312*.whl"`
python -m pip install $temp[examples]

- run: pip install pytest-codeblocks pytest
- run: mkdir readme_cpp
- run: python -c "import pytest_codeblocks; code=pytest_codeblocks.extract_from_file('README.md'); f=open('readme_cpp/test.cpp', 'w'); f.writelines(block.code for block in code if block.syntax=='cpp'); f.close()"
- run: cat -n readme_cpp/test.cpp

- run: python -c "import pytest_codeblocks; code=pytest_codeblocks.extract_from_file('README.md'); f=open('readme_cpp/CMakeLists.txt', 'w'); f.writelines(block.code for block in code if block.syntax=='cmake'); f.close()"
- run: cat -n readme_cpp/CMakeLists.txt

- name: build
run: |
cd readme_cpp
mkdir build
cd build
cmake ..
cmake --build .
- if: matrix.os == 'windows-latest'
run: |
gdb -batch \
-ex "run" \
-ex "bt full" \
-ex "quit $_exitcode" \
--args readme_cpp/build/my_test.exe
- name: Execute tests
run: |
mkdir -p readme_output
if [ "$RUNNER_OS" == "Windows" ]; then
./readme_cpp/build/my_test.exe > readme_output/cpp_${{matrix.os}}.txt
else
./readme_cpp/build/my_test > readme_output/cpp_${{matrix.os}}.txt
fi
- uses: actions/upload-artifact@v4
with:
name: readme_output-cpp_${{matrix.os}}
path: readme_output

readme_matlab:
runs-on: ${{ matrix.os }}
needs: [build_wheels]
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]

steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- uses: actions/setup-python@v6
with:
python-version: "3.10"

- uses: actions/download-artifact@v4
with:
name: dist-${{matrix.os}}
path: dist

- run: pip install --verbose dist/*cp310*manylinux*.whl

- run: pip install pytest-codeblocks pytest
- run: python -c "import pytest_codeblocks; code=pytest_codeblocks.extract_from_file('README.md'); f=open('readme.m', 'w'); f.writelines(block.code for block in code if block.syntax=='Matlab'); f.close()"
- run: cat -n readme.m

- uses: matlab-actions/setup-matlab@v2.6.1
with:
release: R2024b
cache: true

- run: mkdir readme_output

- uses: matlab-actions/run-command@v2.4.0
with:
startup-options: -nojvm
command: diary('readme_output/matlab.txt'), readme

- uses: actions/upload-artifact@v4
with:
name: readme_output-matlab
path: readme_output
Loading
Loading