From e3022ad9162a856857f743fe1555e67dcba8d3d4 Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Fri, 14 Aug 2015 20:23:25 -0400 Subject: [PATCH] Added initial liburcu jjb jobs --- .gitignore | 2 + jobs/liburcu.yaml | 158 ++++++++++++++++++ .../liburcu-master.sh => liburcu/build.sh} | 18 ++ scripts/liburcu/scan-build.sh | 66 ++++++++ scripts/userspace-rcu/build.sh | 34 ---- scripts/userspace-rcu/liburcu-stable-0.6.sh | 34 ---- scripts/userspace-rcu/liburcu-stable-0.7.sh | 78 --------- scripts/userspace-rcu/liburcu-stable-0.8.sh | 78 --------- 8 files changed, 244 insertions(+), 224 deletions(-) create mode 100644 .gitignore create mode 100644 jobs/liburcu.yaml rename scripts/{userspace-rcu/liburcu-master.sh => liburcu/build.sh} (67%) create mode 100755 scripts/liburcu/scan-build.sh delete mode 100755 scripts/userspace-rcu/build.sh delete mode 100755 scripts/userspace-rcu/liburcu-stable-0.6.sh delete mode 100755 scripts/userspace-rcu/liburcu-stable-0.7.sh delete mode 100755 scripts/userspace-rcu/liburcu-stable-0.8.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a077816 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +test/ +.venv/ diff --git a/jobs/liburcu.yaml b/jobs/liburcu.yaml new file mode 100644 index 0000000..78eec53 --- /dev/null +++ b/jobs/liburcu.yaml @@ -0,0 +1,158 @@ +# {project}_{version}_{jobtype} +# liburcu_stable-0.8_build +# +# jobtypes: +# - build +# - portbuild +# - cppcheck +# - coverity +# - scan-build +# - pylint + +- defaults: + name: liburcu + description: | + liburcu is a LGPLv2.1 userspace RCU (read-copy-update) library. This + data synchronization library provides read-side access which scales + linearly with the number of cores. It does so by allowing multiples + copies of a given data structure to live at the same time, and by + monitoring the data structure accesses to detect grace periods after + which memory reclamation is possible. + + liburcu-cds provides efficient data structures based on RCU and + lock-free algorithms. Those structures include hash tables, queues, + stacks, and doubly-linked lists. + +

Job is managed by Jenkins Job Builder.

+ + project-type: freestyle + + logrotate: + daysToKeep: -1 + numToKeep: 2 + artifactDaysToKeep: -1 + artifactNumToKeep: -1 + + wrappers: + - workspace-cleanup + - timestamps + - ansicolor + + scm: + - git: + url: https://github.com/urcu/userspace-rcu.git + browser: githubweb + browser-url: https://github.com/urcu/userspace-rcu.git + branches: + - origin/{version} + + triggers: + - pollscm: "@hourly" + + properties: + - github: + url: https://github.com/urcu/userspace-rcu/ + + +## Templates +- job-template: + name: liburcu_{version}_build + defaults: liburcu + + project-type: matrix + axes: + - axis: + type: slave + name: arch + values: + - x86-32 + - x86-64 + - axis: + type: user-defined + name: conf + values: + - std + - static + - tls_fallback + - axis: + type: user-defined + name: build + values: + - std + - oot + - dist + + builders: + - shell: + !include-raw-escape scripts/liburcu/build.sh + + # TODO: Scan for open tasks + publishers: + - warnings: + console-log-parsers: + - 'GNU Make + GNU C Compiler (gcc)' + - archive: + artifacts: 'build/**' + allow-empty: false + fingerprint: true + - trigger: + project: lttng-ust-{version} + threshold: SUCCESS + +- job-template: + name: liburcu_{version}_cppcheck + defaults: liburcu + + triggers: + - pollscm: "@daily" + + builders: + - shell: | + rm -f liburcu-cppcheck.xml + cppcheck --enable=all --xml --xml-version=2 $WORKSPACE 2> liburcu-cppcheck.xml + + publishers: + - archive: + artifacts: 'liburcu-cppcheck.xml' + allow-empty: false + fingerprint: true + - cppcheck: + pattern: 'liburcu-cppcheck.xml' + - email: + recipients: 'ci-notification@lists.lttng.org' + notify-every-unstable-build: true + send-to-individuals: false + +- job-template: + name: liburcu_{version}_scan-build + defaults: liburcu + node: 'x86-64' + + triggers: + - pollscm: "@daily" + + builders: + - shell: + !include-raw-escape scripts/liburcu/scan-build.sh + + publishers: + - html-publisher: + name: 'HTML Report' + dir: 'scan-build-archive/' + files: 'index.html' + +# TODO: liburcu_{version}_coverity + + +## Project +- project: + name: liburcu + version: + - stable-0.7 + - stable-0.8 + - master + jobs: + - 'liburcu_{version}_build' + - 'liburcu_{version}_cppcheck' + - 'liburcu_{version}_scan-build' + diff --git a/scripts/userspace-rcu/liburcu-master.sh b/scripts/liburcu/build.sh similarity index 67% rename from scripts/userspace-rcu/liburcu-master.sh rename to scripts/liburcu/build.sh index 52fbba4..472dc28 100755 --- a/scripts/userspace-rcu/liburcu-master.sh +++ b/scripts/liburcu/build.sh @@ -1,3 +1,21 @@ +#!/bin/sh +# +# Copyright (C) 2015 - Jonathan Rajotte-Julien +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + + # Create build directory rm -rf $WORKSPACE/build mkdir -p $WORKSPACE/build diff --git a/scripts/liburcu/scan-build.sh b/scripts/liburcu/scan-build.sh new file mode 100755 index 0000000..ed80c0e --- /dev/null +++ b/scripts/liburcu/scan-build.sh @@ -0,0 +1,66 @@ +#!/bin/sh +# +# Copyright (C) 2015 - Jonathan Rajotte-Julien +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + + +# do not exit immediately if any command fails +set +e + +# temp directory to store the scan-build report +SCAN_BUILD_TMPDIR=$( mktemp -d /tmp/scan-build.XXXXXX ) + +# directory to use for archiving the scan-build report +SCAN_BUILD_ARCHIVE="${WORKSPACE}/scan-build-archive" + +# Create build directory +rm -rf $WORKSPACE/build +mkdir -p $WORKSPACE/build + +export CFLAGS="-O0 -g -DDEBUG" +PREFIX="$WORKSPACE/build" + +./bootstrap +./configure --prefix=$PREFIX +make clean +# generate the scan-build report +scan-build -k -o ${SCAN_BUILD_TMPDIR} make + +# get the directory name of the report created by scan-build +SCAN_BUILD_REPORT=$( find ${SCAN_BUILD_TMPDIR} -maxdepth 1 -not -empty -not -name `basename ${SCAN_BUILD_TMPDIR}` ) +rc=$? + +if [ -z "${SCAN_BUILD_REPORT}" ]; then + echo ">>> No new bugs identified." + echo ">>> No scan-build report has been generated" +else + echo ">>> New scan-build report generated in ${SCAN_BUILD_REPORT}" + + if [ ! -d "${SCAN_BUILD_ARCHIVE}" ]; then + echo ">>> Creating scan-build archive directory" + install -d -o jenkins -g jenkins -m 0755 "${SCAN_BUILD_ARCHIVE}" + else + echo ">>> Removing any previous scan-build reports from ${SCAN_BUILD_ARCHIVE}" + rm -f ${SCAN_BUILD_ARCHIVE}/* + fi + + echo ">>> Archiving scan-build report to ${SCAN_BUILD_ARCHIVE}" + mv ${SCAN_BUILD_REPORT}/* ${SCAN_BUILD_ARCHIVE}/ + + echo ">>> Removing any temporary files and directories" + rm -rf "${SCAN_BUILD_TMPDIR}" +fi + +exit ${rc} diff --git a/scripts/userspace-rcu/build.sh b/scripts/userspace-rcu/build.sh deleted file mode 100755 index 41da104..0000000 --- a/scripts/userspace-rcu/build.sh +++ /dev/null @@ -1,34 +0,0 @@ -# Create build directory -rm -rf $WORKSPACE/build -mkdir -p $WORKSPACE/build - -PREFIX="$WORKSPACE/build" - -./bootstrap - -CONF_OPTS="" - -case "$conf" in -static) - echo "Static build" - CONF_OPTS="--enable-static --disable-shared" - ;; -tls_fallback) - echo "Using pthread_getspecific() to emulate TLS" - CONF_OPTS="--disable-compiler-tls" - ;; -*) - echo "Standard build" - CONF_OPTS="" - ;; -esac - -./configure --prefix=$PREFIX $CONF_OPTS - -make -make install -make clean - -# Cleanup rpath and libtool .la files -find $WORKSPACE/build/lib -name "*.so" -exec chrpath --delete {} \; -find $WORKSPACE/build/lib -name "*.la" -exec rm -f {} \; diff --git a/scripts/userspace-rcu/liburcu-stable-0.6.sh b/scripts/userspace-rcu/liburcu-stable-0.6.sh deleted file mode 100755 index 41da104..0000000 --- a/scripts/userspace-rcu/liburcu-stable-0.6.sh +++ /dev/null @@ -1,34 +0,0 @@ -# Create build directory -rm -rf $WORKSPACE/build -mkdir -p $WORKSPACE/build - -PREFIX="$WORKSPACE/build" - -./bootstrap - -CONF_OPTS="" - -case "$conf" in -static) - echo "Static build" - CONF_OPTS="--enable-static --disable-shared" - ;; -tls_fallback) - echo "Using pthread_getspecific() to emulate TLS" - CONF_OPTS="--disable-compiler-tls" - ;; -*) - echo "Standard build" - CONF_OPTS="" - ;; -esac - -./configure --prefix=$PREFIX $CONF_OPTS - -make -make install -make clean - -# Cleanup rpath and libtool .la files -find $WORKSPACE/build/lib -name "*.so" -exec chrpath --delete {} \; -find $WORKSPACE/build/lib -name "*.la" -exec rm -f {} \; diff --git a/scripts/userspace-rcu/liburcu-stable-0.7.sh b/scripts/userspace-rcu/liburcu-stable-0.7.sh deleted file mode 100755 index 52fbba4..0000000 --- a/scripts/userspace-rcu/liburcu-stable-0.7.sh +++ /dev/null @@ -1,78 +0,0 @@ -# Create build directory -rm -rf $WORKSPACE/build -mkdir -p $WORKSPACE/build - -PREFIX="$WORKSPACE/build" - -./bootstrap - -CONF_OPTS="" - -case "$conf" in -static) - echo "Static build" - CONF_OPTS="--enable-static --disable-shared" - ;; -tls_fallback) - echo "Using pthread_getspecific() to emulate TLS" - CONF_OPTS="--disable-compiler-tls" - ;; -*) - echo "Standard build" - CONF_OPTS="" - ;; -esac - -# Build type -# oot : out-of-tree build -# dist: build via make dist -# * : normal tree build -# -# Make sure to move to the build_path and configure -# before continuing - -BUILD_PATH=$WORKSPACE -case "$build" in - oot) - echo "Out of tree build" - BUILD_PATH=$WORKSPACE/oot - mkdir -p $BUILD_PATH - cd $BUILD_PATH - $WORKSPACE/configure --prefix=$PREFIX $CONF_OPTS - ;; - dist) - echo "Distribution out of tree build" - BUILD_PATH=`mktemp -d` - - # Initial configure and generate tarball - ./configure - make dist - - mkdir -p $BUILD_PATH - cp *.tar.* $BUILD_PATH/ - cd $BUILD_PATH - - # Ignore level 1 of tar - tar xvf *.tar.* --strip 1 - - $BUILD_PATH/configure --prefix=$PREFIX $CONF_OPTS - ;; - *) - BUILD_PATH=$WORKSPACE - echo "Standard tree build" - $WORKSPACE/configure --prefix=$PREFIX $CONF_OPTS - ;; -esac - -make -make install -make clean - -# Cleanup rpath and libtool .la files -find $WORKSPACE/build/lib -name "*.so" -exec chrpath --delete {} \; -find $WORKSPACE/build/lib -name "*.la" -exec rm -f {} \; - -# Cleanup temp directory of dist build -if [ $build = "dist" ]; then - rm -rf $BUILD_PATH -fi diff --git a/scripts/userspace-rcu/liburcu-stable-0.8.sh b/scripts/userspace-rcu/liburcu-stable-0.8.sh deleted file mode 100755 index 52fbba4..0000000 --- a/scripts/userspace-rcu/liburcu-stable-0.8.sh +++ /dev/null @@ -1,78 +0,0 @@ -# Create build directory -rm -rf $WORKSPACE/build -mkdir -p $WORKSPACE/build - -PREFIX="$WORKSPACE/build" - -./bootstrap - -CONF_OPTS="" - -case "$conf" in -static) - echo "Static build" - CONF_OPTS="--enable-static --disable-shared" - ;; -tls_fallback) - echo "Using pthread_getspecific() to emulate TLS" - CONF_OPTS="--disable-compiler-tls" - ;; -*) - echo "Standard build" - CONF_OPTS="" - ;; -esac - -# Build type -# oot : out-of-tree build -# dist: build via make dist -# * : normal tree build -# -# Make sure to move to the build_path and configure -# before continuing - -BUILD_PATH=$WORKSPACE -case "$build" in - oot) - echo "Out of tree build" - BUILD_PATH=$WORKSPACE/oot - mkdir -p $BUILD_PATH - cd $BUILD_PATH - $WORKSPACE/configure --prefix=$PREFIX $CONF_OPTS - ;; - dist) - echo "Distribution out of tree build" - BUILD_PATH=`mktemp -d` - - # Initial configure and generate tarball - ./configure - make dist - - mkdir -p $BUILD_PATH - cp *.tar.* $BUILD_PATH/ - cd $BUILD_PATH - - # Ignore level 1 of tar - tar xvf *.tar.* --strip 1 - - $BUILD_PATH/configure --prefix=$PREFIX $CONF_OPTS - ;; - *) - BUILD_PATH=$WORKSPACE - echo "Standard tree build" - $WORKSPACE/configure --prefix=$PREFIX $CONF_OPTS - ;; -esac - -make -make install -make clean - -# Cleanup rpath and libtool .la files -find $WORKSPACE/build/lib -name "*.so" -exec chrpath --delete {} \; -find $WORKSPACE/build/lib -name "*.la" -exec rm -f {} \; - -# Cleanup temp directory of dist build -if [ $build = "dist" ]; then - rm -rf $BUILD_PATH -fi -- 2.34.1