--- /dev/null
+- defaults:
+ name: lttng-ivc
+ description: |
+ LTTng Inter Version Compatibility test suite.
+
+ <p>Job is managed by Jenkins Job Builder.</p>
+
+ project-type: freestyle
+
+ wrappers:
+ - workspace-cleanup
+ - timestamps
+ - ansicolor:
+ colormap: xterm
+
+ scm:
+ - git:
+ url: git://github.com/{github_user}/{github_name}.git
+ browser: githubweb
+ browser-url: https://github.com/{github_user}/{github_name}
+ branches:
+ - origin/{version}
+ basedir: src
+ skip-tag: true
+
+ triggers:
+ - timed: "@daily"
+
+ properties:
+ - build-discarder:
+ num-to-keep: 2
+ - github:
+ url: https://github.com/{github_user}/{github_name}
+
+
+## Templates
+- job-template:
+ name: lttng-ivc-{version}
+ defaults: lttng-ivc
+
+ project-type: matrix
+ node: 'master' # Applies only to matrix flyweight task
+ axes:
+ - axis:
+ type: slave
+ name: arch
+ values: '{obj:arch}'
+ - axis:
+ type: user-defined
+ name: liburcu_version
+ values: '{obj:liburcu_version}'
+
+ builders:
+ - copyartifact:
+ project: liburcu_${{liburcu_version}}_build/arch=${{arch}},conf=std,build=std
+ which-build: last-successful
+ stable: false
+ filter: 'build/**'
+ target: 'deps/liburcu'
+ - shell:
+ !include-raw-escape: scripts/lttng-ivc/build.sh
+
+ publishers:
+ - archive:
+ artifacts: 'artifacts/**'
+ allow-empty: false
+ - junit:
+ results: result.xml
+ - workspace-cleanup
+ - email-ext:
+ recipients: '{obj:email_to}'
+ reply-to: ci-notification@lists.lttng.org
+ always: false
+ unstable: false
+ first-failure: true
+ first-unstable: true
+ not-built: false
+ aborted: false
+ regression: false
+ failure: false
+ second-failure: false
+ improvement: false
+ still-failing: false
+ success: false
+ fixed: false
+ fixed-unhealthy: true
+ still-unstable: false
+ pre-build: false
+ matrix-trigger: only-parent
+ send-to:
+ - recipients
+
+## Project
+- project:
+ name: lttng-ivc
+ github_user: lttng
+ github_name: lttng-ivc
+ email_to: "ci-notification@lists.lttng.org, cc:joraj@efficios.com"
+ version:
+ - staging
+ - master
+ jobs:
+ - 'lttng-ivc-{version}':
+ version: master
+ arch: !!python/tuple [x86-32, x86-64]
+ liburcu_version: !!python/tuple [master]
+ - 'lttng-ivc-{version}':
+ # Send only to maintainer
+ email_to: "joraj@efficios.com"
+ version: staging
+ arch: !!python/tuple [x86-32, x86-64]
+ liburcu_version: !!python/tuple [master]
+
--- /dev/null
+#!/bin/bash -exu
+#
+# Copyright (C) 2017 - Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
+#
+# 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 <http://www.gnu.org/licenses/>.
+
+PYTHON3="python3"
+P3_VERSION=$($PYTHON3 -c "import sys;print(sys.version[:3])")
+
+URCU_INCS=${WORKSPACE}/deps/liburcu/build/include
+URCU_LIBS=${WORKSPACE}/deps/liburcu/build/lib
+
+# Get liburcu setup
+export LD_LIBRARY_PATH="$URCU_LIBS:${LD_LIBRARY_PATH:-}"
+export CPPFLAGS="${CPPFLAGS:-} -I$URCU_INCS"
+export LDFLAGS="${LDFLAGS:-} -L$URCU_LIBS"
+
+PYENV_HOME=$WORKSPACE/.pyenv/
+
+# Delete previously built virtualenv if any
+if [ -d "$PYENV_HOME" ]; then
+ rm -rf "$PYENV_HOME"
+fi
+
+# Create virtualenv and install necessary packages
+virtualenv --system-site-packages -p $PYTHON3 "$PYENV_HOME"
+
+set +ux
+. "$PYENV_HOME/bin/activate"
+set -ux
+
+pip install --quiet tox
+
+# Hack for path too long in venv wrapper shebang
+TOXWORKDIR=$(mktemp -d)
+export TOXWORKDIR
+
+cd src/
+
+# Run test suite via tox
+set +e
+tox -v -- --junit-xml="${WORKSPACE}/result.xml"
+set -e
+
+# Save
+cp -r "$TOXWORKDIR" "${WORKSPACE}/artifacts"
+rm -rf "$TOXWORKDIR"
+
+# EOF
+