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

Added singularity-deploy related files #13

Merged
merged 1 commit into from
Jun 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions .github/workflows/builder.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: singularity-deploy

on:
push:
branches:
- "stable"

jobs:
release:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Get Latest Tag
run: |
# Get the latest tag, we won't build if it's the current
git fetch --tags
latest_tag=$(git tag | tail -1)
echo "latest_tag=$latest_tag" >> $GITHUB_ENV
- name: Define Repository Name and Release Version
run: |
repo=$(echo "${GITHUB_REPOSITORY/\//-}")
release=$(cat VERSION)
echo "reponame=$repo" >> $GITHUB_ENV
echo "release_tag=$release" >> $GITHUB_ENV
- name: Create Release
id: create_release
uses: actions/create-release@v1
if: ${{ env.release_tag != env.latest_tag }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.release_tag }}
release_name: Release ${{ env.release_tag }}
draft: false
prerelease: false
- uses: eWaterCycle/setup-singularity@v6
if: ${{ env.release_tag != env.latest_tag }}
with:
singularity-version: 3.6.4
- name: Build the singularity container
if: ${{ env.release_tag != env.latest_tag }}
run: |
repo=$(echo "${GITHUB_REPOSITORY/\//-}")
# For each Singularity* container, build based on the prefix (tag)
for recipe in $(ls Singularity*); do
echo "Building $recipe"
tag=$(echo "${recipe/Singularity\./}")
# If we find empty, use latest
if [ "$tag" == "Singularity" ]; then
tag=latest
fi
# Build the container and name by tag
echo "Tag is $tag."
container="$repo:$tag.sif"
singularity build --fakeroot container.sif "$recipe"
if [ "$?" == "0" ]; then
echo "Successfully built container $container."
mv container.sif "$container"
else
echo "There was an issue building $container."
fi
done
- name: Upload Release Assets
if: ${{ env.release_tag != env.latest_tag }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
upload_url: ${{ steps.create_release.outputs.upload_url }}
tag_name: ${{ env.release_tag }}
run: |
hub release edit $(find . -type f -name "*.sif" -printf "-a %p ") -m "" "$tag_name"
6 changes: 3 additions & 3 deletions Singularity
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ From: ubuntu:18.04
cd bcftools
make bcftools && cp bcftools /usr/bin

Rscript --vanilla -e "install.packages(c(\"reshape2\",\"R.utils\", \"parallel\", \"Hmisc\", \"argparser\", \"data.table\", \"BiocManager\"),repos = \"http://cran.us.r-project.org\");BiocManager::install(c(\"SeqArray\", \"SeqVarTools\"));install.packages(\"GMMAT\", repos = \"http://cran.us.r-project.org\")"
Rscript --vanilla -e "install.packages(c(\"reshape2\",\"R.utils\", \"parallel\", \"Hmisc\", \"argparser\", \"data.table\", \"BiocManager\", \"doMC\"),repos = \"http://cran.us.r-project.org\");BiocManager::install(c(\"SeqArray\", \"SeqVarTools\"));install.packages(\"GMMAT\", repos = \"http://cran.us.r-project.org\")"
perl -MCPAN -e 'foreach (@ARGV) { CPAN::Shell->rematein("notest", "install", $_) }' Module::Build DBI Try::Tiny JSON Data::Dumper File::Basename Getopt::Long Data::Types File::Path

cd /usr/local/bin
Expand Down Expand Up @@ -75,8 +75,8 @@ From: ubuntu:18.04
echo "This container was created: $CREATIONDATE"

%labels
Author Arthur Gilly, Andrei Barysenka, Daniel Suveges
Version v1.5
Author Arthur Gilly, Andrei Barysenka, Daniel Suveges, Young-Chan Park
Version v1.5.1

%help
This container allows you to run rare variant aggregation tests using MONSTER and SMMAT; for more information run this container with the help command line option.
Expand Down
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.5.1