Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
3fd8e80
Added linked list functionality
CodeByDrescher Feb 26, 2025
a9a5057
Visibility fixes
CodeByDrescher Feb 26, 2025
e1eb237
Implemented Vectors, Linked List, and Hashtables
CodeByDrescher Mar 11, 2025
566b7e3
Added hashing to surfaces and panels, replacing expensive `stringfind…
CodeByDrescher Mar 13, 2025
efb4767
Adding gtests (and tweaks to make better)
CodeByDrescher Mar 14, 2025
331a826
Upgraded testing to have better separation and to use a configuration…
CodeByDrescher Mar 19, 2025
12b3258
Edited test to be platform independent using pattern matching
CodeByDrescher Mar 20, 2025
046ecb7
Added necessary option to build tests in CI/CD
CodeByDrescher Mar 20, 2025
96aa389
Undoing Changes to libzippp
CodeByDrescher Mar 20, 2025
a5f7c42
Adding cmake standard to main cmake file
CodeByDrescher Mar 20, 2025
5d8be86
adding missing include
CodeByDrescher Mar 20, 2025
1806e3a
installing python dependencies
CodeByDrescher Mar 20, 2025
d35d9d3
fix syntax error
CodeByDrescher Mar 20, 2025
2464007
Attempt to work around macos-14 python limitations
CodeByDrescher Mar 20, 2025
675acb1
Fixing windows python install
CodeByDrescher Mar 20, 2025
4934e61
fixing macos-14 python install
CodeByDrescher Mar 20, 2025
c2e44fd
Enabled Smoldyn building for all OS
CodeByDrescher Mar 21, 2025
519c874
Updating .gitignore
CodeByDrescher Mar 21, 2025
475b086
Updating Pybinding version
CodeByDrescher Mar 21, 2025
34074af
Revert "Updating Pybinding version"
CodeByDrescher Mar 21, 2025
ee90701
Enabling test of docker container
CodeByDrescher Mar 24, 2025
a5904fb
Fixing dependencies
CodeByDrescher Mar 24, 2025
e34f093
Fixing incorrect licenses
CodeByDrescher Mar 24, 2025
cecfc07
License Clarification, and correctly separating code
CodeByDrescher Mar 24, 2025
932c1e3
Memory change and debug symbols added for valgrind
CodeByDrescher Mar 26, 2025
36076b8
Fixed lack of initalization
CodeByDrescher Mar 26, 2025
64ab22e
Fixing bad-allocated memory in main of FV solver
CodeByDrescher Mar 27, 2025
ec90c56
Rewriting log-deletion code
CodeByDrescher Mar 28, 2025
1843ce2
More Memory cleanup
CodeByDrescher Mar 28, 2025
dcf59bd
Added Smoldyn Smoke test, and corresponding discovered NPE Fault
CodeByDrescher Mar 28, 2025
a972477
Allowed for implicit vcg discovery
CodeByDrescher Mar 28, 2025
60c9d62
Updated git ignore
CodeByDrescher Mar 28, 2025
ba63421
Correcting tmate options
CodeByDrescher Mar 28, 2025
6ddada9
Removing Debug Symbols
CodeByDrescher Mar 28, 2025
d6ca746
Limit pushing to tagged, published versions
CodeByDrescher Mar 28, 2025
d66163a
Attempting to limit auditwheel to version when it allowed non x86_64-…
CodeByDrescher Apr 1, 2025
08a4ce1
Allowing upgrade of minimum cmake version (deprecation update)
CodeByDrescher Apr 1, 2025
dbc7c41
Using proper flag to disable isa check
CodeByDrescher Apr 1, 2025
b97e3ff
Attempt to build windows wheels
CodeByDrescher Apr 8, 2025
7d06531
Explicitly building windows pythons from archives
CodeByDrescher Apr 8, 2025
e65bfbd
Create build_wheels.yml
CodeByDrescher Apr 9, 2025
f0ac339
Merge remote-tracking branch 'origin/Build_Wheels_Action' into Smoldy…
CodeByDrescher Apr 9, 2025
63a5b32
Updating for new build yaml
CodeByDrescher Apr 9, 2025
6cc390f
fixing syntax
CodeByDrescher Apr 9, 2025
04b5030
Editing windows to use Msys2 build
CodeByDrescher Apr 9, 2025
411ae9a
Ubuntu dependencies updated
CodeByDrescher Apr 9, 2025
2289b71
Mac env var set (and name fix)
CodeByDrescher Apr 9, 2025
7d26c14
Deploy tmate session
CodeByDrescher Apr 9, 2025
77c1fb7
amending path
CodeByDrescher Apr 9, 2025
f437b69
syntax fix
CodeByDrescher Apr 9, 2025
57ece6a
Add submodules
CodeByDrescher Apr 9, 2025
54b21f1
Individual os changes
CodeByDrescher Apr 9, 2025
30792a2
yaml syntax fix
CodeByDrescher Apr 9, 2025
db31859
fixing linux includes
CodeByDrescher Apr 9, 2025
f3e5bce
renaming tmate step
CodeByDrescher Apr 9, 2025
92f9155
Still trying to get libzip found (+ name fix)
CodeByDrescher Apr 9, 2025
17a9978
Changing windows python install
CodeByDrescher Apr 11, 2025
0223799
Super destructive attempt to use correct linking
CodeByDrescher Apr 11, 2025
04193a3
Attempting to build native windows with conan
CodeByDrescher Apr 14, 2025
d898f94
Attempting manual install of `flang`
CodeByDrescher Apr 14, 2025
9bd23a2
Attempting to install flang based off of LLVM action
CodeByDrescher Apr 15, 2025
f03b025
attempting to correct paths
CodeByDrescher Apr 15, 2025
370cec4
more debuging
CodeByDrescher Apr 15, 2025
8eaffb9
Reduce path-lengths in windows shell for conan
CodeByDrescher Apr 16, 2025
9594962
Attempting to remove boost
CodeByDrescher Apr 16, 2025
217e155
letting cmake find the fortran compiler on path.
CodeByDrescher Apr 16, 2025
063fbff
amending instructions to cibuildwheel
CodeByDrescher Apr 16, 2025
af2a257
tailoring Conan to generate compatible files
CodeByDrescher Apr 17, 2025
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
373 changes: 373 additions & 0 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,373 @@
name: "Build Wheels"

on:
workflow_dispatch:
pull_request:
push:
branches:
- master
release:
types:
- published

jobs:
build_wheels:
name: Build Python Wheels on ${{ matrix.os }} (for ${{ matrix.python_version }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
#os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-13, macos-14]
os: [windows-latest]
python_version: ["cp39-*", "cp310-*", "cp311-*", "cp312-*", "cp313-*"]
exclude:
- os: windows-latest
python_version: "cp39-*"
- os: windows-latest
python_version: "cp313-*"

steps:
- name: Checkout repository (for non-windows)
if: matrix.os != 'windows-latest'
uses: actions/checkout@v4
with:
submodules: true

# - name: Install Ubuntu Dependencies
# if: matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-24.04-arm'
# run: |
# sudo apt update
# sudo apt install -y wget gfortran cmake ninja-build libboost-all-dev libzip-dev libhdf5-dev libbz2-dev libssl-dev liblzma-dev
#
# # for some reason, there aren't headers included in libzip-dev???? so we're building from source!
# mkdir ../libzip-source
# wget https://libzip.org/download/libzip-1.11.3.tar.gz
# tar -xzvf libzip-1.11.3.tar.gz -C ../libzip-source
# cmake -S ../libzip-source/libzip-1.11.3 -B ../libzip-source/libzip-1.11.3/build -G Ninja
# cmake --build ../libzip-source/libzip-1.11.3/build
# sudo cmake --install ../libzip-source/libzip-1.11.3/build
# echo "Confirming header presence..."

- name: Install Intel MacOS Dependencies
if: matrix.os == 'macos-13'
shell: bash
run: |
brew install boost
brew install hdf5
brew install libzip
brew install ninja
brew install libaec

brew install llvm
echo 'export PATH="/usr/local/opt/llvm/bin:$PATH"' >> /Users/runner/.bash_profile
source /Users/runner/.bash_profile
ln -s $(which gfortran-14) /usr/local/bin/gfortran

- name: Install ARM MacOS dependencies
if: matrix.os == 'macos-14'
shell: bash
run: |
brew install boost
brew install hdf5
brew install libzip
brew install ninja
brew install libaec

brew install llvm
echo 'export PATH="/opt/homebrew/opt/llvm/bin:$PATH"' >> /Users/runner/.bash_profile
ln -s /opt/homebrew/bin/gfortran-14 /usr/local/bin/gfortran

# We're no longer using msys2, as it appears to not be able to give us native windows wheels.
# - name: Install Windows Dependencies
# if: matrix.os == 'windows-latest'
# run: |
# choco install msys2
# C:\tools\msys64\usr\bin\bash -lc "pacman -Sy --noconfirm \
# mingw-w64-clang-x86_64-cmake \
# mingw-w64-clang-x86_64-ninja \
# mingw-w64-clang-x86_64-toolchain \
# mingw-w64-clang-x86_64-boost \
# mingw-w64-clang-x86_64-hdf5 \
# mingw-w64-clang-x86_64-zlib \
# mingw-w64-clang-x86_64-libzip \
# mingw-w64-clang-x86_64-libaec"
# echo "C:\tools\msys64\clang64\bin" | Out-File -Append -Encoding ascii $env:GITHUB_PATH
# echo "C:\tools\msys64\clang64\lib" | Out-File -Append -Encoding ascii $env:GITHUB_PATH
# echo "C:\tools\msys64\clang64\include" | Out-File -Append -Encoding ascii $env:GITHUB_PATH

- name: Install Python for Windows (Python 3.9)
if: matrix.os == 'windows-latest' && matrix.python_version == 'cp39-*'
uses: actions/setup-python@v5
with:
python-version: '3.9'

- name: Install Python for Windows (Python 3.10)
if: matrix.os == 'windows-latest' && matrix.python_version == 'cp310-*'
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Install Python for Windows (Python 3.11)
if: matrix.os == 'windows-latest' && matrix.python_version == 'cp311-*'
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install Python for Windows (Python 3.12)
if: matrix.os == 'windows-latest' && matrix.python_version == 'cp312-*'
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install Python for Windows (Python 3.13)
if: matrix.os == 'windows-latest' && matrix.python_version == 'cp313-*'
uses: actions/setup-python@v5
with:
python-version: '3.13'

- name: Clean Windows Workspace
if: ${{ matrix.os == 'windows-latest'}}
run: Remove-Item * -Recurse -Force

- name: Install Windows Dependencies (Part 0a - Setup Flang Source Code)
if: ${{ matrix.os == 'windows-latest'}}
run: |
git clone --depth 1 https://github.com/flang-compiler/flang.git ${{ github.workspace }}
mv ${{ github.workspace }}/* ${{ github.workspace }}/..

- name: Install Windows Dependencies (Part 0b - Setup LLVM Build Env)
if: ${{ matrix.os == 'windows-latest'}}
uses: llvm/actions/setup-windows@main
with:
arch: amd64

- name: Install Windows Dependencies (Part 0c - Setup LLVM-style Ninja Build Env)
if: ${{ matrix.os == 'windows-latest'}}
uses: llvm/actions/setup-windows@main
with:
arch: amd64

- name: Install Windows Dependencies (Part 0d - Setup Graphviz for Doxygen)
if: ${{ matrix.os == 'windows-latest'}}
run: choco install graphviz wget

- name: Install Windows Dependencies (Part 0e - Setup Sphinx for Python)
if: ${{ matrix.os == 'windows-latest'}}
run: pip install sphinx

- name: Install Windows Dependencies (Part 0f - Download pre-built "cmade" LLVM)
run: |
cd ../..
# Search backwards in the workflow history for the specified branch
# for the first successful run that produced the desired artifact.
$build_name="llvm_build_win_amd64_clangcl_release_19x"
Invoke-WebRequest -Uri https://api.github.com/repos/flang-compiler/classic-flang-llvm-project/actions/workflows/pre-compile_llvm.yml/runs -OutFile llvm_runs.json
$urls = @($(jq -r --arg b release_19x '.workflow_runs[] | select(.head_branch == $b) | select (.conclusion == "success") | .artifacts_url?' llvm_runs.json))
Invoke-WebRequest "$(jq -r '.workflow_runs[0].artifacts_url?' llvm_runs.json)" -OutFile llvm_artifacts.json
for ($i = 0; $i -lt $urls.Count; $i++) {
$artifacts_url = $urls[$i]
Invoke-WebRequest -Uri "$artifacts_url" -OutFile llvm_artifacts.json
$archive_url = "$(jq -r --arg b $build_name '.artifacts[] | select(.name == $b) | .archive_download_url' llvm_artifacts.json)"
if (! $archive_url) {
Write-Output "$artifacts_url did not contain a $build_name archive; too old?"
continue
}
Write-Output "Downloading $archive_url."
$artifact_path = "$pwd\${build_name}.zip"
try {
$response = Invoke-WebRequest -Method Get -Uri $archive_url -OutFile $artifact_path -Headers @{ "Authorization" = "Bearer ${{ secrets.GITHUB_TOKEN }}" }
if ($response.StatusCode -lt 300) {
break
}
} catch {}
}
if (!(Test-Path "$artifact_path")) {
Write-Output "Could not download the correct prebuilt compiler; aborting."
exit 1
}
Expand-Archive -Force -Path "${build_name}.zip" -DestinationPath .
& 7z x "$pwd\llvm_build.7z" -o"$pwd\classic-flang-llvm-project\" -y
Write-Output "$(Get-ChildItem)"


- name: Install Windows Dependencies (Part 1a - Build Flang)
if: matrix.os == 'windows-latest'
shell: powershell
run: |
$pcount = $($(Get-WmiObject -class Win32_ComputerSystem).numberoflogicalprocessors)
python ..\scripts\build_flang.py -b "Release" -d build -t X86 -p "$(pwd)\..\..\classic-flang-llvm-project\classic-flang-llvm-project\build\" -j $pcount -v
$resolved = Resolve-Path "$(pwd)\..\..\classic-flang-llvm-project\classic-flang-llvm-project\build\bin\"
$resolved_path = $resolved.Path
$new_path = $resolved_path + ";" + [Environment]::GetEnvironmentVariable("GITHUB_PATH", "Machine")
$env:PATH = "$resolved_path;$env:PATH"
$resolved_path | Set-Content -Path $env:GITHUB_PATH
Write-Output "New GITHUB_PATH: "
Write-Output "$new_path"
[Environment]::SetEnvironmentVariable("GITHUB_PATH", "$new_path", "Machine")
flang --version

- name: Install Windows Dependencies (Part 2a - Reclean Windows Workspace)
if: ${{ matrix.os == 'windows-latest'}}
run: Remove-Item * -Recurse -Force

- name: Install Windows Dependencies (Part 2b - Setup Flang Source Code)
if: ${{ matrix.os == 'windows-latest'}}
uses: actions/checkout@v4

- name: Install Windows Dependencies (Part 2c - Configure Conan)
if: matrix.os == 'windows-latest'
shell: powershell
run: |
choco install conan -y
$conanDir = "C:\Program Files\Conan\conan"
$env:PATH = "$conanDir;$env:PATH"
$conanDir | Set-Content -Path $env:GITHUB_PATH
$env:CONAN_HOME = "C:\.conan"
"CONAN_HOME=C:\.conan" | Out-File -FilePath $env:GITHUB_ENV -Append
conan --version


- name: Install Windows Dependencies (Part 2d - Get Remaining Dependencies through Conan)
if: matrix.os == 'windows-latest'
run:
conan profile detect --force

conan install . --output-folder=build --build=missing -s compiler.cppstd=17 -s compiler=clang

- name: Build Wheels (Windows)
uses: pypa/[email protected]
if: matrix.os == 'windows-latest'
env:
CC: "clang"
CXX: "clang++"
FC: "flang"
CIBW_BUILD: ${{ matrix.python_version }}
CIBW_ARCHS_WINDOWS: "native"
CIBW_BEFORE_BUILD: "pip install cmake ninja"
CIBW_PYTHON_BIN: ${{ env.CUSTOM_PYTHON_BIN }}
CIBW_ENVIRONMENT: >
CC=clang
CXX=clang++
FC=flang
CMAKE_GENERATOR=Ninja
CMAKE_TOOLCHAIN_FILE=D:\\a\\vcell-fvsolver\\vcell-fvsolver\\build\\conan_toolchain.cmake

# with:
# package-dir: .
# output-dir: wheelhouse
# config-file: "{package}/pyproject.toml"

- name: Build Wheels (MacOS<x86_64>)
uses: pypa/[email protected]
if: matrix.os == 'macos-13'
env:
CIBW_BUILD: ${{ matrix.python_version }}
CIBW_ARCHES: "native"
CIBW_ENVIRONMENT: >
FC=/usr/local/bin/gfortran
MACOSX_DEPLOYMENT_TARGET="10.13"
# with:
# package-dir: .
# output-dir: wheelhouse
# config-file: "{package}/pyproject.toml"

- name: Build Wheels (MacOS<ARM>)
uses: pypa/[email protected]
if: matrix.os == 'macos-14'
env:
MACOSX_DEPLOYMENT_TARGET: 14.0
CIBW_BUILD: ${{ matrix.python_version }}
CIBW_ARCHES: "native"
CIBW_ENVIRONMENT: >
FC=/opt/homebrew/bin/gfortran-14
# with:
# package-dir: .
# output-dir: wheelhouse
# config-file: "{package}/pyproject.toml"

- name: Build Wheels (Linux<ARM>)
uses: pypa/[email protected]
if: matrix.os == 'ubuntu-24.04-arm'
env:
CIBW_BUILD: ${{ matrix.python_version }}
CIBW_SKIP: "*musllinux*"
CIBW_ARCHS_LINUX: "native"
CIBW_MANYLINUX_AARCH64_IMAGE: 'quay.io/pypa/manylinux_2_34_aarch64'
CIBW_REPAIR_WHEEL_COMMAND: 'auditwheel repair --disable-isa-ext-check {wheel} -w {dest_dir}'
CIBW_BEFORE_BUILD: "yum install -y wget boost-devel hdf5-devel zlib-devel libzip-devel bzip2-devel ninja-build openssl-devel xz-devel \
&& mkdir /xz_source \
&& wget https://github.com/tukaani-project/xz/releases/download/v5.8.1/xz-5.8.1.tar.gz \
&& tar -xzvf xz-5.8.1.tar.gz -C /xz_source \
&& cmake -S /xz_source/xz-5.8.1 -B /xz_source/xz-5.8.1/build \
&& cmake --build /xz_source/xz-5.8.1/build \
&& cmake --install /xz_source/xz-5.8.1/build \
&& pip install h5py"
# with:
# package-dir: .
# output-dir: wheelhouse
# config-file: "{package}/pyproject.toml"

- name: Build Wheels (Linux<x86_64>)
uses: pypa/[email protected]
if: matrix.os == 'ubuntu-latest'
env:
CIBW_BUILD: ${{ matrix.python_version }}
CIBW_SKIP: "*musllinux*"
CIBW_ARCHS_LINUX: "native"
CIBW_MANYLINUX_X86_64_IMAGE: 'quay.io/pypa/manylinux_2_34_x86_64'
CIBW_REPAIR_WHEEL_COMMAND: 'auditwheel repair --disable-isa-ext-check {wheel} -w {dest_dir}'
CIBW_BEFORE_BUILD: "yum install -y curl boost-devel hdf5-devel libzip-devel bzip2-devel ninja-build openssl-devel xz-devel \
&& pip install h5py \
"
# with:
# package-dir: .
# output-dir: wheelhouse
# config-file: "{package}/pyproject.toml"
# && mkdir /libzip_source \
# && curl -O https://libzip.org/download/libzip-1.11.3.tar.gz \
# && tar -xzvf libzip-1.11.3.tar.gz -C /libzip_source \
# && cmake -S ../libzip-source/libzip-1.11.3 -B ../libzip-source/libzip-1.11.3/build -G Ninja \
# && cmake --build ../libzip-source/libzip-1.11.3/build \
# && cmake --install ../libzip-source/libzip-1.11.3/build \
# && export LIBZIP_INCLUDE_DIR=/usr/local/include \
# && export LIBZIP_LIBRARY=/usr/local/lib/libzip.so

- name: Upload Artifact (Python 3.9)
uses: actions/upload-artifact@v4
if: matrix.python_version == 'cp39-*'
with:
name: pyvcell-fv-${{ matrix.os }}-cp39-cibw-wheels
path: ./wheelhouse/*.whl

- name: Upload Artifact (Python 3.10)
uses: actions/upload-artifact@v4
if: matrix.python_version == 'cp310-*'
with:
name: pyvcell-fv-${{ matrix.os }}-cp310-cibw-wheels
path: ./wheelhouse/*.whl

- name: Upload Artifact (Python 3.11)
uses: actions/upload-artifact@v4
if: matrix.python_version == 'cp311-*'
with:
name: pyvcell-fv-${{ matrix.os }}-cp311-cibw-wheels
path: ./wheelhouse/*.whl

- name: Upload Artifact (Python 3.12)
uses: actions/upload-artifact@v4
if: matrix.python_version == 'cp312-*'
with:
name: pyvcell-fv-${{ matrix.os }}-cp312-cibw-wheels
path: ./wheelhouse/*.whl

- name: Upload Artifact (Python 3.13)
uses: actions/upload-artifact@v4
if: matrix.python_version == 'cp313-*'
with:
name: pyvcell-fv-${{ matrix.os }}-cp313-cibw-wheels
path: ./wheelhouse/*.whl

- name: Setup tmate session on failure
uses: mxschmitt/action-tmate@v3
if: ${{ failure() }}
with:
limit-access-to-actor: true
Loading
Loading