Deployment - conda environments #19
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Deployment - conda environments | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- 'devtools/conda-envs/alchemiscale-*.yml' | |
workflow_dispatch: | |
jobs: | |
deploy-conda-env: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
env-name: | |
- alchemiscale-client | |
- alchemiscale-server | |
- alchemiscale-compute | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: ensure we only have one instance running | |
uses: softprops/turnstyle@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_DANGERBOT_TOKEN_LIMITED }} | |
with: | |
abort-after-seconds: 60 | |
#- name: Cache conda | |
# uses: actions/cache@v2 | |
# env: | |
# CACHE_NUMBER: 0 | |
# with: | |
# path: ~/conda_pkgs_dir | |
# key: | |
# ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ | |
# hashFiles('devtools/conda-envs/${{ matrix.env-name }}.yml') }} | |
- name: Additional info about the build | |
shell: bash | |
run: | | |
uname -a | |
df -h | |
ulimit -a | |
- name: Configure conda; test creation of environment | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
#python-version: 3.9 | |
auto-update-conda: true | |
use-mamba: true | |
miniforge-variant: Mambaforge | |
activate-environment: ${{ matrix.env-name }} | |
environment-file: devtools/conda-envs/${{ matrix.env-name }}.yml | |
#use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly! | |
#auto-activate-base: false | |
- name: Environment Information | |
shell: bash -l {0} | |
run: | | |
conda info | |
conda list | |
- name: Deploy conda env | |
shell: bash -l {0} | |
env: | |
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }} | |
run: | | |
mamba install -y anaconda-client | |
anaconda -t ${ANACONDA_TOKEN} upload --user openforcefield devtools/conda-envs/${{ matrix.env-name }}.yml |