Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/MmgTools/mmg
Browse files Browse the repository at this point in the history
  • Loading branch information
Algiane committed Mar 2, 2017
2 parents c575c7e + b61f93f commit 45bcdc5
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 0 deletions.
28 changes: 28 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Customize the official Debian container to allow Pipeline building of MMG
# David Sherman 2017-02-07

FROM debian

USER root

## Standard build tools
RUN apt-get update && \
apt-get install -y sudo build-essential git cmake doxygen

## Optional module Scotch
RUN apt-get install -y curl zlib1g-dev
RUN curl -O http://gforge.inria.fr/frs/download.php/latestfile/298/scotch_6.0.4.tar.gz && \
tar xzf scotch_6.0.4.tar.gz && \
( cd scotch_6.0.4/src && \
ln -s Make.inc/Makefile.inc.x86-64_pc_linux2 Makefile.inc && \
make scotch prefix=/usr && make install ) && \
rm -rf scotch_6.0.4.tar.gz scotch_6.0.4

## Optional module LinearElasticity
RUN git clone https://github.com/ICStoolbox/Commons.git && \
mkdir -p Commons/build && \
( cd Commons/build && HOME=/usr cmake .. && make && make install ) && \
git clone https://github.com/ICStoolbox/LinearElasticity.git && \
mkdir -p LinearElasticity/build && \
( cd LinearElasticity/build && HOME=/usr cmake .. && make && make install ) && \
rm -rf Commons LinearElasticity
46 changes: 46 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!groovy

// Jenkinsfile for compiling, testing, and packaging MMG


pipeline {
agent {
dockerfile true
}
stages {
stage('Checkout') {
steps {
checkout scm
sh 'mkdir -p build local'
}
}
stage('Compile') {
steps {
sh '''
cd build &&
cmake -D CMAKE_BUILD_TYPE=Debug -D BUILD_TESTING=ON .. &&
make
'''
}
}
stage('Test') {
steps {
sh '''
cd build &&
ctest
'''
}
}
stage('Package') {
steps {
sh '''
cd build &&
cmake -D CMAKE_BUILD_TYPE=Release -D BUILD_TESTING=OFF -D CMAKE_INSTALL_PREFIX:PATH=$PWD/../local ..
make
make install
'''
archiveArtifacts artifacts: 'local/**', fingerprint: true, onlyIfSuccessful: true
}
}
}
}

0 comments on commit 45bcdc5

Please sign in to comment.