Skip to content

Commit

Permalink
improvements from wisdem
Browse files Browse the repository at this point in the history
  • Loading branch information
gbarter committed May 22, 2024
1 parent fccecbe commit d300792
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 11 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/CI_pyHAMS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,15 @@ jobs:
mingw-w64-x86_64-gcc-fortran
mingw-w64-x86_64-openblas
mingw-w64-x86_64-openblas64
mingw-w64-x86_64-lapack
mingw-w64-x86_64-lapack64
- name: Set compilers
if: contains( matrix.os, 'windows')
run: |
mv C:\\Strawberry\\perl\\bin\\pkg-config.BAT C:\\Strawberry\\perl\\bin\\old-pkg-config.old
mv C:\\Strawberry\\perl\\bin\\pkg-config C:\\Strawberry\\perl\\bin\\old-pkg-config
export PATH=/c/msys64/mingw64/bin:$PATH
export PATH=C:\\msys64\mingw64\bin:$PATH
- name: checkout repository
Expand All @@ -61,7 +63,7 @@ jobs:
run: |
#export PKG_CONFIG_PATH="/usr/local/opt/openblas/lib/pkgconfig:$PKG_CONFIG_PATH"
#sudo ln -s /usr/local/opt/openblas/lib/libopenblas* /usr/local/lib/
brew install openblas libomp
brew install openblas libomp lapack blis
brew reinstall gcc
- name: Linux openblas
Expand Down
39 changes: 33 additions & 6 deletions .github/workflows/Publish_pyHAMS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-13, macos-14]
os: [ubuntu-latest, windows-latest, macos-12, macos-13, macos-14]

steps:
- name: Setup GNU Fortran
Expand All @@ -34,21 +34,48 @@ jobs:
install: |
mingw-w64-x86_64-gcc
mingw-w64-x86_64-gcc-fortran
mingw-w64-openblas
mingw-w64-x86_64-openblas
mingw-w64-x86_64-openblas64
mingw-w64-x86_64-lapack
mingw-w64-x86_64-lapack64
- name: Checkout
uses: actions/checkout@v4

- name: Build wheels mac and linux
if: false == contains( matrix.os, 'windows')
uses: pypa/[email protected]
- name: Build wheels linux
if: contains( matrix.os, 'ubuntu')
uses: pypa/[email protected]
env:
CC: ${{ steps.install_cc.outputs.cc }}
CXX: ${{ steps.install_cc.outputs.cxx }}

- name: Build wheels mac-12
if: contains( matrix.os, 'macos-12')
uses: pypa/[email protected]
env:
CC: ${{ steps.install_cc.outputs.cc }}
CXX: ${{ steps.install_cc.outputs.cxx }}
CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET="12.0"

- name: Build wheels mac-13
if: contains( matrix.os, 'macos-13')
uses: pypa/[email protected]
env:
CC: ${{ steps.install_cc.outputs.cc }}
CXX: ${{ steps.install_cc.outputs.cxx }}
CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET="13.0"

- name: Build wheels mac-14
if: contains( matrix.os, 'macos-14')
uses: pypa/[email protected]
env:
CC: ${{ steps.install_cc.outputs.cc }}
CXX: ${{ steps.install_cc.outputs.cxx }}
CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET="14.0"

- name: Build wheels windows
if: contains( matrix.os, 'windows')
uses: pypa/cibuildwheel@v2.17.0
uses: pypa/cibuildwheel@v2.18.1

- uses: actions/upload-artifact@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ else
endif

# Need lapack via OpenBlas preferably
lapack = dependency('openblas', ['mkl', 'mkl_rt', 'mkl-sdl'], 'lapack', 'blas', 'accelerate', required: true)
lapack = dependency('openblas', ['mkl', 'mkl_rt', 'mkl-sdl'], 'lapack', 'blis', 'blas', 'accelerate', required: true)

# https://mesonbuild.com/Python-module.html
# Here we differentiate from the python used by meson, py3_command, and that python target, py3_target. This is useful
Expand Down
6 changes: 4 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ atomic = true

[tool.cibuildwheel]
skip = ["pp*", "cp36-*", "cp37-*", "cp38-*", "*-win32", "*-win_arm64"] #, "*-musllinux*"]
build-frontend = { name = "build", args = ["-w","-n","-x"] }
build-frontend = { name = "build", args = ["-w","-n"] }
before-build = "pip install numpy ninja meson meson-python"
build-verbosity = "3"

Expand All @@ -146,8 +146,10 @@ environment = { PKG_CONFIG_PATH="c:/opt/64/lib/pkgconfig" }
[tool.cibuildwheel.windows]
repair-wheel-command = "bash .github/tools/cibw_repair_wheel_command_windows.sh {wheel} {dest_dir}"

# On an Linux Intel runner with qemu installed, build Intel and ARM wheels (aarch64) for Docker. Ignoring: ppc64le s390x
[tool.cibuildwheel.linux]
archs = ["auto", "aarch64"]
before-all = "yum install -y lapack lapack-devel blas blas-devel lapack64 lapack64-devel blas64 blas64-devel"

[tool.cibuildwheel.macos]
before-all = "brew install openblas"
before-all = "brew install openblas blis lapack"

0 comments on commit d300792

Please sign in to comment.