-
Andrea Michelotti authoredAndrea Michelotti authored
.gitlab-ci.yml 31.43 KiB
stages:
- build
- test
- deploy
- publish
before_script:
- export NOW=$(date +"%Y%m%d-%H%M%S")
- export TAR_NAME_POSTFIX=$NOW
- export SYS=`uname -s`
- if [ "$SYS" == "Linux" ];then export NPROC=`nproc`;else export NPROC=4;fi
- echo "[$CI_RUNNER_DESCRIPTION] $SYS $CI_JOB_NAME Working directory:$PWD tag $CI_COMMIT_REF_NAME CPUS:$NPROC"
- export ARCH=`uname -m`
- eval export `cat /etc/*-release|grep -e "^VERSION_ID="|tr -d "\" "`
- eval export `cat /etc/*-release|grep -e "^ID="|tr -d "\" "`
- export REV_POSTFIX=$CI_COMMIT_REF_NAME-$ID-$VERSION_ID-$ARCH
- export DISTRIB_NAME=chaos-distrib-$REV_POSTFIX
- export DISTRIB_PREFIX=/usr/local/chaos/chaos-distrib
- export INSTALL_DIR=$DISTRIB_PREFIX
- export CHAOS_MDS=localhost:5000
- export CHAOS_INTERFACE=lo
- export CHAOS_LIVE_SERVERS=couchbase
- export CHAOS_DB_SERVERS=mongo
- export PATH=/usr/local/chaos/qt-56/bin:$PATH
- echo "Running on $ID $VERSION_ID $ARCH (distrib name '$DISTRIB_NAME')"
- git config --global user.email andrea.michelotti@lnf.infn.it
- git config --global user.name amichelo
- git config --global color.ui true
macosx_x86_64:
tags:
- macosx
stage: build
services:
- name: couchbase/server:community-3.1.3
alias: couchbase
- name: baltig.infn.it:4567/chaos-lnf-control/chaos_bundle_compilation/mongo:3.4
alias: mongo
script:
- export CHAOS_LIVE_SERVERS=localhost
- export CHAOS_DB_SERVERS=localhost
- curl http://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
- chmod +x ~/bin/repo
- ~/bin/repo init -q --no-clone-bundle -u git@baltig.infn.it:chaos-lnf-control/chaos_repo_bundle.git -b $CI_COMMIT_REF_NAME
- mkdir chaos-osx10-distrib
- ~/bin/repo sync
- ./tools/dbinit.sh localhost localhost;sleep 5;./tools/dbinit.sh localhost localhost
- cd chaosframework;export CHAOS_LIB_HASH=`git log -n 1 --pretty="%h"`;cd -;
- cmake -DCHAOS_ARCHITECTURE_TEST=ON -DCHAOS_VME=OFF -DCHAOS_VERSION_MAJOR="$CI_COMMIT_REF_NAME.$CHAOS_LIB_HASH" -DCHAOS_VERSION_MINOR="$CI_JOB_STAGE.$CI_COMMIT_SHA" -DCHAOS_WAN=ON . -DCHAOS_BUILD_ID=${CI_PIPELINE_ID} -DCMAKE_INSTALL_PREFIX=$PWD/chaos-osx10-distrib
- make -j 8 install
- export CHAOS_LIVE_SERVERS=localhost;export CHAOS_DB_SERVERS=localhost
- cd $PWD/chaos-osx10-distrib
- source chaos_env.sh
- ./tools/dbinit.sh localhost localhost;sleep 5;./tools/dbinit.sh localhost localhost
- ./tools/chaos_test.sh -k .
- ./tools/chaos_services.sh stop
- tar cfz chaos-osx10-distrib.tar.gz chaos-osx10-distrib
allow_failure: true
artifacts:
name: "chaos-osx10-distrib.tar.gz"
paths:
- ./*.tar.gz
expire_in: 1 day
when: always
build_i686_static_linux26:
stage: build
retry: 2