Skip to content

Update go.yml

Update go.yml #81

Workflow file for this run

name: Singularity Build
on: [push]
jobs:
build:
name: Build
runs-on: ubuntu-20.04
steps:
- name: Set up Go 1.14
uses: actions/setup-go@v1
with:
go-version: 1.14
id: go
- name: Install Dependencies
run: |
sudo apt-get update && sudo apt-get install -y \
build-essential \
libssl-dev \
uuid-dev \
libgpgme11-dev \
squashfs-tools \
libseccomp-dev \
pkg-config
- name: Install Singularity
env:
SINGULARITY_VERSION: 3.7.4
run: |
echo "Working with Singularity version ${SINGULARITY_VERSION}"
export GOPATH=/tmp/go
mkdir -p $GOPATH
sudo mkdir -p /usr/local/var/singularity/mnt && \
mkdir -p $GOPATH/src/github.com/sylabs && \
cd $GOPATH/src/github.com/sylabs && \
wget -qO- "https://github.com/sylabs/singularity/releases/download/v${SINGULARITY_VERSION}/singularity-${SINGULARITY_VERSION}.tar.gz" | \
tar xzv && \
cd singularity && \
./mconfig -p /usr/local && \
make -C builddir && \
sudo make -C builddir install
- name: Check out code for the container build
uses: actions/checkout@v4
- name: Build Container
env:
SINGULARITY_RECIPE: Singularity
OUTPUT_CONTAINER: DIVAnd.sif
run: |
ls
if [ -f "${SINGULARITY_RECIPE}" ]; then
sudo -E singularity build ${OUTPUT_CONTAINER} ${SINGULARITY_RECIPE}
else
echo "${SINGULARITY_RECIPE} is not found."
echo "Present working directory: $PWD"
ls
fi
- name: Upload container
uses: actions/upload-artifact@v4
with:
name: DIVAnd.sif
path: DIVAnd.sif