Skip to content

Commit e29dcc0

Browse files
agriyakhetarpalkratman
authored andcommitted
Resolve broken scikits.odes installation on self-hosted M-series runner (#3785)
* Try fixing M-series runner tests This is being done by adding SuiteSparse and SUNDIALS installations which might have been missing on the runner, which broke `scikits.odes`. * Don't use Homebrew SUNDIALS, use LD_LIBRARY_PATH * Don't use Homebrew to install SUNDIALS * Force remove pip cache for `scikits.odes` --------- Co-authored-by: Eric G. Kratz <[email protected]>
1 parent e0ac58a commit e29dcc0

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

.github/workflows/run_periodic_tests.yml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -115,42 +115,54 @@ jobs:
115115
if: matrix.os == 'ubuntu-latest'
116116
run: python -m nox -s scripts
117117

118-
#M-series Mac Mini
118+
# M-series Mac Mini
119119
build-apple-mseries:
120120
if: github.repository_owner == 'pybamm-team'
121121
needs: style
122122
runs-on: [self-hosted, macOS, ARM64]
123123
env:
124124
GITHUB_PATH: ${PYENV_ROOT/bin:$PATH}
125+
LD_LIBRARY_PATH: $HOME/.local/lib
125126
strategy:
126127
fail-fast: false
127128
matrix:
128129
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
129130

130131
steps:
131132
- uses: actions/checkout@v4
132-
- name: Install python & create virtualenv
133+
- name: Install Python & create virtualenv
133134
shell: bash
134135
run: |
135136
eval "$(pyenv init -)"
136137
pyenv install ${{ matrix.python-version }} -s
137138
pyenv virtualenv ${{ matrix.python-version }} pybamm-${{ matrix.python-version }}
138139
139-
- name: Install dependencies & run unit tests for Windows and MacOS
140+
- name: Install build-time dependencies & run unit tests for M-series macOS runner
140141
shell: bash
142+
env:
143+
# Point scikits.odes to the correct SUNDIALS installation
144+
SUNDIALS_INST: $HOME/.local/lib
145+
# Homebrew environment variables
146+
HOMEBREW_NO_INSTALL_CLEANUP: 1
147+
NONINTERACTIVE: 1
141148
run: |
142149
eval "$(pyenv init -)"
143150
pyenv activate pybamm-${{ matrix.python-version }}
144-
python -m pip install --upgrade pip wheel setuptools nox
151+
python -m pip install --upgrade pip nox
152+
# Don't use Homebrew to install SUNDIALS because scikits.odes looks for
153+
# in Homebrew folders instead, which we don't want
154+
brew uninstall sundials --force
155+
pip cache remove scikits.odes
156+
python -m nox -s pybamm-requires -- --force
145157
python -m nox -s unit
146158
147-
- name: Run integration tests for Windows and MacOS
159+
- name: Run integration tests for M-series macOS runner
148160
run: |
149161
eval "$(pyenv init -)"
150162
pyenv activate pybamm-${{ matrix.python-version }}
151163
python -m nox -s integration
152164
153-
- name: Uninstall pyenv-virtualenv & python
165+
- name: Uninstall pyenv-virtualenv & Python
154166
if: always()
155167
shell: bash
156168
run: |

0 commit comments

Comments
 (0)