Skip to content
Snippets Groups Projects
Commit 658f910f authored by phit0's avatar phit0
Browse files

[ci] pipeline rules for benchmark tests

[ci] check if package can be loaded in second stage

[ci] check for singularity

[ci] singularity & go installation

[ci] singularity setup in separate bash script

[ci] test custom container

[ci] 2 stage test custom container

[ci] remove installation of vtk and miniconda as already available in container
parent 0bee4620
No related branches found
No related tags found
4 merge requests!38Draft: standardize files references during prj import/export,!37Add CI/CD Pipeline to check if benchmarks work with OGS version 6.4.1,!35Resolve "Manual CI job to run all benchmarks",!33Resolve "Update to OGSv6.4.1"
#!/bin/bash
### Setup singularity ###
# adapted from: https://sylabs.io/guides/3.0/user-guide/installation.html
# install dependencies
apt-get update
apt-get install -y \
build-essential \
libssl-dev \
uuid-dev \
libgpgme11-dev \
squashfs-tools \
libseccomp-dev \
pkg-config \
wget
# yum update -y && \
# yum groupinstall -y 'Development Tools' && \
# yum install -y \
# openssl-devel \
# libuuid-devel \
# libseccomp-devel \
# wget \
# squashfs-tools
# install go
export GOVERSION=1.15.6 OS=linux ARCH=amd64
wget https://dl.google.com/go/go$GOVERSION.$OS-$ARCH.tar.gz
tar -C /usr/local -xzvf go$GOVERSION.$OS-$ARCH.tar.gz
rm go$GOVERSION.$OS-$ARCH.tar.gz
# install singularity
export VERSION=3.9.1
mkdir -p $GOPATH/src/github.com/sylabs
cd $GOPATH/src/github.com/sylabs
wget https://github.com/sylabs/singularity/releases/download/v${VERSION}/singularity-ce-${VERSION}.tar.gz
tar -xzf singularity-ce-${VERSION}.tar.gz
cd ./singularity
./mconfig
make -C ./builddir
make -C ./builddir install
\ No newline at end of file
......@@ -10,3 +10,4 @@
^doc$
^Meta$
^data-raw$
^.CI-setup.sh
image: rocker/tidyverse
stages:
- test
- benchmark-test
test:
image: $CI_REGISTRY_IMAGE
stage: test
tags:
- envinf2
......@@ -15,11 +19,10 @@ test:
# checks if the packages from the Imports, Suggests, LinkinTo field
# are already installed in the cache
- R -e '.libPaths(new = Sys.getenv("R_LIBS_USER"))'
# python dependencies
- if [ ! -d "$RETICULATE_MINICONDA_PATH" ]; then R -e 'reticulate::install_miniconda()'; fi
- R -e 'if(tryCatch(reticulate::import("vtk"), error = function(e) return(TRUE))) reticulate::py_install("vtk")'
# Build and Check r2ogs6
- R CMD build . --no-build-vignettes --no-manual
- R CMD check $(ls -1t *.tar.gz | head -n 1) --no-build-vignettes --no-manual
#echo First Stage!
cache:
key: "$CI_COMMIT_REF_SLUG"
untracked: true
......@@ -27,7 +30,16 @@ test:
- "$R_LIBS_USER"
- "$RETICULATE_MINICONDA_PATH"
- "$RETICULATE_PYTHON_ENV"
# script will only run then attempting to merge/push to master
only:
- merge_requests
- master
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" || $CI_PIPELINE_SOURCE == "web"'
benchmark-test:
image: $CI_REGISTRY_IMAGE
stage: benchmark-test
rules:
- if: '$CI_PIPELINE_SOURCE == "web" || $CI_PIPELINE_SOURCE == "merge_request_event"'
when: on_success
script:
- R -e 'print("HELLO R")'
- singularity --version
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment