Skip to content

Commit

Permalink
Merge branch 'main' into feat/wheelImprovements
Browse files Browse the repository at this point in the history
  • Loading branch information
kratman authored Oct 17, 2024
2 parents ced8760 + 8a99bfc commit db5f0ee
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 8 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ jobs:
python install_KLU_Sundials.py
python -m cibuildwheel --output-dir wheelhouse
env:
# 10.13 for Intel (macos-12/macos-13), 11.0 for Apple Silicon (macos-14 and macos-latest)
# 10.13 for Intel (macos-13), 11.0 for Apple Silicon (macos-14 and macos-latest)
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.os == 'macos-14' && '11.0' || '10.13' }}
CIBW_ARCHS_MACOS: auto
CIBW_BEFORE_BUILD: python -m pip install cmake casadi setuptools wheel delocate
Expand Down Expand Up @@ -253,7 +253,7 @@ jobs:
if-no-files-found: error

publish_pypi:
if: github.repository == 'pybamm-team/pybammsolvers'
if: ${{ github.event_name == 'release' && github.repository == 'pybamm-team/pybammsolvers' }}
name: Upload package to PyPI
needs: [
build_manylinux_wheels,
Expand All @@ -279,7 +279,6 @@ jobs:
run: ls -lA artifacts/

- name: Publish to PyPI
if: github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: artifacts/
24 changes: 21 additions & 3 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,42 @@ concurrency:

jobs:
pytest:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.11"]
os: [ ubuntu-latest, macos-13, macos-latest]
python-version: [ "3.9", "3.10", "3.11", "3.12" ]

steps:
- uses: actions/checkout@v4
with:
submodules: 'true'

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies

- name: Install dependencies (Linux)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get install gfortran gcc libopenblas-dev
pip install nox
- name: Install dependencies (MacOs)
if: matrix.os == 'macos-13' || matrix.os == 'macos-latest'
env:
HOMEBREW_NO_INSTALL_CLEANUP: 1
HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_NO_COLOR: 1
NONINTERACTIVE: 1
run: |
brew analytics off
brew install libomp
brew reinstall gcc
pip install nox
- name: Build and test
run: |
nox
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ dependencies = [
[project.optional-dependencies]
dev = [
"pytest",
"setuptools",
"wheel",
]

[tool.setuptools.packages.find]
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def move_output(self, ext):


class CustomInstall(install):
"""A custom install command to add 2 build options"""
"""A custom installation command to add 2 build options"""

user_options = [
*install.user_options,
Expand Down Expand Up @@ -208,7 +208,7 @@ def run(self):


class bdist_wheel(orig.bdist_wheel):
"""A custom install command to add 2 build options"""
"""A custom installation command to add 2 build options"""

user_options = [
*orig.bdist_wheel.user_options,
Expand Down

0 comments on commit db5f0ee

Please sign in to comment.