conda-build-perl-convert-pheno #46
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: conda-build-perl-convert-pheno | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
strategy: | |
matrix: | |
# os: ["ubuntu-latest", "macos-latest"] | |
os: ["ubuntu-latest"] | |
runs-on: ${{ matrix.os }} | |
continue-on-error: true | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
#mamba-version: "*" | |
miniforge-variant: Mambaforge | |
miniforge-version: 23.1.0-1 | |
channels: conda-forge,bioconda | |
activate-environment: build-env | |
channel-priority: true | |
use-only-tar-bz2: false # might break caching | |
auto-update-conda: true | |
- name: Get Date | |
id: get-date | |
run: echo "today=$(/bin/date -u '+%Y%m%d')" >> $GITHUB_OUTPUT | |
shell: bash | |
- name: Cache Conda env | |
uses: actions/cache@v3 | |
with: | |
path: ${{ env.CONDA }}/envs | |
key: conda-${{ runner.os }}--${{ runner.arch }}--${{ | |
steps.get-date.outputs.today }}-${{ | |
hashFiles('conda_recipe/bioconda_utils-requirements.txt') }}-${{ env.CACHE_NUMBER }} | |
env: | |
# Increase this value to reset cache if conda_recipe/environment.yaml has not changed | |
CACHE_NUMBER: 0 | |
id: cache | |
- name: Update environment | |
run: | | |
# conda install -n base conda-libmamba-solver | |
# conda config --set solver libmamba | |
# conda env update -n build-env -f conda_recipe/environment.yaml | |
conda env update -n build-env -f conda_recipe/bioconda_utils-requirements.txt | |
if: steps.cache.outputs.cache-hit != 'true' | |
- shell: bash -el {0} | |
run: | | |
# conda config --set unsatisfiable_hints True | |
# conda info | |
# conda list | |
# conda config --show-sources | |
# conda config --show | |
conda config --set always_yes yes | |
conda config --add channels defaults | |
conda config --add channels bioconda | |
conda config --add channels conda-forge | |
conda config --set channel_priority strict | |
conda config --set unsatisfiable_hints True | |
mamba info | |
mamba list | |
conda config --show-sources | |
conda config --show | |
printenv | sort | |
- name: Run conda build | |
shell: bash -el {0} | |
run: | | |
# conda mambabuild conda_recipe | |
# conda build conda_recipe | |
set -e | |
eval "$(conda shell.bash hook)" | |
conda activate build-env | |
docker pull quay.io/dpryan79/mulled_container:latest | |
export OSTYPE="linux-gnu" | |
export CI="true" | |
bioconda-utils build conda_recipe conda_recipe/config.yml \ | |
--docker --mulled-test \ | |
docker rmi quay.io/dpryan79/mulled_container:latest | |
displayName: Test | |
- name: Archive CPAN logs | |
if: ${{ failure() }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: cpan_log_${{ matrix.os }} | |
path: /tmp/.cpanm/work/*/build.log |