Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
lpossner committed Jul 17, 2024
2 parents 1ff0c3a + b70fb19 commit e9e9b37
Show file tree
Hide file tree
Showing 6 changed files with 274 additions and 207 deletions.
254 changes: 155 additions & 99 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,100 +6,8 @@ on:
pull_request:
branches: [ master, develop ]
jobs:
# linux:
# runs-on: ubuntu-latest
# strategy:
# matrix:
# python-version: ["3.9", "3.10", "3.11", "3.12"]
# include:
# - python-version: "3.9"
# cibw-string: "cp39-*"
# - python-version: "3.10"
# cibw-string: "cp310-*"
# - python-version: "3.11"
# cibw-string: "cp311-*"
# - python-version: "3.12"
# cibw-string: "cp312-*"
# steps:
# - uses: actions/checkout@v2
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v1
# with:
# python-version: ${{ matrix.python-version }}
# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# pip install Cython cibuildwheel twine
# pip install -r requirements.txt
# pip install .
# - name: Test with unittest
# run: |
# cd tests
# python -m unittest
# cd ..
# - name: Build with cibuildwheel
# run: |
# python -m cibuildwheel --output-dir wheelhouse
# ls wheelhouse/
# env:
# CIBW_MANYLINUX_X86_64_IMAGE: "manylinux2014"
# CIBW_BEFORE_BUILD: "pip install numpy"
# CIBW_BUILD: ${{ matrix.cibw-string }}
# CIBW_SKIP: "*-musllinux_* *i686*"
# - name: Upload with twine
# if: "contains(github.event.head_commit.message, 'PyPI')"
# run: |
# python -m twine upload wheelhouse/*.whl
# env:
# TWINE_PASSWORD: ${{ secrets.twine_api_key }}
# TWINE_USERNAME: __token__
# windows:
# runs-on: windows-2019
# strategy:
# matrix:
# python-version: ["3.9", "3.10", "3.11", "3.12"]
# include:
# - python-version: "3.9"
# cibw-string: "cp39-*"
# - python-version: "3.10"
# cibw-string: "cp310-*"
# - python-version: "3.11"
# cibw-string: "cp311-*"
# - python-version: "3.12"
# cibw-string: "cp312-*"
# steps:
# - uses: actions/checkout@v2
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v1
# with:
# python-version: ${{ matrix.python-version }}
# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# pip install Cython cibuildwheel twine
# pip install -r requirements.txt
# pip install .
# - name: Test with unittest
# run: |
# cd tests
# python -m unittest
# cd ..
# - name: Build with cibuildwheel
# run: |
# python -m cibuildwheel --output-dir wheelhouse
# ls wheelhouse/
# env:
# CIBW_BEFORE_BUILD: "pip install numpy"
# CIBW_BUILD: ${{ matrix.cibw-string }}
# - name: Upload with twine
# if: "contains(github.event.head_commit.message, 'PyPI')"
# run: |
# python -m twine upload wheelhouse/*.whl
# env:
# TWINE_PASSWORD: ${{ secrets.twine_api_key }}
# TWINE_USERNAME: __token__
macos:
runs-on: macos-11
linux:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
Expand All @@ -113,9 +21,101 @@ jobs:
- python-version: "3.12"
cibw-string: "cp312-*"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install Cython cibuildwheel twine
pip install -r requirements.txt
pip install .
- name: Test with unittest
run: |
cd tests
python -m unittest
cd ..
- name: Build with cibuildwheel
run: |
python -m cibuildwheel --output-dir wheelhouse
ls wheelhouse/
env:
CIBW_MANYLINUX_X86_64_IMAGE: "manylinux2014"
CIBW_BEFORE_BUILD: "pip install numpy"
CIBW_BUILD: ${{ matrix.cibw-string }}
CIBW_SKIP: "*-musllinux_* *i686*"
- name: Upload with twine
if: "contains(github.event.head_commit.message, 'PyPI')"
run: |
python -m twine upload wheelhouse/*.whl
env:
TWINE_PASSWORD: ${{ secrets.twine_api_key }}
TWINE_USERNAME: __token__
windows:
runs-on: windows-2019
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
include:
- python-version: "3.9"
cibw-string: "cp39-*"
- python-version: "3.10"
cibw-string: "cp310-*"
- python-version: "3.11"
cibw-string: "cp311-*"
- python-version: "3.12"
cibw-string: "cp312-*"
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install Cython cibuildwheel twine
pip install -r requirements.txt
pip install .
- name: Test with unittest
run: |
cd tests
python -m unittest
cd ..
- name: Build with cibuildwheel
run: |
python -m cibuildwheel --output-dir wheelhouse
ls wheelhouse/
env:
CIBW_BEFORE_BUILD: "pip install numpy"
CIBW_BUILD: ${{ matrix.cibw-string }}
- name: Upload with twine
if: "contains(github.event.head_commit.message, 'PyPI')"
run: |
python -m twine upload wheelhouse/*.whl
env:
TWINE_PASSWORD: ${{ secrets.twine_api_key }}
TWINE_USERNAME: __token__
macos_arm64:
runs-on: macos-14
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
include:
- python-version: "3.9"
cibw-string: "cp39-*"
- python-version: "3.10"
cibw-string: "cp310-*"
- python-version: "3.11"
cibw-string: "cp311-*"
- python-version: "3.12"
cibw-string: "cp312-*"
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -135,9 +135,65 @@ jobs:
python -m cibuildwheel --output-dir wheelhouse
ls wheelhouse/
env:
MACOSX_DEPLOYMENT_TARGET: "10.12"
CIBW_BEFORE_BUILD: "pip install numpy"
# CIBW_ARCHS_MACOS: x86_64
MACOSX_DEPLOYMENT_TARGET: "10.14"
CIBW_BEFORE_BUILD: "pip install numpy delocate==0.10.7"
CIBW_BUILD: ${{ matrix.cibw-string }}
CIBW_REPAIR_WHEEL_COMMAND: "delocate-listdeps {wheel} && delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}"
CC: gcc-13
CXX: g++-13
- name: Upload with twine
if: "contains(github.event.head_commit.message, 'PyPI')"
run: |
python -m twine upload wheelhouse/*.whl
env:
TWINE_PASSWORD: ${{ secrets.twine_api_key }}
TWINE_USERNAME: __token__
macos_x86_64:
runs-on: macos-13
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
include:
- python-version: "3.9"
cibw-string: "cp39-*"
- python-version: "3.10"
cibw-string: "cp310-*"
- python-version: "3.11"
cibw-string: "cp311-*"
- python-version: "3.12"
cibw-string: "cp312-*"
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
brew install gcc@13
python -m pip install --upgrade pip
pip install Cython matplotlib seaborn cibuildwheel twine
pip install -r requirements.txt
CC=gcc-13 CXX=g++-13 pip install .
- name: Install dependencies
run: |
brew install gcc@13
python -m pip install --upgrade pip
pip install Cython matplotlib seaborn cibuildwheel twine
pip install -r requirements.txt
CC=gcc-13 CXX=g++-13 pip install .
- name: Test with unittest
run: |
cd tests
python -m unittest
cd ..
- name: Build with cibuildwheel
run: |
python -m cibuildwheel --output-dir wheelhouse
ls wheelhouse/
env:
MACOSX_DEPLOYMENT_TARGET: "10.13"
CIBW_BEFORE_BUILD: "pip install numpy delocate==0.10.7"
CIBW_BUILD: ${{ matrix.cibw-string }}
CIBW_REPAIR_WHEEL_COMMAND: "delocate-listdeps {wheel} && delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}"
CC: gcc-13
Expand Down
19 changes: 11 additions & 8 deletions build_pygpc_extensions_cuda.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,21 @@


def build_pygpc_extensions_cuda():
ext_prefix = sysconfig.get_config_var('EXT_SUFFIX').split('.')
ext_prefix = sysconfig.get_config_var("EXT_SUFFIX").split(".")
ext_prefix = ext_prefix[1]
configure_command = ['cmake', '-B'+os.path.join('build', 'pygpc_extensions_cuda'),
'-H'+os.path.join('pckg','pygpc_extensions_cuda'),
'-DPROJECT_ROOT_PATH='+os.getcwd(),
'-DNumPy_INCLUDE_DIRS='+np.get_include(),
'-DEXT_PREFIX='+ext_prefix]
configure_command = [
"cmake",
"-B" + os.path.join("build", "pygpc_extensions_cuda"),
"-H" + os.path.join("pckg", "pygpc_extensions_cuda"),
"-DPROJECT_ROOT_PATH=" + os.getcwd(),
"-DNumPy_INCLUDE_DIRS=" + np.get_include(),
"-DEXT_PREFIX=" + ext_prefix,
]
subprocess.run(configure_command)
build_commad = ['cmake', '--build', os.path.join('build', 'pygpc_extensions_cuda')]
build_commad = ["cmake", "--build", os.path.join("build", "pygpc_extensions_cuda")]
print(build_commad)
subprocess.run(build_commad)


if __name__ == '__main__':
if __name__ == "__main__":
build_pygpc_extensions_cuda()
2 changes: 1 addition & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# -- Project information -----------------------------------------------------

project = u'pygpc'
copyright = u'2023, Konstantin Weise'
copyright = u'2024, Konstantin Weise'
author = u'Konstantin Weise'

# The short X.Y version
Expand Down
Loading

0 comments on commit e9e9b37

Please sign in to comment.