Skip to content

Commit

Permalink
Fix conda builds defaulting to python 3.12 (#315)
Browse files Browse the repository at this point in the history
* See if updating to setup-miniconda v3 fixes Windows build

* Use python 3.10 instead of 3.9 on Windows

* Explicitly install correct python version for linux & macos conda

* Fix version number should be a string

* Maybe the problem with adding conda to path for macos is lack of quotes?

* Add more echo statements for debugging macos

* Add more echo statements for debugging macos (try again)

* Install conda on macos since it is no longer included in image

* conda activate instead of mamba activate

* Run conda init before conda activate

* Have to restart shell after conda init

* Specify bash options to correctly activate on macos
  • Loading branch information
ethanbb authored Sep 3, 2024
1 parent c42c035 commit c995096
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/linux-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Install mamba
run: |
conda install -c conda-forge mamba
conda install -c conda-forge mamba python=3.10
conda clean -a
# - name: install caiman
Expand Down
31 changes: 10 additions & 21 deletions .github/workflows/macos-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,32 +16,21 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Set up Python '3.10'
uses: actions/setup-python@v3
- uses: conda-incubator/setup-miniconda@v3
with:
python-version: '3.10'
- 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
- name: Install mamba
run: |
conda install -c conda-forge mamba
conda clean -a
# - name: install caiman
# run: |
# mamba install -c conda-forge caiman
mamba-version: "*"
channels: conda-forge,defaults
channel-priority: true
activate-environment: mescore
environment-file: environment.yml

- name: install mesmerize-core
- name: Test mesmerize-core with pytest
shell: bash -el {0}
run: |
mamba env update -n base --file environment.yml
conda activate mescore
mamba install pytest
caimanmanager install
pip install .
- name: Test with pytest
run: |
mamba install pytest
DOWNLOAD_GROUND_TRUTHS=1 pytest -s .
4 changes: 2 additions & 2 deletions .github/workflows/windows-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jobs:
runs-on: "windows-latest"
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
- uses: conda-incubator/setup-miniconda@v3
with:
python-version: 3.9
python-version: '3.10'
mamba-version: "*"
channels: conda-forge,defaults
channel-priority: true
Expand Down

0 comments on commit c995096

Please sign in to comment.