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

Improvements #2

Open
goanpeca opened this issue Dec 20, 2019 · 3 comments
Open

Improvements #2

goanpeca opened this issue Dec 20, 2019 · 3 comments

Comments

@goanpeca
Copy link

goanpeca commented Dec 20, 2019

Awesome on using the action @chrisdembia :-p so, on your example you could do it like:

name: Windows

# syntax https://help.github.com/en/articles/workflow-syntax-for-github-actions
on:
  push:
    branches: 
      - '*'
    tags:
      - '*'
    
jobs:
  conda:
    name: conda-build

    runs-on: windows-latest

    steps:
    - uses: actions/checkout@v1
  
    - uses: goanpeca/[email protected]
      with:
        auto-update-conda: true
        activate-environment: packaging   # This will create and auto activate this environment
        # This will be installed on packaging but with the defaults channel
        python-version: 3.7
        # Should I add a default_channels input (like the condarc option?)
        # https://docs.conda.io/projects/conda/en/latest/user-guide/configuration/use-condarc.html#default-channels
        default_channels: conda-forge,some-other-channel
        channels: other-channel
        
    - name: Initialize Conda for Powershell
      shell: pwsh
      run: conda install --channel conda-forge anaconda-client conda-verify  # since it is auto activated, no need to specify name and switched the create for install

    - name: Deploy Conda package
      run: |
        # conda config --set anaconda_upload yes
        echo "login"
        # anaconda login --username ${{ secrets.ANACONDA_USERNAME }} --password ${{ secrets.ANACONDA_PASSWORD }}
        echo "build"
        # conda-build --channel conda-forge --user opensim-org .
        # conda-build --channel conda-forge --user opensim-org --token ${{ secrets.ANACONDA_TOKEN }} .
        conda-build --channel conda-forge .
        echo "logout"
        anaconda logout

You could probably use an environment.yml file where you could specify all your needed packages

@chrisdembia
Copy link
Member

chrisdembia commented Dec 20, 2019

Thanks @goanpeca . As for your question about default_channels:, I do not know enough about conda to advise you on your Action.

conda-build on Windows is not working for me. I had a small amount of hope that your Action would help, but I still have the same problem (https://github.com/opensim-org/conda-opensim-moco/commit/3bd60df44cedb68eb3f0e72de8ce9b133fbc4b8f/checks?check_suite_id=367922854):

image

The console is not showing an error message, yet the build fails.

Do you have any insights into what's causing this?

You seem more knowledgeable about using conda, so if you are willing, I'd greatly appreciate your help.

@goanpeca
Copy link
Author

I will try to build it and let you know no worries

@chrisdembia
Copy link
Member

Oh my gosh thank you!

My labmate and I have both attempted building for Windows locally on our machines and the build gets much farther along than with GitHub Actions (it eventually fails, but in minutes, not instantly). So I wonder if the issue is specific to the GitHub Actions environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants