]> https://gitweb.dealii.org/ - dealii.git/commitdiff
[CI] test on OSX 7648/head
authorTimo Heister <timo.heister@gmail.com>
Thu, 17 Jan 2019 00:43:46 +0000 (17:43 -0700)
committerTimo Heister <timo.heister@gmail.com>
Mon, 28 Jan 2019 21:47:09 +0000 (14:47 -0700)
- add a separate Jenkinsfile for OSX
- compile deal.II using clang on OSX

contrib/ci/Jenkinsfile.osx [new file with mode: 0644]

diff --git a/contrib/ci/Jenkinsfile.osx b/contrib/ci/Jenkinsfile.osx
new file mode 100644 (file)
index 0000000..fbee05a
--- /dev/null
@@ -0,0 +1,88 @@
+#!groovy
+
+/*
+Settings to apply inside Jenkins:
+  - discover pull requests (remove branches/master)
+  - Strategy: merged PR
+  - enable "Disable GitHub Multibranch Status Plugin"
+  - trigger build on pull request comment: .* /rebuild.* (without space)
+  - Jenkinsfile: choose contrib/ci/Jenkinsfile.osx
+  - scan: every 4 hours
+  - discard: 5+ items
+*/
+
+pipeline
+{
+  agent {
+    node {
+        label 'osx'
+    }
+  }
+
+  stages
+  {
+    stage("check")
+    {
+      when {
+        allOf {
+          not {branch 'master'}
+        }
+      }
+
+      steps
+      {
+        githubNotify context: 'OSX', description: 'pending...',  status: 'PENDING'
+        sh '''
+               wget -q -O - https://api.github.com/repos/dealii/dealii/issues/${CHANGE_ID}/labels | grep 'ready to test' || \
+               { echo "This commit will only be tested when it has the label 'ready to test'. Trigger a rebuild by adding a comment that contains '/rebuild'..."; exit 1; }
+            '''
+      }
+      post
+      {
+        failure
+        {
+          githubNotify context: 'OSX', description: 'need ready to test label and /rebuild',  status: 'PENDING'
+          script
+          {
+            currentBuild.result='NOT_BUILT'
+          }
+        }
+      }
+    }
+
+    stage('build')
+    {
+      steps
+      {
+        timeout(time: 1, unit: 'HOURS')
+        {
+           sh "echo \"building on node ${env.NODE_NAME}\""
+           sh '''#!/bin/bash
+              mkdir build && cd build
+              cmake \
+                -D DEAL_II_WITH_MPI=OFF \
+                -D DEAL_II_CXX_FLAGS='-Werror' \
+                -D CMAKE_BUILD_TYPE=Debug \
+                $WORKSPACE/ && make -j 4
+            '''
+        }
+      }
+
+      post
+      {
+        failure
+        {
+          githubNotify context: 'OSX', description: 'build failed',  status: 'FAILURE'
+        }
+      }
+    }
+
+    stage("finalize")
+    {
+      steps
+      {
+        githubNotify context: 'OSX', description: 'OK',  status: 'SUCCESS'
+      }
+    }
+  }
+}

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.