Skip to content

Commit

Permalink
pybamm-team#3480 Install CMake alongside nox and skip `pybamm-req…
Browse files Browse the repository at this point in the history
…uires`
  • Loading branch information
agriyakhetarpal committed Dec 16, 2023
1 parent 36c7613 commit 2da613d
Showing 1 changed file with 22 additions and 14 deletions.
36 changes: 22 additions & 14 deletions .github/workflows/test_on_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,11 @@ jobs:
python-version: ${{ matrix.python-version }}
cache: 'pip'

- name: Install nox
run: python -m pip install nox
- name: Install nox and CMake
run: python -m pip install nox cmake

- name: Cache pybamm-requires nox environment for GNU/Linux and macOS
id: pybamm-requires
uses: actions/cache@v3
if: matrix.os != 'windows-latest'
with:
Expand All @@ -108,7 +109,7 @@ jobs:
key: nox-${{ matrix.os }}-pybamm-requires-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/install_KLU_Sundials.py', '**/noxfile.py') }}

- name: Install SuiteSparse and SUNDIALS on GNU/Linux and macOS
if: matrix.os != 'windows-latest'
if: matrix.os != 'windows-latest' && steps.pybamm-requires.outputs.cache-hit != 'true'
run: python -m nox -s pybamm-requires

- name: Run unit tests for ${{ matrix.os }} with Python ${{ matrix.python-version }}
Expand Down Expand Up @@ -147,10 +148,11 @@ jobs:
python-version: 3.11
cache: 'pip'

- name: Install nox
run: python -m pip install nox
- name: Install nox and CMake
run: python -m pip install nox cmake

- name: Cache pybamm-requires nox environment for GNU/Linux
id: pybamm-requires
uses: actions/cache@v3
with:
path: |
Expand All @@ -163,6 +165,7 @@ jobs:
key: nox-${{ matrix.os }}-pybamm-requires-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/install_KLU_Sundials.py', '**/noxfile.py') }}

- name: Install SuiteSparse and SUNDIALS on GNU/Linux
if: steps.pybamm-requires.outputs.cache-hit != 'true'
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 @@ -227,10 +230,11 @@ jobs:
python-version: ${{ matrix.python-version }}
cache: 'pip'

- name: Install nox
run: python -m pip install nox
- name: Install nox and CMake
run: python -m pip install nox cmake

- name: Cache pybamm-requires nox environment for GNU/Linux and macOS
id: pybamm-requires
uses: actions/cache@v3
if: matrix.os != 'windows-latest'
with:
Expand All @@ -244,7 +248,7 @@ jobs:
key: nox-${{ matrix.os }}-pybamm-requires-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/install_KLU_Sundials.py', '**/noxfile.py') }}

- name: Install SuiteSparse and SUNDIALS on GNU/Linux and macOS
if: matrix.os != 'windows-latest'
if: matrix.os != 'windows-latest' && steps.pybamm-requires.outputs.cache-hit != 'true'
run: python -m nox -s pybamm-requires

- name: Run integration tests for ${{ matrix.os }} with Python ${{ matrix.python-version }}
Expand All @@ -271,11 +275,11 @@ jobs:
execute_install_scripts: true

# dot -c is for registering graphviz fonts and plugins
- name: Install OpenBLAS and TeXLive for Linux
- name: Install TeXLive for Linux
run: |
sudo apt-get update
sudo dot -c
sudo apt-get install libopenblas-dev texlive-latex-extra dvipng
sudo apt-get install texlive-latex-extra dvipng
- name: Set up Python 3.11
id: setup-python
Expand Down Expand Up @@ -326,10 +330,11 @@ jobs:
python-version: 3.11
cache: 'pip'

- name: Install nox
run: python -m pip install nox
- name: Install nox and CMake
run: python -m pip install nox cmake

- name: Cache pybamm-requires nox environment for GNU/Linux
id: pybamm-requires
uses: actions/cache@v3
with:
path: |
Expand All @@ -342,6 +347,7 @@ jobs:
key: nox-${{ matrix.os }}-pybamm-requires-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/install_KLU_Sundials.py', '**/noxfile.py') }}

- name: Install SuiteSparse and SUNDIALS on GNU/Linux
if: steps.pybamm-requires.outputs.cache-hit != 'true'
run: python -m nox -s pybamm-requires

- name: Run example notebooks tests for GNU/Linux with Python 3.11
Expand Down Expand Up @@ -380,10 +386,11 @@ jobs:
python-version: 3.11
cache: 'pip'

- name: Install nox
run: python -m pip install nox
- name: Install nox and CMake
run: python -m pip install nox cmake

- name: Cache pybamm-requires nox environment for GNU/Linux
id: pybamm-requires
uses: actions/cache@v3
with:
path: |
Expand All @@ -396,6 +403,7 @@ jobs:
key: nox-${{ matrix.os }}-pybamm-requires-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/install_KLU_Sundials.py', '**/noxfile.py') }}

- name: Install SuiteSparse and SUNDIALS on GNU/Linux
if: steps.pybamm-requires.outputs.cache-hit != 'true'
run: python -m nox -s pybamm-requires

- name: Run example scripts tests for GNU/Linux with Python 3.11
Expand Down

0 comments on commit 2da613d

Please sign in to comment.