Skip to content

Commit db5f0ee

Browse files
authored
Merge branch 'main' into feat/wheelImprovements
2 parents ced8760 + 8a99bfc commit db5f0ee

File tree

4 files changed

+27
-8
lines changed

4 files changed

+27
-8
lines changed

.github/workflows/build_wheels.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ jobs:
208208
python install_KLU_Sundials.py
209209
python -m cibuildwheel --output-dir wheelhouse
210210
env:
211-
# 10.13 for Intel (macos-12/macos-13), 11.0 for Apple Silicon (macos-14 and macos-latest)
211+
# 10.13 for Intel (macos-13), 11.0 for Apple Silicon (macos-14 and macos-latest)
212212
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.os == 'macos-14' && '11.0' || '10.13' }}
213213
CIBW_ARCHS_MACOS: auto
214214
CIBW_BEFORE_BUILD: python -m pip install cmake casadi setuptools wheel delocate
@@ -253,7 +253,7 @@ jobs:
253253
if-no-files-found: error
254254

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

281281
- name: Publish to PyPI
282-
if: github.event_name == 'release'
283282
uses: pypa/gh-action-pypi-publish@release/v1
284283
with:
285284
packages-dir: artifacts/

.github/workflows/unit_tests.yml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,42 @@ concurrency:
1111

1212
jobs:
1313
pytest:
14-
runs-on: ubuntu-latest
14+
runs-on: ${{ matrix.os }}
1515
strategy:
16+
fail-fast: false
1617
matrix:
17-
python-version: ["3.11"]
18+
os: [ ubuntu-latest, macos-13, macos-latest]
19+
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
1820

1921
steps:
2022
- uses: actions/checkout@v4
2123
with:
2224
submodules: 'true'
25+
2326
- name: Set up Python ${{ matrix.python-version }}
2427
uses: actions/setup-python@v4
2528
with:
2629
python-version: ${{ matrix.python-version }}
27-
- name: Install dependencies
30+
31+
- name: Install dependencies (Linux)
32+
if: matrix.os == 'ubuntu-latest'
2833
run: |
2934
sudo apt-get install gfortran gcc libopenblas-dev
3035
pip install nox
3136
37+
- name: Install dependencies (MacOs)
38+
if: matrix.os == 'macos-13' || matrix.os == 'macos-latest'
39+
env:
40+
HOMEBREW_NO_INSTALL_CLEANUP: 1
41+
HOMEBREW_NO_AUTO_UPDATE: 1
42+
HOMEBREW_NO_COLOR: 1
43+
NONINTERACTIVE: 1
44+
run: |
45+
brew analytics off
46+
brew install libomp
47+
brew reinstall gcc
48+
pip install nox
49+
3250
- name: Build and test
3351
run: |
3452
nox

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ dependencies = [
2525
[project.optional-dependencies]
2626
dev = [
2727
"pytest",
28+
"setuptools",
29+
"wheel",
2830
]
2931

3032
[tool.setuptools.packages.find]

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ def move_output(self, ext):
180180

181181

182182
class CustomInstall(install):
183-
"""A custom install command to add 2 build options"""
183+
"""A custom installation command to add 2 build options"""
184184

185185
user_options = [
186186
*install.user_options,
@@ -208,7 +208,7 @@ def run(self):
208208

209209

210210
class bdist_wheel(orig.bdist_wheel):
211-
"""A custom install command to add 2 build options"""
211+
"""A custom installation command to add 2 build options"""
212212

213213
user_options = [
214214
*orig.bdist_wheel.user_options,

0 commit comments

Comments
 (0)