-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from cumc/update_recipe
overhaul conda workflow
- Loading branch information
Showing
7 changed files
with
207 additions
and
132 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
name: Build conda package | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: Version to build package for | ||
required: true | ||
|
||
jobs: | ||
build_package_linux: | ||
name: Build conda package for linux-64 | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
env: | ||
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} | ||
|
||
steps: | ||
- name: Checkout pull request branch | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Create recipe from template | ||
run: | | ||
mkdir /tmp/recipe | ||
cp recipe/meta.yaml /tmp/recipe/meta.yaml | ||
cp recipe/build.sh /tmp/recipe/build.sh | ||
version=${{ github.event.inputs.version }} | ||
wget https://github.com/cumc/pecotmr/archive/${version}.tar.gz | ||
sha256sum=$(sha256sum ${version}.tar.gz | cut -d ' ' -f 1) | ||
sed -i "s/VERSION_PLACEHOLDER/${version}/g" /tmp/recipe/meta.yaml | ||
sed -i "s/SHA256SUM_PLACEHOLDER/${sha256sum}/g" /tmp/recipe/meta.yaml | ||
- name: Setup up docker buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Build and export docker containers | ||
uses: docker/build-push-action@v4 | ||
with: | ||
load: true | ||
file: .github/mambaforge_container.df | ||
tags: conda_mambabuild:latest | ||
|
||
- name: Build conda packages | ||
run: docker run --rm --volume /tmp:/tmp --volume $(pwd) --workdir $(pwd) conda_mambabuild conda mambabuild --output-folder /tmp/conda-bld /tmp/recipe | ||
|
||
- name: Setup micromamba | ||
uses: mamba-org/setup-micromamba@v1 | ||
with: | ||
environment-name: anaconda-client | ||
create-args: anaconda-client | ||
generate-run-shell: true | ||
|
||
- name: Upload packages | ||
shell: micromamba-shell {0} | ||
run: anaconda upload --force /tmp/conda-bld/linux-64/*.tar.bz2 | ||
|
||
build_package_macos: | ||
name: Build conda package for osx-64 | ||
runs-on: macos-latest | ||
strategy: | ||
fail-fast: false | ||
env: | ||
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} | ||
|
||
steps: | ||
- name: Checkout pull request branch | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup micromamba | ||
uses: mamba-org/setup-micromamba@v1 | ||
with: | ||
environment-name: boa | ||
create-args: boa conda-verify anaconda-client sed | ||
generate-run-shell: true | ||
|
||
- name: Create recipe from template | ||
shell: micromamba-shell {0} | ||
run: | | ||
mkdir /tmp/recipe | ||
cp recipe/meta.yaml /tmp/recipe/meta.yaml | ||
cp recipe/build.sh /tmp/recipe/build.sh | ||
version=${{ github.event.inputs.version }} | ||
wget https://github.com/cumc/pecotmr/archive/${version}.tar.gz | ||
sha256sum=$(sha256sum ${version}.tar.gz | cut -d ' ' -f 1) | ||
sed -i "s/VERSION_PLACEHOLDER/${version}/g" /tmp/recipe/meta.yaml | ||
sed -i "s/SHA256SUM_PLACEHOLDER/${sha256sum}/g" /tmp/recipe/meta.yaml | ||
- name: Set up channels | ||
shell: micromamba-shell {0} | ||
run: | | ||
conda config --file /Users/runner/micromamba-bin/.condarc --append channels bioconda | ||
conda config --file /Users/runner/micromamba-bin/.condarc --append channels nodefaults | ||
xargs -I % conda config --file /Users/runner/micromamba-bin/.condarc --prepend channels % < .custom_channels | ||
conda config --show-sources | ||
- name: Build conda package | ||
shell: micromamba-shell {0} | ||
run: conda mambabuild --output-folder /tmp/conda-bld /tmp/recipe | ||
|
||
- name: Upload package | ||
shell: micromamba-shell {0} | ||
run: anaconda upload --force /tmp/conda-bld/osx-64/*.tar.bz2 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env bash | ||
|
||
export DISABLE_AUTOBREW=1 | ||
|
||
# shellcheck disable=SC2086 | ||
${R} CMD INSTALL --build . ${R_ARGS} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
{% set version = "VERSION_PLACEHOLDER" %} | ||
{% set name = "pecotmr" %} | ||
|
||
package: | ||
name: r-{{ name }} | ||
version: {{ version }} | ||
|
||
source: | ||
url: https://github.com/cumc/{{ name }}/archive/{{ version }}.tar.gz | ||
sha256: SHA256SUM_PLACEHOLDER | ||
|
||
build: | ||
merge_build_host: true # [win] | ||
number: 0 | ||
rpaths: | ||
- lib/R/lib/ | ||
- lib/ | ||
|
||
requirements: | ||
build: | ||
- cross-r-base {{ r_base }} # [build_platform != target_platform] | ||
host: | ||
- bioconductor-qvalue | ||
- r-bedtoolsr | ||
- r-base=4.2 | ||
- r-coloc | ||
- r-data.table | ||
- r-domc | ||
- r-dplyr | ||
- r-gbj | ||
- r-ggplot2 | ||
- r-ggnewscale | ||
- r-ggrepel | ||
- r-ggvenn | ||
- r-glmnet | ||
- r-harmonicmeanp | ||
- r-magrittr | ||
- r-matrix | ||
- r-mr.ash.alpha | ||
- r-mr.mash.alpha | ||
- r-pgenlibr | ||
- r-plink2r | ||
- r-purrr | ||
- r-rcpp | ||
- r-readr | ||
- r-rfast | ||
- r-rlab | ||
- r-stringr | ||
- r-susier | ||
- r-vctrs | ||
run: | ||
- bioconductor-qvalue | ||
- r-bedtoolsr | ||
- r-base=4.2 | ||
- r-coloc | ||
- r-data.table | ||
- r-domc | ||
- r-dplyr | ||
- r-gbj | ||
- r-ggplot2 | ||
- r-ggnewscale | ||
- r-ggrepel | ||
- r-ggvenn | ||
- r-glmnet | ||
- r-harmonicmeanp | ||
- r-magrittr | ||
- r-matrix | ||
- r-mr.ash.alpha | ||
- r-mr.mash.alpha | ||
- r-pgenlibr | ||
- r-plink2r | ||
- r-purrr | ||
- r-rcpp | ||
- r-readr | ||
- r-rfast | ||
- r-rlab | ||
- r-stringr | ||
- r-susier | ||
- r-vctrs | ||
|
||
test: | ||
commands: | ||
- $R -e "library('{{ name }}')" | ||
|
||
about: | ||
home: https://github.com/stephenslab/mvsusier | ||
license: GPL-3.0-or-later | ||
license_file: LICENSE.md | ||
summary: pecotmr implements pair-wise enrichment, colocalization, TWAS and Mendelian Randomization to integrate QTL and GWAS analysis based on a fine-mapped single effects model. | ||
|
||
extra: | ||
recipe-maintainers: | ||
- danielnachun |