From bfda293c37daa85e847a72af27d573cd9655e77b Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Sat, 1 Jul 2023 17:12:42 -0400 Subject: [PATCH] [CI] add arm64 ampere linux build --- contrib/ci/Jenkinsfile.ampere | 133 ++++++++++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 contrib/ci/Jenkinsfile.ampere diff --git a/contrib/ci/Jenkinsfile.ampere b/contrib/ci/Jenkinsfile.ampere new file mode 100644 index 0000000000..e33f823ef4 --- /dev/null +++ b/contrib/ci/Jenkinsfile.ampere @@ -0,0 +1,133 @@ +#!groovy + +/* + +This Jenkins job runs a build on Ampere ARM64 with Ubuntu + +See https://ci.tjhei.info/job/dealii-ampere/ for details. + +*/ + +/* +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.ampere + - scan: every 4 hours + - discard: 5+ items +*/ + +// load library https://github.com/tjhei/jenkins-stuff to provide +// killold.killOldBuilds() function: +@Library('tjhei') _ + +pipeline +{ + agent none + + stages + { + stage("abort old") + { + agent none + steps + { + githubNotify context: 'Jenkins: ampere', description: 'initializing...', status: 'PENDING' + // kill older builds in this PR: + script { killold.killOldBuilds() } + } + } + + stage("main") + { + agent + { + node + { + label 'ampere' + } + } + + post { cleanup { cleanWs() } } + + stages + { + stage("check") + { + when { + not { + anyOf { + branch 'master' + branch pattern: "dealii-*", comparator: "GLOB" + } + } + } + + steps + { + githubNotify context: 'Jenkins: ampere', 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: 'Jenkins: ampere', description: 'need ready to test label and /rebuild', status: 'PENDING' + script + { + currentBuild.result='NOT_BUILT' + } + } + } + } + + stage('build') + { + steps + { + timeout(time: 2, unit: 'HOURS') + { + sh "echo \"building on node ${env.NODE_NAME}\"" + sh '''#!/bin/bash + set -e + set -x + mkdir build && cd build + export CXX=clang++-15 + export CC=clang-15 + cmake \ + -D DEAL_II_WITH_MPI=OFF \ + -D DEAL_II_CXX_FLAGS="--std=c++17" \ + -D DEAL_II_EARLY_DEPRECATIONS=ON \ + -D CMAKE_BUILD_TYPE=Debug \ + -G Ninja \ + $WORKSPACE/ + ninja + ninja test # quicktests + ''' + githubNotify context: 'Jenkins: ampere', description: 'OK', status: 'SUCCESS' + } + } + + post + { + always + { + archiveArtifacts artifacts: 'build/detailed.log', fingerprint: true + } + + failure + { + githubNotify context: 'Jenkins: ampere', description: 'build failed', status: 'FAILURE' + } + } + } + + } + } + } +} -- 2.39.5