From d9c846caab82a758a091a708acb378c96d417071 Mon Sep 17 00:00:00 2001 From: Daniel Date: Wed, 3 Apr 2019 18:16:29 +0200 Subject: [PATCH] add configuration file for CircleCI use ubuntu trusty environment use openfoam4 package provided by openfoam.org build only master and develop --- .circleci/config.yml | 72 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000..8ad53ebb --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,72 @@ +version: 2 +jobs: + build: + branches: + only: + - master + - develop + + docker: + - image: ubuntu:trusty + + environment: + WM_NCOMPPROCS: 2 + + working_directory: /root/CFDEM/CFDEMcoupling + + steps: + - run: + name: Install package dependencies + command: sudo apt-get update && sudo apt-get install -y build-essential cmake openmpi-bin libopenmpi-dev python-dev git bc + + - run: + name: Make project and user dir + command: mkdir -p /root/CFDEM/CFDEMcoupling && mkdir -p /root/CFDEM/-4.1 + + - checkout: + path: /root/CFDEM/CFDEMcoupling + + - run: + name: Add OpenFOAM package repository + command: sudo apt-get install -y software-properties-common wget apt-transport-https && sudo add-apt-repository http://dl.openfoam.org/ubuntu && sudo sh -c "wget -O - http://dl.openfoam.org/gpg.key | apt-key add -" + + - run: + name: Install OpenFOAM 4.1 + command: sudo apt-get update && sudo apt-get -y install openfoam4 + + - run: + name: Clone LIGGGHTS repository + command: git clone https://github.com/ParticulateFlow/LIGGGHTS-PFM.git /root/CFDEM/LIGGGHTS + + - run: + name: Build LIGGGHTS + command: > + shopt -s expand_aliases && + source /opt/openfoam4/etc/bashrc && + source /root/CFDEM/CFDEMcoupling/etc/bashrc && + bash /root/CFDEM/CFDEMcoupling/etc/compileLIGGGHTS.sh + no_output_timeout: 30m + + - run: + name: Build CFDEMcoupling library + command: > + shopt -s expand_aliases && + source /opt/openfoam4/etc/bashrc && + source /root/CFDEM/CFDEMcoupling/etc/bashrc && + bash /root/CFDEM/CFDEMcoupling/etc/compileCFDEMcoupling_src.sh + + - run: + name: Build CFDEMcoupling solvers + command: > + shopt -s expand_aliases && + source /opt/openfoam4/etc/bashrc && + source /root/CFDEM/CFDEMcoupling/etc/bashrc && + bash /root/CFDEM/CFDEMcoupling/etc/compileCFDEMcoupling_sol.sh + + - run: + name: Build CFDEMcoupling utilities + command: > + shopt -s expand_aliases && + source /opt/openfoam4/etc/bashrc && + source /root/CFDEM/CFDEMcoupling/etc/bashrc && + bash /root/CFDEM/CFDEMcoupling/etc/compileCFDEMcoupling_uti.sh