Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i3808 missing Fortran compiler config for macOS M1 runner #3811

Merged
merged 5 commits into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions .github/workflows/run_periodic_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
sudo apt install texlive-full

- name: Install macOS system dependencies
if: matrix.os == 'macos-latest'
if: matrix.os == 'macos-latest' || matrix.os == 'macos-14'
run: |
brew analytics off
brew install graphviz openblas libomp
Expand All @@ -88,6 +88,7 @@ jobs:
run: python -m pip install nox

- name: Install SuiteSparse and SUNDIALS on GNU/Linux and macOS
timeout-minutes: 10
agriyakhetarpal marked this conversation as resolved.
Show resolved Hide resolved
if: matrix.os != 'windows-latest'
run: python -m nox -s pybamm-requires

Expand Down Expand Up @@ -191,8 +192,10 @@ jobs:
python-version: "3.10"
- os: macos-14
python-version: "3.11"
- os: macos-14
python-version: "3.12"
# scikits.odes is not available on Python 3.12 yet
# See https://github.com/bmcage/odes/issues/162
# - os: macos-14
# python-version: "3.12"
fail-fast: false
name: Test pybamm_install_odes (${{ matrix.os }} / Python ${{ matrix.python-version }})

Expand All @@ -206,7 +209,7 @@ jobs:
sudo apt-get update
sudo apt-get install gfortran gcc libopenblas-dev
- name: Install macOS system dependencies
if: matrix.os == 'macos-latest'
if: matrix.os == 'macos-latest' || matrix.os == 'macos-14'
env:
# Homebrew environment variables
HOMEBREW_NO_INSTALL_CLEANUP: 1
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/test_on_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ jobs:
key: nox-${{ matrix.os }}-pybamm-requires-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/install_KLU_Sundials.py', '**/noxfile.py', '**/test_on_push.yml') }}

- name: Install SuiteSparse and SUNDIALS on GNU/Linux and macOS
timeout-minutes: 10
if: matrix.os != 'windows-latest'
run: python -m nox -s pybamm-requires

Expand Down Expand Up @@ -172,6 +173,7 @@ jobs:
key: nox-${{ matrix.os }}-pybamm-requires-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/install_KLU_Sundials.py', '**/noxfile.py', '**/test_on_push.yml') }}

- name: Install SuiteSparse and SUNDIALS on GNU/Linux
timeout-minutes: 10
run: python -m nox -s pybamm-requires

- name: Run unit tests for Ubuntu with Python 3.11 and generate coverage report
Expand Down Expand Up @@ -263,6 +265,7 @@ jobs:
key: nox-${{ matrix.os }}-pybamm-requires-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/install_KLU_Sundials.py', '**/noxfile.py', '**/test_on_push.yml') }}

- name: Install SuiteSparse and SUNDIALS on GNU/Linux and macOS
timeout-minutes: 10
if: matrix.os != 'windows-latest'
run: python -m nox -s pybamm-requires

Expand Down Expand Up @@ -363,6 +366,7 @@ jobs:
key: nox-${{ matrix.os }}-pybamm-requires-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/install_KLU_Sundials.py', '**/noxfile.py', '**/test_on_push.yml') }}

- name: Install SuiteSparse and SUNDIALS on GNU/Linux
timeout-minutes: 10
run: python -m nox -s pybamm-requires

- name: Run example notebooks tests for GNU/Linux with Python 3.12
Expand Down Expand Up @@ -417,6 +421,7 @@ jobs:
key: nox-${{ matrix.os }}-pybamm-requires-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/install_KLU_Sundials.py', '**/noxfile.py', '**/test_on_push.yml') }}

- name: Install SuiteSparse and SUNDIALS on GNU/Linux
timeout-minutes: 10
run: python -m nox -s pybamm-requires

- name: Run example scripts tests for GNU/Linux with Python 3.12
Expand Down
46 changes: 46 additions & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
PYBAMM_ENV = {
"SUNDIALS_INST": f"{homedir}/.local",
"LD_LIBRARY_PATH": f"{homedir}/.local/lib",
"PIP_NO_BINARY": "scikits.odes",
agriyakhetarpal marked this conversation as resolved.
Show resolved Hide resolved
}
VENV_DIR = Path("./venv").resolve()

Expand Down Expand Up @@ -68,6 +69,15 @@ def run_coverage(session):
if sys.version_info > (3, 12):
session.install("-e", ".[all,jax]", silent=False)
else:
session.run_always(
sys.executable,
"-m",
"pip",
"cache",
"remove",
"scikits.odes",
external=True,
)
agriyakhetarpal marked this conversation as resolved.
Show resolved Hide resolved
session.install("-e", ".[all,jax,odes]", silent=False)
else:
if sys.version_info < (3, 9):
Expand All @@ -91,6 +101,15 @@ def run_integration(session):
if sys.version_info > (3, 12):
session.install("-e", ".[all,jax]", silent=False)
else:
session.run_always(
sys.executable,
"-m",
"pip",
"cache",
"remove",
"scikits.odes",
external=True,
)
session.install("-e", ".[all,jax,odes]", silent=False)
else:
if sys.version_info < (3, 9):
Expand Down Expand Up @@ -123,6 +142,15 @@ def run_unit(session):
if sys.version_info > (3, 12):
session.install("-e", ".[all,jax]", silent=False)
else:
session.run_always(
sys.executable,
"-m",
"pip",
"cache",
"remove",
"scikits.odes",
external=True,
)
session.install("-e", ".[all,jax,odes]", silent=False)
else:
if sys.version_info < (3, 9):
Expand Down Expand Up @@ -180,6 +208,15 @@ def set_dev(session):
external=True,
)
else:
session.run_always(
sys.executable,
"-m",
"pip",
"cache",
"remove",
"scikits.odes",
external=True,
)
session.run(
python,
"-m",
Expand Down Expand Up @@ -224,6 +261,15 @@ def run_tests(session):
if sys.version_info > (3, 12):
session.install("-e", ".[all,jax]", silent=False)
else:
session.run_always(
sys.executable,
"-m",
"pip",
"cache",
"remove",
"scikits.odes",
external=True,
)
session.install("-e", ".[all,jax,odes]", silent=False)
else:
if sys.version_info < (3, 9):
Expand Down
Loading