-
-
Notifications
You must be signed in to change notification settings - Fork 566
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into expression-tree-typing
- Loading branch information
Showing
79 changed files
with
3,365 additions
and
179 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ jobs: | |
|
||
# use stable version for now to avoid breaking changes | ||
- name: Lychee URL checker | ||
uses: lycheeverse/[email protected].1 | ||
uses: lycheeverse/[email protected].3 | ||
with: | ||
# arguments with file types to check | ||
args: >- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,9 +46,21 @@ jobs: | |
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | ||
# Include macOS M1 runners | ||
include: | ||
- os: macos-14 | ||
python-version: "3.10" | ||
- os: macos-14 | ||
python-version: "3.11" | ||
- os: macos-14 | ||
python-version: "3.12" | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Check out PyBaMM repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
|
@@ -62,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 | ||
|
@@ -76,6 +88,7 @@ jobs: | |
run: python -m pip install nox | ||
|
||
- 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 | ||
|
||
|
@@ -89,7 +102,9 @@ jobs: | |
|
||
- name: Upload coverage report | ||
if: matrix.os == 'ubuntu-latest' && matrix.python-version == 3.11 | ||
uses: codecov/[email protected] | ||
uses: codecov/[email protected] | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
- name: Run integration tests | ||
run: python -m nox -s integration | ||
|
@@ -110,42 +125,54 @@ jobs: | |
if: matrix.os == 'ubuntu-latest' | ||
run: python -m nox -s scripts | ||
|
||
#M-series Mac Mini | ||
# M-series Mac Mini | ||
build-apple-mseries: | ||
if: github.repository_owner == 'pybamm-team' | ||
needs: style | ||
runs-on: [self-hosted, macOS, ARM64] | ||
env: | ||
GITHUB_PATH: ${PYENV_ROOT/bin:$PATH} | ||
LD_LIBRARY_PATH: $HOME/.local/lib | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install python & create virtualenv | ||
- name: Install Python & create virtualenv | ||
shell: bash | ||
run: | | ||
eval "$(pyenv init -)" | ||
pyenv install ${{ matrix.python-version }} -s | ||
pyenv virtualenv ${{ matrix.python-version }} pybamm-${{ matrix.python-version }} | ||
- name: Install dependencies & run unit tests for Windows and MacOS | ||
- name: Install build-time dependencies & run unit tests for M-series macOS runner | ||
shell: bash | ||
env: | ||
# Point scikits.odes to the correct SUNDIALS installation | ||
SUNDIALS_INST: $HOME/.local/lib | ||
# Homebrew environment variables | ||
HOMEBREW_NO_INSTALL_CLEANUP: 1 | ||
NONINTERACTIVE: 1 | ||
run: | | ||
eval "$(pyenv init -)" | ||
pyenv activate pybamm-${{ matrix.python-version }} | ||
python -m pip install --upgrade pip wheel setuptools nox | ||
python -m pip install --upgrade pip nox | ||
# Don't use Homebrew to install SUNDIALS because scikits.odes looks for | ||
# in Homebrew folders instead, which we don't want | ||
brew uninstall sundials --force | ||
pip cache remove scikits.odes | ||
python -m nox -s pybamm-requires -- --force | ||
python -m nox -s unit | ||
- name: Run integration tests for Windows and MacOS | ||
- name: Run integration tests for M-series macOS runner | ||
run: | | ||
eval "$(pyenv init -)" | ||
pyenv activate pybamm-${{ matrix.python-version }} | ||
python -m nox -s integration | ||
- name: Uninstall pyenv-virtualenv & python | ||
- name: Uninstall pyenv-virtualenv & Python | ||
if: always() | ||
shell: bash | ||
run: | | ||
|
@@ -159,8 +186,18 @@ jobs: | |
matrix: | ||
os: [ubuntu-latest, macos-latest] | ||
python-version: ["3.8", "3.9", "3.10", "3.11"] | ||
# Include macOS M1 runners | ||
include: | ||
- os: macos-14 | ||
python-version: "3.10" | ||
- os: macos-14 | ||
python-version: "3.11" | ||
# 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 on ${{ matrix.os }} | ||
name: Test pybamm_install_odes (${{ matrix.os }} / Python ${{ matrix.python-version }}) | ||
|
||
steps: | ||
- name: Check out PyBaMM repository | ||
|
@@ -172,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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,6 +43,14 @@ jobs: | |
exclude: | ||
- os: ubuntu-latest | ||
python-version: "3.11" | ||
# Include macOS M1 runners | ||
include: | ||
- os: macos-14 | ||
python-version: "3.10" | ||
- os: macos-14 | ||
python-version: "3.11" | ||
- os: macos-14 | ||
python-version: "3.12" | ||
name: Unit tests (${{ matrix.os }} / Python ${{ matrix.python-version }}) | ||
|
||
steps: | ||
|
@@ -51,7 +59,7 @@ jobs: | |
|
||
# Install and cache apt packages | ||
- name: Install Linux system dependencies | ||
uses: awalsh128/cache-apt-pkgs-action@v1.3.1 | ||
uses: awalsh128/cache-apt-pkgs-action@v1.4.1 | ||
if: matrix.os == 'ubuntu-latest' | ||
with: | ||
packages: gfortran gcc graphviz pandoc | ||
|
@@ -66,7 +74,7 @@ jobs: | |
sudo apt-get install libopenblas-dev texlive-latex-extra dvipng | ||
- 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 | ||
|
@@ -108,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 | ||
|
||
|
@@ -129,7 +138,7 @@ jobs: | |
|
||
# Install and cache apt packages | ||
- name: Install Linux system dependencies | ||
uses: awalsh128/cache-apt-pkgs-action@v1.3.1 | ||
uses: awalsh128/cache-apt-pkgs-action@v1.4.1 | ||
with: | ||
packages: gfortran gcc graphviz pandoc | ||
execute_install_scripts: true | ||
|
@@ -164,13 +173,16 @@ 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 | ||
run: python -m nox -s coverage | ||
|
||
- name: Upload coverage report | ||
uses: codecov/[email protected] | ||
uses: codecov/[email protected] | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
run_integration_tests: | ||
needs: style | ||
|
@@ -180,6 +192,14 @@ jobs: | |
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | ||
# Include macOS M1 runners | ||
include: | ||
- os: macos-14 | ||
python-version: "3.10" | ||
- os: macos-14 | ||
python-version: "3.11" | ||
- os: macos-14 | ||
python-version: "3.12" | ||
name: Integration tests (${{ matrix.os }} / Python ${{ matrix.python-version }}) | ||
|
||
steps: | ||
|
@@ -188,7 +208,7 @@ jobs: | |
|
||
# Install and cache apt packages | ||
- name: Install Linux system dependencies | ||
uses: awalsh128/cache-apt-pkgs-action@v1.3.1 | ||
uses: awalsh128/cache-apt-pkgs-action@v1.4.1 | ||
if: matrix.os == 'ubuntu-latest' | ||
with: | ||
packages: gfortran gcc graphviz pandoc | ||
|
@@ -203,7 +223,7 @@ jobs: | |
sudo apt-get install libopenblas-dev texlive-latex-extra dvipng | ||
- 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 | ||
|
@@ -245,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 | ||
|
||
|
@@ -268,7 +289,7 @@ jobs: | |
|
||
# Install and cache apt packages | ||
- name: Install Linux system dependencies | ||
uses: awalsh128/cache-apt-pkgs-action@v1.3.1 | ||
uses: awalsh128/cache-apt-pkgs-action@v1.4.1 | ||
with: | ||
packages: graphviz pandoc | ||
execute_install_scripts: true | ||
|
@@ -310,7 +331,7 @@ jobs: | |
|
||
# Install and cache apt packages | ||
- name: Install Linux system dependencies | ||
uses: awalsh128/cache-apt-pkgs-action@v1.3.1 | ||
uses: awalsh128/cache-apt-pkgs-action@v1.4.1 | ||
with: | ||
packages: gfortran gcc graphviz pandoc | ||
execute_install_scripts: true | ||
|
@@ -345,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 | ||
|
@@ -364,7 +386,7 @@ jobs: | |
|
||
# Install and cache apt packages | ||
- name: Install Linux system dependencies | ||
uses: awalsh128/cache-apt-pkgs-action@v1.3.1 | ||
uses: awalsh128/cache-apt-pkgs-action@v1.4.1 | ||
with: | ||
packages: gfortran gcc graphviz | ||
execute_install_scripts: true | ||
|
@@ -399,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 | ||
|
Oops, something went wrong.