Commit 27a63fa0 authored by Dominik Charousset's avatar Dominik Charousset Committed by Joseph Noir

Try whether stashing works across nodes

parent 50fc6861
...@@ -42,15 +42,20 @@ def msbuild_opts = "-DCAF_BUILD_STATIC_ONLY:BOOL=yes " + ...@@ -42,15 +42,20 @@ def msbuild_opts = "-DCAF_BUILD_STATIC_ONLY:BOOL=yes " +
pipeline { pipeline {
agent none agent none
environment {
LD_LIBRARY_PATH = "$WORKSPACE/caf-sources/build/lib"
DYLD_LIBRARY_PATH = "$WORKSPACE/caf-sources/build/lib"
ASAN_OPTIONS = 'detect_leaks=1'
}
stages { stages {
stage ('Preparation') { stage ('Git Checkout') {
steps { steps {
node ('master') { node ('master') {
echo "Starting Jenkins stuff" deleteDir()
// TODO: pull github branch into mirror dir('caf-sources') {
// TODO: set URL, refs, prNum? checkout scm
// TODO: maybe static tests? }
stash includes: 'caf-sources/**', name: 'caf-sources'
} }
} }
} }
...@@ -59,32 +64,32 @@ pipeline { ...@@ -59,32 +64,32 @@ pipeline {
// gcc builds // gcc builds
stage ("Linux && gcc4.8") { stage ("Linux && gcc4.8") {
agent { label "Linux && gcc4.8" } agent { label "Linux && gcc4.8" }
steps { do_unix_stuff("Linux && gcc4.8", gcc_cmake_opts) } steps { do_unix_stuff(gcc_cmake_opts) }
} }
stage ("Linux && gcc4.9") { stage ("Linux && gcc4.9") {
agent { label "Linux && gcc4.9" } agent { label "Linux && gcc4.9" }
steps { do_unix_stuff("Linux && gcc4.9", gcc_cmake_opts) } steps { do_unix_stuff(gcc_cmake_opts) }
} }
stage ("Linux && gcc5.1") { stage ("Linux && gcc5.1") {
agent { label "Linux && gcc5.1" } agent { label "Linux && gcc5.1" }
steps { do_unix_stuff("Linux && gcc5.1", gcc_cmake_opts) } steps { do_unix_stuff(gcc_cmake_opts) }
} }
stage ("Linux && gcc6.3") { stage ("Linux && gcc6.3") {
agent { label "Linux && gcc6.3" } agent { label "Linux && gcc6.3" }
steps { do_unix_stuff("Linux && gcc6.3", gcc_cmake_opts) } steps { do_unix_stuff(gcc_cmake_opts) }
} }
stage ("Linux && gcc7.2") { stage ("Linux && gcc7.2") {
agent { label "Linux && gcc7.2" } agent { label "Linux && gcc7.2" }
steps { do_unix_stuff("Linux && gcc7.2", gcc_cmake_opts) } steps { do_unix_stuff(gcc_cmake_opts) }
} }
// clang builds // clang builds
stage ("macOS && clang") { stage ("macOS && clang") {
agent { label "macOS && clang" } agent { label "macOS && clang" }
steps { do_unix_stuff("macOS && clang", clang_cmake_opts) } steps { do_unix_stuff(clang_cmake_opts) }
} }
stage('Linux && clang && LeakSanitizer') { stage('Linux && clang && LeakSanitizer') {
agent { label "Linux && clang && LeakSanitizer" } agent { label "Linux && clang && LeakSanitizer" }
steps { do_unix_stuff("Linux && clang && LeakSanitizer", clang_cmake_opts) } steps { do_unix_stuff(clang_cmake_opts) }
} }
// windows builds // windows builds
stage('msbuild') { stage('msbuild') {
...@@ -116,41 +121,36 @@ pipeline { ...@@ -116,41 +121,36 @@ pipeline {
} }
} }
def do_unix_stuff(tags, def do_unix_stuff(cmake_opts = "",
cmake_opts = "",
build_type = "Debug", build_type = "Debug",
generator = "Unix Makefiles", generator = "Unix Makefiles",
build_opts = "", build_opts = "",
clean_build = true) { clean_build = true) {
deleteDir() deleteDir()
// TODO: pull from mirror, not from GitHub, (RIOT fetch func?) unstash('caf-sources')
checkout scm dir('caf-sources') {
// Configure and build. // Configure and build.
cmakeBuild buildDir: 'build', buildType: "$build_type", cleanBuild: clean_build, cmakeArgs: "$cmake_opts", generator: "$generator", installation: 'cmake in search path', preloadScript: '../cmake/jenkins.cmake', sourceDir: '.', steps: [[args: 'all']] cmakeBuild([
// Some setup also done in previous setups. buildDir: 'build',
ret = sh(returnStatus: true, buildType: "$build_type",
script: """#!/bin/bash +ex cleanBuild: clean_build,
cd build || exit 1 cmakeArgs: "$cmake_opts",
if [ `uname` = "Darwin" ] ; then generator: "$generator",
export DYLD_LIBRARY_PATH="$PWD/build/lib" installation: 'cmake in search path',
elif [ `uname` = "FreeBSD" ] ; then preloadScript: '../cmake/jenkins.cmake',
export LD_LIBRARY_PATH="$PWD/build/lib" sourceDir: '.',
else steps: [[args: 'all']],
export LD_LIBRARY_PATH="$PWD/build/lib" ])
export ASAN_OPTIONS=detect_leaks=1 // Test.
fi ctest([
exit 0""") arguments: '--output-on-failure',
if (ret) { installation: 'cmake auto install',
echo "[!!!] Setting up variables failed!" workingDir: 'build',
currentBuild.result = 'FAILURE' ])
return
} }
// Test.
ctest arguments: '--output-on-failure', installation: 'cmake auto install', workingDir: 'build'
} }
def do_ms_stuff(tags, def do_ms_stuff(cmake_opts = "",
cmake_opts = "",
build_type = "Debug", build_type = "Debug",
generator = "Visual Studio 15 2017", generator = "Visual Studio 15 2017",
build_opts = "", build_opts = "",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment