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

[MAIN] Fix CI conda runner #598

Merged
merged 2 commits into from
Oct 24, 2023
Merged
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
39 changes: 22 additions & 17 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ jobs:
matrix:
# OS [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest]
python-version: [3.9]

# do not cancel all in-progress jobs if any matrix job fails
fail-fast: false
Expand All @@ -324,32 +325,36 @@ jobs:

key: ${{ runner.os }}-pip-${{hashFiles('requirements/environment-tests.yml') }}-${{ hashFiles('**/CI.yml') }}-${{ steps.date.outputs.date }}

- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- uses: conda-incubator/setup-miniconda@3b0f2504dd76ef23b6d31f291f4913fb60ab5ff3 # corresponds to v2.2.0
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
activate-environment: elephant
environment-file: requirements/environment-tests.yml
auto-activate-base: false
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!

- name: Install dependencies
shell: bash -l {0}
run: |
conda config --add channels conda-forge # bugfix with scipy==1.8.1: libstdcxx-ng 12.1.0 required
conda update conda
conda install -c conda-forge libstdcxx-ng=12 # fix libstdc++.so.6: version for new scipy versions > 1.9.1
conda env update --file requirements/environment-tests.yml --name base
activate base
conda install -c conda-forge openmpi
pip install -r requirements/requirements-tests.txt
pip install pytest
pip install pytest-cov coveralls
pip install .
python --version
conda env list
conda install mpi4py openmpi
conda install pytest
conda install pytest-cov coveralls
pip install -e .

- name: List packages
shell: bash -l {0}
run: |
activate base
pip list
conda list
python --version

- name: Test with pytest
shell: bash -l {0}
run: |
activate base
pytest --cov=elephant --import-mode=importlib
pytest --cov=elephant

# ____
# | _ \ ___ ___ ___
Expand Down
Loading