]> https://gitweb.dealii.org/ - candi.git/commitdiff
Enable continuous integration using Jenkins 345/head
authorTimo Heister <timo.heister@gmail.com>
Thu, 24 May 2018 02:53:55 +0000 (10:53 +0800)
committerTimo Heister <timo.heister@gmail.com>
Sun, 13 Aug 2023 20:55:26 +0000 (16:55 -0400)
Jenkinsfile [new file with mode: 0644]
contrib/ubuntu2004/Dockerfile [new file with mode: 0644]
contrib/ubuntu2204/Dockerfile [new file with mode: 0644]

diff --git a/Jenkinsfile b/Jenkinsfile
new file mode 100644 (file)
index 0000000..11f4613
--- /dev/null
@@ -0,0 +1,102 @@
+#!groovy
+
+pipeline
+{
+  agent none
+
+  parameters {
+    booleanParam(defaultValue: false, description: 'Is the pull request approved for testing?', name: 'TRUST_BUILD')
+  }
+
+  stages {
+
+    stage ("info")
+    {
+      steps
+      {
+        echo "PR: ${env.CHANGE_ID} - ${env.CHANGE_TITLE}"
+        echo "CHANGE_AUTHOR_EMAIL: ${env.CHANGE_AUTHOR_EMAIL}"
+        echo "building on node ${env.NODE_NAME}"
+      }
+    }
+
+    stage ("Check permissions")
+    {
+      when {
+        allOf {
+            environment name: 'TRUST_BUILD', value: 'false' 
+            not {branch 'master'}
+            not {changeRequest authorEmail: "timo.heister@gmail.com"}
+           }       
+      }
+      steps {
+          echo "Please ask an admin to rerun Jenkins with TRUST_BUILD=true"
+            sh "exit 1"
+      }
+    }
+
+    stage ("Ubuntu-20.04")
+    {
+      options {timeout(time: 600, unit: 'MINUTES')}
+      agent
+      {
+        dockerfile
+        {
+          dir 'contrib/ubuntu2004'
+        }
+      }
+      
+      steps
+      {
+        sh '''#!/bin/bash
+       set -e
+       set -x
+       mpicxx -v
+       cmake --version
+       # Ubuntu 20.04 only ships cmake 3.16 not 3.17:
+       echo 'PACKAGES="once:cmake ${PACKAGES}"' > local.cfg
+        ./candi.sh -j 10 -p $WORKSPACE
+        cp $WORKSPACE/tmp/build/deal.II-*/detailed.log detailed-ubuntu2004.log
+        '''
+       archiveArtifacts artifacts: 'detailed-ubuntu2004.log', fingerprint: true
+
+        sh '''#!/bin/bash
+        cd $WORKSPACE/tmp/build/deal.II-* && make test
+        '''
+      }
+    }
+
+    stage ("OSX-M1")
+    {
+      options {timeout(time: 600, unit: 'MINUTES')}
+      agent
+      {        
+         node
+        {
+          label 'osx'
+        }
+      }
+
+      post { cleanup { cleanWs() } }
+
+      steps
+      {
+        sh '''#!/bin/bash
+       set -e
+       set -x
+        ./candi.sh -j 8 --packages="p4est petsc trilinos sundials dealii" -p $WORKSPACE
+        cp $WORKSPACE/tmp/build/deal.II-*/detailed.log detailed-osx.log
+        '''
+
+       archiveArtifacts artifacts: 'detailed-osx.log', fingerprint: true
+
+        sh '''#!/bin/bash
+        cd $WORKSPACE/tmp/build/deal.II-* && make test
+        '''
+      }
+    }
+
+  }
+
+
+}
diff --git a/contrib/ubuntu2004/Dockerfile b/contrib/ubuntu2004/Dockerfile
new file mode 100644 (file)
index 0000000..54e6449
--- /dev/null
@@ -0,0 +1,22 @@
+FROM ubuntu:20.04
+
+USER root
+
+RUN apt-get update && DEBIAN_FRONTEND="noninteractive" apt-get install -y \
+      lsb-release git subversion wget bc libgmp-dev \
+      build-essential autoconf automake cmake libtool gfortran python3 \
+      zlib1g-dev \
+      openmpi-bin openmpi-common libopenmpi-dev \
+      libblas3 libblas-dev liblapack3 liblapack-dev libsuitesparse-dev \
+    && rm -rf /var/lib/apt/lists/*
+
+ARG USER=bob
+RUN adduser --disabled-password --gecos '' $USER
+RUN adduser $USER sudo; echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
+
+RUN chown -R $USER:$USER /home/$USER
+USER $USER
+ENV HOME /home/$USER
+ENV USER $USER
+ENV OMPI_MCA_btl "^vader"
+WORKDIR $HOME
diff --git a/contrib/ubuntu2204/Dockerfile b/contrib/ubuntu2204/Dockerfile
new file mode 100644 (file)
index 0000000..5f7ef33
--- /dev/null
@@ -0,0 +1,22 @@
+FROM ubuntu:22.04
+
+USER root
+
+RUN apt-get update && DEBIAN_FRONTEND="noninteractive" apt-get install -y \
+      lsb-release git subversion wget bc libgmp-dev \
+      build-essential autoconf automake cmake libtool gfortran python3 \
+      zlib1g-dev \
+      openmpi-bin openmpi-common libopenmpi-dev \
+      libblas3 libblas-dev liblapack3 liblapack-dev libsuitesparse-dev \
+    && rm -rf /var/lib/apt/lists/*
+
+ARG USER=bob
+RUN adduser --disabled-password --gecos '' $USER
+RUN adduser $USER sudo; echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
+
+RUN chown -R $USER:$USER /home/$USER
+USER $USER
+ENV HOME /home/$USER
+ENV USER $USER
+ENV OMPI_MCA_btl "^vader"
+WORKDIR $HOME

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.