-
Notifications
You must be signed in to change notification settings - Fork 68
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
Support for "conda-devenv" extension #185
Comments
With the current code, I believe you could get it working with two steps:
To provide native support in the tool we would need to add a new keyword ( |
I think the previous suggestion is the path forward for us here (use
setup-miniconda, then insert-your-tool-here). This clearly separates the
problem of "get non-ancient conda" from "do stuff (with conda)"... And
would allow you to swap out for, say provision-micromamva
If you can lobby conda+mamba to support your file format (good luck) I'm
all for it!
nox, anaconda-project, etc. have all been used successfully with this
action, and with infinite maintainer time, I could imagine supporting all
of them... But as that isn't the case...
|
Hey, thanks for the prompt response. Most of the problem is the activation of the environment. I tried to create a minimal I assume it's an issue with the login shells, that it won't happen within the action. |
A reproducer would help, but there's an example of using - uses: conda-incubator/setup-miniconda@v2
with:
auto-activate-base: true
activate-environment: "" I don't remember if that will work with |
Thank you, people. You pointed me in the right direction about activating the environment. UpdatesConda installation ran with the environment name only: # workflow.yml
...
- id: setup-python
if: ${{ steps.detect-language-and-version.outputs.language == 'python' }}
name: Setup Python environment
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: ${{ steps.configure.outputs.environment-name }}
... Prior to this, I created a dummy # dummy environment.yml.j2 > environment.yml
name: {{ service-name }}
channels:
- conda-forge
- defaults The What I do next is to install .ONESHELL:
SHELL=/bin/bash
.PHONY: install
install:
conda update -n base -c defaults conda
conda install conda-devenv -c conda-forge -y
conda devenv
echo "${CONDA}/envs/${ENV_NAME}/envs/${ENV_NAME}/bin" >> ${GITHUB_PATH} At this step, As I try to keep ...
- id: install
name: Install
shell: bash -l {0}
run: |
make install
... I don't need to activate the environment since it's already done and it's being updated by this command from > Executing: conda env update --file /home/runner/work/......./a-simple-service/environment.yml --prune Thanks again for this action. |
Nice! Thanks for the detailed overview! |
I've been using this action for some time to setup GH CI for both projects with full meta.yaml as well as projects with a conda-devenv file (if at all possible, across all the GH runner platforms, etc). Both types of conda env files used to work, but recently conda-devenv started failing on windows just like issue #9 I tried various suggested (action) config options but the previously documented setup with I could really use some suggestions here; if it's possible to just activate base (using the action) and then run shell commands to generate/activate conda-devenv I could work with that. The latest failed action and yaml config can be seen here: https://github.com/berkeley-abc/abc/actions/runs/7082648502 Thanks in advance for any suggestions. |
Aaand I reverted some previous change bits and managed to get the environment activated manually and this works now across all the runners:
Thanks! |
First of all, I'd like to thank you guys for this awesome project! 🚀
Background
The
conda-devenv
extension adds the ability to work with multiple projects in development mode, by processingenvironment.devenv.yml
files, similar to regularenvironment.yml
files, with features like Jinja2 templating, files inclusion, and environment variables.https://github.com/ESSS/conda-devenv
Scenario
Environment
devenv
files are parsed incorrectly and the action throws an error.The error
The response of the action setup is next:
Thank you very much!
The text was updated successfully, but these errors were encountered: