From 063a3830afd5547f7a78e283ae81058465cbdd3e Mon Sep 17 00:00:00 2001 From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com> Date: Tue, 30 Jan 2024 23:42:48 +0530 Subject: [PATCH] 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 --- .github/workflows/run_periodic_tests.yml | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/.github/workflows/run_periodic_tests.yml b/.github/workflows/run_periodic_tests.yml index 37969e38e3..89f5d94cb8 100644 --- a/.github/workflows/run_periodic_tests.yml +++ b/.github/workflows/run_periodic_tests.yml @@ -114,13 +114,14 @@ 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: @@ -128,28 +129,39 @@ jobs: 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: |