Unverified Commit b3b66463 authored by Dominik Charousset's avatar Dominik Charousset Committed by GitHub

Merge pull request #1431

Bring back Jenkins for Linux builds
parents d5113840 6ed743e5
FROM ubuntu:18.04
RUN apt update -y \
&& apt upgrade -y \
&& apt install -y \
cmake \
g++-8 \
git \
libssl-dev \
make \
&& apt-get autoclean
ENV CXX=/usr/bin/g++-8
......@@ -4,36 +4,11 @@ resources_template: &RESOURCES_TEMPLATE
cpu: 4
memory: 16GB
debug_build_template: &DEBUG_BUILD_TEMPLATE
build_script: .ci/run.sh build .ci/debug-flags.cmake . build
test_script: .ci/run.sh test build
asan_build_template: &ASAN_BUILD_TEMPLATE
build_script: .ci/run.sh build .ci/asan-flags.cmake . build
# The OpenSSL tests currently report memory leaks, see GH issue #1396.
test_script: .ci/run.sh test build openssl
# CentOS 7 EOL: June 2024
centos7_task:
container:
dockerfile: .ci/centos-7/Dockerfile
<< : *RESOURCES_TEMPLATE
<< : *DEBUG_BUILD_TEMPLATE
# Debian 11 EOL: June 2026
debian11_task:
container:
dockerfile: .ci/debian-11/Dockerfile
<< : *RESOURCES_TEMPLATE
<< : *DEBUG_BUILD_TEMPLATE
# Ubuntu 20.04 EOL: April 2025
ubuntu20_task:
container:
dockerfile: .ci/ubuntu-20.04/Dockerfile
<< : *RESOURCES_TEMPLATE
<< : *DEBUG_BUILD_TEMPLATE
# Run only when pushing to master or in PRs.
branch_filter: &BRANCH_FILTER
only_if: >
$CIRRUS_PR != '' ||
$CIRRUS_BRANCH == 'master'
# FreeBSD 12.4 EOL: December 2023
freebsd12_task:
......@@ -41,10 +16,9 @@ freebsd12_task:
image_family: freebsd-12-4
<< : *RESOURCES_TEMPLATE
prepare_script: .ci/freebsd-12/prepare.sh
# Test net.udp_datagram_socket is unstable on FreeBSD, see GH issue #1397.
# << : *DEBUG_BUILD_TEMPLATE
build_script: .ci/run.sh build .ci/debug-flags.cmake . build
test_script: .ci/run.sh test build net.udp_datagram_socket
<< : *BRANCH_FILTER
# FreeBSD 13.2 EOL: Release of 13.3 + 3 months
freebsd13_task:
......@@ -52,18 +26,9 @@ freebsd13_task:
image_family: freebsd-13-2
<< : *RESOURCES_TEMPLATE
prepare_script: .ci/freebsd-13/prepare.sh
# Test net.udp_datagram_socket is unstable on FreeBSD, see GH issue #1397.
# << : *DEBUG_BUILD_TEMPLATE
build_script: .ci/run.sh build .ci/debug-flags.cmake . build
test_script: .ci/run.sh test build net.udp_datagram_socket
# Fedora 38 EOL: May 2024
sanitizers_task:
container:
dockerfile: .ci/fedora-38/Dockerfile
<< : *RESOURCES_TEMPLATE
prepare_script: .ci/run.sh assert UBSanitizer
<< : *ASAN_BUILD_TEMPLATE
<< : *BRANCH_FILTER
# Windows Server 2019 EOL: January 2024
windows_task:
......@@ -74,3 +39,4 @@ windows_task:
<< : *RESOURCES_TEMPLATE
build_script: .ci/windows/build.cmd
test_script: .ci/windows/test.cmd
<< : *BRANCH_FILTER
name: check-formatting
on: [push, pull_request]
on: [pull_request]
jobs:
formatting:
runs-on: ubuntu-latest
......
name: check-typos
on: [push, pull_request]
on: [pull_request]
jobs:
typos:
runs-on: ubuntu-latest
......
[files]
extend-exclude = ["*.pem", "libcaf_net/test/pem.cpp"]
extend-exclude = ["*.pem", "libcaf_net/test/pem.cpp", "Jenkinsfile"]
[default.extend-words]
caf = "caf"
......
......@@ -3,6 +3,13 @@
All notable changes to this project will be documented in this file. The format
is based on [Keep a Changelog](https://keepachangelog.com).
## [Unreleased]
### Fixed
- Fix build errors with exceptions disabled.
## [0.19.2] - 2023-06-13
### Changed
......
#!/usr/bin/env groovy
@Library('caf-continuous-integration') _
// Configures the behavior of our stages.
config = [
// Version dependency for the caf-continuous-integration library.
ciLibVersion: 1.0,
// GitHub path to repository.
repository: 'actor-framework/actor-framework',
// List of enabled checks for email notifications.
checks: [
'build',
'tests',
],
// Default CMake flags by build type.
buildFlags: [
'CAF_ENABLE_ACTOR_PROFILER:BOOL=ON',
'CAF_ENABLE_EXAMPLES:BOOL=ON',
'CAF_ENABLE_RUNTIME_CHECKS:BOOL=ON',
],
// Our build matrix. Keys are the operating system labels and values are build configurations.
buildMatrix: [
// Various Linux builds.
['almalinux-8', [ // EOL: June 2029
numCores: 4,
tags: ['docker'],
builds: ['release'],
]],
['centos-7', [ // EOL July 2024
numCores: 4,
tags: ['docker'],
builds: ['release'],
]],
['debian-10', [ // EOL June 2024
numCores: 4,
tags: ['docker'],
builds: ['release'],
]],
['debian-11', [ // EOL June 2026
numCores: 4,
tags: ['docker'],
builds: ['release'],
]],
['fedora-37', [ // EOL December 2023
numCores: 4,
tags: ['docker'],
builds: ['release'],
]],
['fedora-38', [ // EOL June 2024
numCores: 4,
tags: ['docker'],
builds: ['release'],
]],
['ubuntu-20.04', [ // April 2025
numCores: 4,
tags: ['docker'],
builds: ['release'],
]],
['ubuntu-22.04', [ // April 2027
numCores: 4,
tags: ['docker'],
builds: ['release'],
]],
// Extra debug build with exceptions disabled.
['fedora-38', [
numCores: 4,
tags: ['docker'],
builds: ['debug'],
extraBuildFlags: [
'CAF_LOG_LEVEL:STRING=TRACE',
'CAF_ENABLE_ROBOT_TESTS:BOOL=ON',
'CAF_ENABLE_EXCEPTIONS:BOOL=OFF',
'CMAKE_CXX_FLAGS:STRING=-fno-exceptions',
],
]],
// Extra debug build for leak checking.
['fedora-38', [
numCores: 4,
tags: ['docker', 'LeakSanitizer'],
builds: ['debug'],
extraBuildFlags: [
'CAF_LOG_LEVEL:STRING=TRACE',
'CAF_ENABLE_ROBOT_TESTS:BOOL=ON',
'CAF_SANITIZERS:STRING=address',
],
extraBuildEnv: [
'ASAN_OPTIONS=detect_leaks=1',
],
]],
// Extra debug build with static libs, UBSan and hardening flags.
['fedora-38', [
numCores: 4,
tags: ['docker', 'UBSanitizer'],
builds: ['debug'],
extraBuildFlags: [
'CAF_LOG_LEVEL:STRING=TRACE',
'CAF_ENABLE_ROBOT_TESTS:BOOL=ON',
'BUILD_SHARED_LIBS:BOOL=OFF',
'CAF_SANITIZERS:STRING=address,undefined',
],
extraBuildEnv: [
'CXXFLAGS=-fno-sanitize-recover=undefined -D_GLIBCXX_DEBUG',
'LDFLAGS=-fno-sanitize-recover=undefined',
],
]],
],
]
// Declarative pipeline for triggering all stages.
pipeline {
options {
buildDiscarder(logRotator(numToKeepStr: '50', artifactNumToKeepStr: '3'))
}
agent {
label 'master'
}
environment {
PrettyJobBaseName = env.JOB_BASE_NAME.replace('%2F', '/')
PrettyJobName = "CAF/$PrettyJobBaseName #${env.BUILD_NUMBER}"
}
stages {
stage('Checkout') {
steps {
getSources(config)
}
}
stage('Build') {
steps {
buildParallel(config)
}
}
stage('Notify') {
steps {
collectResults(config, PrettyJobName)
}
}
}
post {
failure {
emailext(
subject: "$PrettyJobName: " + config['checks'].collect{ "⛔️ ${it}" }.join(', '),
recipientProviders: [culprits(), developers(), requestor(), upstreamDevelopers()],
attachLog: true,
compressLog: true,
body: "Check console output at ${env.BUILD_URL} or see attached log.\n",
)
notifyAllChecks(config, 'failure', 'Failed due to earlier error')
}
}
}
......@@ -97,8 +97,7 @@ int caf_main(caf::actor_system& sys, const config& cfg) {
// blocking I/O calls.
sys.spawn<caf::detached>([push, name] {
auto lines = caf::async::make_blocking_producer(push);
if (!lines)
throw std::logic_error("failed to create blocking producer");
assert(lines);
auto line = std::string{};
auto prefix = name + ": ";
while (std::getline(std::cin, line)) {
......
......@@ -5,6 +5,7 @@
#include "caf/byte_buffer.hpp"
#include "caf/cow_vector.hpp"
#include "caf/fwd.hpp"
#include "caf/raise_error.hpp"
#include "caf/result.hpp"
#include "caf/test/bdd_dsl.hpp"
#include "caf/type_id.hpp"
......@@ -98,8 +99,8 @@ public:
void on_next(const T& item) override {
if (!subscribed()) {
auto what = "on_next called but observer is in state" + to_string(state);
throw std::logic_error(what);
auto what = "on_next called but observer is in state " + to_string(state);
CAF_RAISE_ERROR(std::logic_error, what.c_str());
}
buf.emplace_back(item);
}
......
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