Commit 51ec185b authored by kapsner's avatar kapsner
parent 3d5ad1f1

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

*.sw[op]
*.iml
/.idea
/vars
/vars-*
/private-feeds
*~
language: groovy
env:
- TEST_SUITE=main_pg
- TEST_SUITE=load_dump_load_pg
- TEST_SUITE=R
- TEST_SUITE=configuration_syntax
- TEST_SUITE=main_oracle
addons:
postgresql: "9.4"
before_install:
- git clone --depth 1 git://github.com/thehyve/transmart-travis.git ~/ts-travis
- sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 3375DA21
- echo deb http://apt.thehyve.net/internal/ trusty main | sudo tee /etc/apt/sources.list.d/hyve_internal.list
- sudo apt-key adv --keyserver keyserver.ubuntu.com --recv E5267A6C
- echo deb http://ppa.launchpad.net/ondrej/php5/ubuntu precise main | sudo tee /etc/apt/sources.list.d/ondrej_php5.list
- sudo apt-get update
- sudo apt-get install -y tk-dev # while colorspace 1.2-6 is not out
install:
- sudo apt-get install -qq php5-cli php5-json subversion
- make -C env groovy
- make -C env ../vars
- sed -i 's@PGSQL_BIN=.*@PGSQL_BIN="sudo -E -u postgres /usr/lib/postgresql/9.4/bin/"@' vars
before_script:
- ulimit -u 4096
- export PATH=./env:$PATH
- echo $(groovy --version)
script: ./travis-test $TEST_SUITE
This diff is collapsed.
include makefile.inc
postgres:
$(MAKE) -C ddl/postgres/GLOBAL createdb
$(MAKE) postgres_load
postgres_load:
$(MAKE) -C ddl/postgres load
$(MAKE) -C data/postgres load
postgres_drop:
$(MAKE) -C ddl/postgres/GLOBAL drop
oracle:
$(MAKE) -C ddl/oracle load
$(MAKE) -C data/oracle load
oracle_drop:
$(MAKE) -C ddl/oracle drop
update_datasets:
$(MAKE) -C samples/studies update_datasets
.PHONY: postgres postgres_load postgres_drop oracle oracle_drop update_datasets
/root/
/build/
/R-*/
include ../makefile.inc
R_MIRROR ?= http://cran.ma.imperial.ac.uk
R_VERSION = 3.5.1
R_SOURCE = R-$(R_VERSION)
R_PREFIX ?= $(realpath .)/root
R_EXEC = $(R_PREFIX)/bin/R
RSERVE_CONF ?= $(realpath .)/Rserv_nodaemon.conf
R_FLAGS ?= -O2 -march=native
$(R_SOURCE):
curl -f $(R_MIRROR)/src/base/R-3/$@.tar.gz | $(TAR_COMMAND) xzf -
build/Makefile: $(R_SOURCE)
mkdir -p build && cd build && \
CFLAGS="$(R_FLAGS)" \
CXXFLAGS="$(R_FLAGS)" \
FFLAGS="$(R_FLAGS)" \
LIBnn=lib \
LDFLAGS="-Wl,-rpath=$(R_PREFIX)/lib/R/lib,--enable-new-dtags" \
../$(R_SOURCE)/configure --prefix=$(R_PREFIX) \
--enable-R-shlib --with-readline \
--enable-R-profiling --enable-memory-profiling \
--with-libpng --without-jpeglib --without-libtiff \
--without-system-xz --without-ICU \
--without-recommended-packages
# for the default prefix, expose a relative path target
ifeq ($(R_PREFIX), $(realpath .)/root)
root/bin/R: $(R_EXEC)
endif
$(R_EXEC): build/Makefile
$(MAKE) -C build -j8 && $(MAKE) -C build -j8 install
cran_packages: cran_pkg.R $(R_EXEC)
CRAN_MIRROR=$(R_MIRROR) $(R_EXEC) -f $<
other_packages: other_pkg.R cran_packages $(R_EXEC)
CRAN_MIRROR=$(R_MIRROR) $(R_EXEC) -f $<
install_packages: cran_packages other_packages
start_Rserve start_Rserve.dbg:
$(R_EXEC) CMD $(patsubst start_%,%,$@)
# phony target because it depends on value of env var
write_default_rserve:
@test -n '$(TRANSMART_USER)' || { \
echo 'Define $$TRANSMART_USER' 2>&1 ; false; }
echo 'USER=$(TRANSMART_USER)' > /etc/default/rserve
$(RSERVE_CONF): Rserv_nodaemon.conf
mkdir -p '$(dir $@)'
cp '$<' '$@'
# must be run as root
install_rserve_init: /etc/init.d/rserve
/etc/init.d/rserve: write_default_rserve $(RSERVE_CONF)
R_PREFIX='$(R_PREFIX)' RSERVE_CONF=$(RSERVE_CONF) php \
-d variables_order=E -d open_basedir=/ \
rserve.php > $@
chmod +x '$@'
install_rserve_upstart: /etc/init/rserve.conf
/etc/init/rserve.conf: write_default_rserve $(RSERVE_CONF)
R_PREFIX='$(R_PREFIX)' RSERVE_CONF=$(RSERVE_CONF) php \
-d variables_order=E -d open_basedir=/ \
rserve.conf.php > $@
initctl reload-configuration
install_rserve_unit: /etc/systemd/system/rserve.service
/etc/systemd/system/rserve.service: $(RSERVE_CONF)
R_PREFIX='$(R_PREFIX)' RSERVE_CONF=$(RSERVE_CONF) \
TRANSMART_USER=$(TRANSMART_USER) php \
-d variables_order=E -d open_basedir=/ rserve.service.php > $@
systemctl daemon-reload
clean:
rm -rf build $(R_SOURCE) root
.PHONY: install_packages cran_packages other_packages clean \
start_Rserve start_Rserve.dbg install_init write_default_rserve
.DELETE_ON_ERROR:
# See http://rforge.net/Rserve/doc.html#conf for more information
# Don't change the next line; the job/service expects the program not to fork
deamon=0
required.packages <- c("reshape", "reshape2", "ggplot2", "data.table", "Cairo",
"snowfall", "gplots", "Rserve", "foreach", "doParallel", "visreg",
"pROC", "jsonlite", "RUnit");
missing.packages <- function(required) {
return(required[
!(required %in% installed.packages()[,"Package"])]);
}
new.packages <- missing.packages(required.packages)
if (length(new.packages)) {
print("Installing packages...")
print(new.packages)
install.packages(new.packages, repos=Sys.getenv("CRAN_MIRROR"));
}
if (length(missing.packages(required.packages))) {
print("Failed packages...")
failed.packages <- missing.packages(required.packages)
print(failed.packages)
warning('Some packages not installed');
quit("no");
}
# WCGNA is in CRAN but depends on several packages not in cran (impute, GO.db,
# AnnotationDbi), which is something that really should not happen with a sane
# repository.
# Anyway, that's why it is installed here
required.packages <- c("WGCNA", "impute", "multtest", "CGHbase", "CGHtest",
"CGHtestpar", "edgeR", "snpStats", "preprocessCore",
"GO.db", "AnnotationDbi", "QDNAseq");
missing.packages <- function(required) {
return(required[
!(required %in% installed.packages()[,"Package"])]);
}
new.packages <- missing.packages(required.packages);
if (!length(new.packages))
q();
source("http://bioconductor.org/biocLite.R");
bioclite.packages <-
intersect(new.packages, c("impute", "multtest", "CGHbase", "edgeR",
"snpStats", "preprocessCore", "GO.db",
"AnnotationDbi", "QDNAseq"));
if (length(bioclite.packages))
biocLite(bioclite.packages);
# 1.10.0 version contains an important fix.
# We still need to install the old package with biocLite first to install all dependencies.
# For some reasons below installations does not take care of installing dependencies first.
download.file(
url="http://bioconductor.org/packages/release/bioc/src/contrib/QDNAseq_1.16.0.tar.gz",
dest="/tmp/QDNAseq_1.16.0.tar.gz", method="internal");
install.packages("/tmp/QDNAseq_1.16.0.tar.gz",
repos=NULL, type="source");
if (length(intersect(new.packages, c("CGHtest")))) {
download.file(
url="http://files.thehyve.net/CGHtest_1.1.tar.gz",
dest="/tmp/CGHtest_1.1.tar.gz", method="internal");
install.packages("/tmp/CGHtest_1.1.tar.gz",
repos=NULL, type="source")
}
if (length(intersect(new.packages, c("CGHtestpar")))) {
download.file(
url="http://files.thehyve.net/CGHtestpar_0.0.tar.gz",
dest="/tmp/CGHtestpar_0.0.tar.gz", method="internal");
install.packages("/tmp/CGHtestpar_0.0.tar.gz",
repos=NULL, type="source")