Sped up Smoldyn suface and panel lookup with new c-safe Hashtable
#59
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | |
| 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 Windows Dependencies (Part 1 - Clang set-up) | |
| uses: KyleMayes/install-llvm-action@v2 | |
| if: matrix.os == 'windows-latest' # works on any OS, but we only need windows here(?) | |
| with: | |
| version: "19" | |
| env: true # Sets CC and CXX to clang variants | |
| - name: Install Windows Dependencies (Part 2 - Remainder) | |
| if: matrix.os == 'windows-latest' | |
| run: | | |
| choco install llvm ninja conan -y | |
| conan profile detect --force | |
| conan install . --output-folder=build --build=missing | |
| - name: Build Wheels (Windows) | |
| uses: pypa/cibuildwheel@v2.23.2 | |
| if: matrix.os == 'windows-latest' | |
| env: | |
| 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++ | |
| CMAKE_GENERATOR=Ninja | |
| # with: | |
| # package-dir: . | |
| # output-dir: wheelhouse | |
| # config-file: "{package}/pyproject.toml" | |
| - name: Build Wheels (MacOS<x86_64>) | |
| uses: pypa/cibuildwheel@v2.23.2 | |
| 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/cibuildwheel@v2.23.2 | |
| 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/cibuildwheel@v2.23.2 | |
| 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/cibuildwheel@v2.23.2 | |
| 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 |