Commit e0c8ff16 authored by Dominik Charousset's avatar Dominik Charousset

Update CI pipeline

parent a0d42816
#!/bin/sh
set -x
set -e
# This script expects the CAF source tree under 'sources', builds in 'build' and
# installs to 'bundle'. Additionally, the script expects the CMake pre-load
# script 'cmake-init.txt' in the current working directorys.
InitFile="$PWD/cmake-init.txt"
SourceDir="$PWD/sources"
BuildDir="$PWD/build"
cat "$InitFile"
# Prefer cmake3 over "regular" cmake (cmake == cmake2 on RHEL).
if command -v cmake3 >/dev/null 2>&1 ; then
CMakeCommand="cmake3"
CTestCommand="ctest3"
elif command -v cmake >/dev/null 2>&1 ; then
CMakeCommand="cmake"
CTestCommand="ctest"
else
echo "No CMake found."
exit 1
fi
# Make sure all directories exist, then enter build directory.
mkdir -p "$BuildDir"
cd "$BuildDir"
# Run CMake and CTest.
$CMakeCommand -C "$InitFile" "$SourceDir"
if [ -z "$CAF_NUM_CORES" ]; then
$CMakeCommand --build . --target install
else
$CMakeCommand --build . --target install -- -j $CAF_NUM_CORES
fi
$CTestCommand
FROM centos:7
RUN yum update -y \
&& yum install -y centos-release-scl \
&& yum install -y epel-release \
&& yum update -y \
&& yum clean all
RUN yum install -y \
cmake3 \
devtoolset-7 \
devtoolset-7-libasan-devel \
devtoolset-7-libubsan-devel \
git \
make \
openssl-devel \
&& yum clean all
ENV CXX=/opt/rh/devtoolset-7/root/usr/bin/g++
FROM centos:8
RUN yum install -y \
cmake \
gcc-c++ \
libasan \
libubsan \
git \
make \
openssl-devel \
&& yum clean all
FROM debian:10
RUN apt update -y && \
apt upgrade -y
RUN apt install -y \
cmake \
g++ \
git \
libssl-dev \
make \
&& apt autoclean
FROM fedora:31
RUN dnf update -y && \
dnf clean all
RUN dnf install -y \
git \
make \
cmake \
gcc-c++ \
openssl-devel \
libasan \
libubsan \
&& dnf clean all
FROM fedora:32
RUN dnf update -y && \
dnf clean all
RUN dnf install -y \
git \
make \
cmake \
gcc-c++ \
openssl-devel \
libasan \
libubsan \
&& dnf clean all
FROM ubuntu:16.04
RUN apt update -y && \
apt upgrade -y
RUN apt install -y \
clang-8 \
cmake \
git \
libssl-dev \
make \
&& apt autoclean
ENV CXX=/usr/bin/clang++-8
FROM ubuntu:18.04
RUN apt update -y && \
apt upgrade -y
RUN apt install -y \
cmake \
g++-8 \
git \
libssl-dev \
make \
&& apt-get autoclean
ENV CXX=/usr/bin/g++-8
FROM ubuntu:20.04
ENV TZ=Europe/Berlin
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt update -y && \
apt upgrade -y
RUN apt install -y \
cmake \
g++ \
git \
libssl-dev \
make \
&& apt-get autoclean
......@@ -30,36 +30,67 @@ config = [
],
// Our build matrix. Keys are the operating system labels and values are build configurations.
buildMatrix: [
['Linux', [
builds: ['debug'],
tools: ['gcc7'],
// Various Linux builds for debug and release.
['centos-7', [
numCores: 4,
tags: ['docker'],
builds: ['debug', 'release'],
]],
['Linux', [
builds: ['debug'],
tools: ['gcc8'],
['centos-8', [
numCores: 4,
tags: ['docker'],
builds: ['debug', 'release'],
]],
['Linux', [
builds: ['debug'],
tools: ['gcc8'],
extraFlags: ['EXTRA_FLAGS=-std=c++17']
['debian-10', [
numCores: 4,
tags: ['docker'],
builds: ['debug', 'release'],
]],
['Linux', [
builds: ['release'],
tools: ['gcc8'],
['ubuntu-16.04', [
numCores: 4,
tags: ['docker'],
builds: ['debug', 'release'],
]],
['ubuntu-18.04', [
numCores: 4,
tags: ['docker'],
builds: ['debug', 'release'],
]],
['ubuntu-20.04', [
numCores: 4,
tags: ['docker'],
builds: ['debug', 'release'],
]],
['fedora-31', [
numCores: 4,
tags: ['docker'],
builds: ['debug', 'release'],
]],
['fedora-32', [
numCores: 4,
tags: ['docker'],
builds: ['debug', 'release'],
]],
// Other UNIX systems.
['macOS', [
numCores: 4,
builds: ['debug', 'release'],
tools: ['clang'],
extraFlags: [
'OPENSSL_ROOT_DIR=/usr/local/opt/openssl',
'OPENSSL_INCLUDE_DIR=/usr/local/opt/openssl/include',
],
]],
['FreeBSD', [
numCores: 4,
builds: ['debug', 'release'],
tools: ['clang'],
]],
// Non-UNIX systems.
['Windows', [
// TODO: debug build currently broken
//builds: ['debug', 'release'],
numCores: 4,
builds: ['release'],
tools: ['msvc'],
extraFlags: [
'CAF_BUILD_STATIC_ONLY:BOOL=yes',
],
]],
],
// Platform-specific environment settings.
......@@ -73,24 +104,7 @@ config = [
],
// CMake flags by OS and build type to override defaults for individual builds.
buildFlags: [
macOS: [
debug: defaultDebugBuildFlags + [
'OPENSSL_ROOT_DIR=/usr/local/opt/openssl',
'OPENSSL_INCLUDE_DIR=/usr/local/opt/openssl/include',
],
release: defaultReleaseBuildFlags + [
'OPENSSL_ROOT_DIR=/usr/local/opt/openssl',
'OPENSSL_INCLUDE_DIR=/usr/local/opt/openssl/include',
],
],
Windows: [
debug: defaultDebugBuildFlags + [
'CAF_BUILD_STATIC_ONLY:BOOL=yes',
],
release: defaultReleaseBuildFlags + [
'CAF_BUILD_STATIC_ONLY:BOOL=yes',
],
],
nop: [],
],
]
......@@ -143,35 +157,6 @@ pipeline {
buildParallel(config, PrettyJobBaseName)
}
}
// TODO: generate PDF from reStructuredText
// stage('Documentation') {
// agent { label 'pandoc' }
// steps {
// deleteDir()
// unstash('sources')
// dir('sources') {
// // Configure and build.
// cmakeBuild([
// buildDir: 'build',
// installation: 'cmake in search path',
// sourceDir: '.',
// cmakeArgs: '-DCAF_BUILD_TEX_MANUAL=yes',
// steps: [[
// args: '--target doc',
// withCmake: true,
// ]],
// ])
// sshagent(['84d71a75-cbb6-489a-8f4c-d0e2793201e9']) {
// sh """
// if [ "${env.GIT_BRANCH}" = "master" ]; then
// rsync -e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" -r -z --delete build/doc/html/ www.inet.haw-hamburg.de:/users/www/www.actor-framework.org/html/doc
// scp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null build/doc/manual.pdf www.inet.haw-hamburg.de:/users/www/www.actor-framework.org/html/pdf/manual.pdf
// fi
// """
// }
// }
// }
// }
stage('Notify') {
steps {
collectResults(config, PrettyJobName)
......
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