Merge pull request #507 from gummif/gfa/gha

Problem: Actions, travis and appveyor for CI
This commit is contained in:
Luca Boccassi 2021-07-16 18:19:38 +01:00 committed by GitHub
commit 73b18d558c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 246 deletions

View File

@ -1,130 +0,0 @@
# Travis CI script
language: cpp
dist: trusty
cache: ccache
sudo: false
matrix:
include:
##########################################################
# Clang on OSX
# Travis takes longer to start OSX instances,
# so leaving it first for the overall build to be faster.
##########################################################
- os: osx
osx_image: xcode9.1
compiler: clang
env: ENABLE_DRAFTS=ON
##########################################################
# GCC on Linux
##########################################################
# Coverage, GCC 7, draft enabled, latest libzmq (default)
- os: linux
python: 3.6
before_install:
- pip3 install --user cpp-coveralls
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7
- python3-pip
env:
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7" ENABLE_DRAFTS=ON COVERAGE=ON
after_success:
- coveralls -r . -E ".*external.*" -E ".*CMakeFiles.*" -E ".*tests/" -E ".*demo/" -E ".*libzmq.*/" -E ".*catch/" -b cppzmq-build --gcov-options '\-lp'
# GCC default, draft disabled, older libzmq with pkg-config
- os: linux
env: ZMQ_VERSION=4.2.0 BUILD_TYPE=pkgconfig
# GCC default, draft disabled, latest 4.2.x libzmq (defined in ci_build.sh)
- os: linux
env: ZMQ_VERSION=4.2.5
# GCC default, draft disabled, default libzmq (defined in ci_build.sh)
- os: linux
# GCC 6, draft disabled (default), older libzmq
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-6
env:
- ZMQ_VERSION=4.2.5 MATRIX_EVAL="CC=gcc-6 && CXX=g++-6"
# GCC 4.9, draft disabled (default), latest libzmq (default)
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.9
env:
- MATRIX_EVAL="CC=gcc-4.9 && CXX=g++-4.9" CMAKE_CPP_STD=-DCMAKE_CXX_STANDARD=11
# GCC 7, draft enabled, latest libzmq (default)
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7
env:
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7" ENABLE_DRAFTS=ON
# Clang 8.0, draft disabled (default), latest libzmq (default), C++17
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-8
packages:
- g++-9
- clang-8
env:
- MATRIX_EVAL="CC=clang-8 && CXX=clang++-8" CMAKE_CPP_STD=-DCMAKE_CXX_STANDARD=17
# - env: BUILD_TYPE=cmake DO_CLANG_FORMAT_CHECK=1 CLANG_FORMAT=/usr/local/clang-5.0.0/bin/clang-format
# os: linux
# addons:
# apt:
# sources:
# - llvm-toolchain-trusty-5.0
# packages:
# - clang-5.0
before_script:
- mkdir -p /tmp/cmake.root
- |
if [ $TRAVIS_OS_NAME = 'linux' ]; then
CMAKE_PKG_SUFFIX="linux-x86_64"
else
CMAKE_PKG_SUFFIX="macos10.10-universal"
fi
- wget -qO- "https://cmake.org/files/v3.20/cmake-3.20.5-$CMAKE_PKG_SUFFIX.tar.gz" | tar --strip-components=1 -xz -C /tmp/cmake.root
- |
if [ $TRAVIS_OS_NAME = 'linux' ]; then
CMAKE_BIN_DIR="bin"
else
CMAKE_BIN_DIR="CMake.app/Contents/bin"
fi
- export PATH=/tmp/cmake.root/$CMAKE_BIN_DIR:$PATH
# Build and check this project
script:
- eval "${MATRIX_EVAL}"
- cmake --version
- ./ci_build.sh

View File

@ -1,5 +1,4 @@
[![Travis-CI Status](https://img.shields.io/travis/zeromq/cppzmq/master.svg?label=Linux%20|%20OSX)](https://travis-ci.org/zeromq/cppzmq)
[![Appveyor Status](https://img.shields.io/appveyor/ci/zeromq/cppzmq/master.svg?label=Windows)](https://ci.appveyor.com/project/zeromq/cppzmq/branch/master)
[![CI](https://github.com/zeromq/cppzmq/actions/workflows/ci.yml/badge.svg)](https://github.com/zeromq/cppzmq/actions)
[![Coverage Status](https://coveralls.io/repos/github/zeromq/cppzmq/badge.svg?branch=master)](https://coveralls.io/github/zeromq/cppzmq?branch=master)
[![License](https://img.shields.io/github/license/zeromq/cppzmq.svg)](https://github.com/zeromq/cppzmq/blob/master/LICENSE)
@ -25,14 +24,13 @@ Supported platforms
- Only a subset of the platforms that are supported by libzmq itself are supported. Some features already require a compiler supporting C++11. In the future, probably all features will require C++11. To build and run the tests, CMake and Catch are required.
- Any libzmq 4.x version is expected to work. DRAFT features may only work for the most recent tested version. Currently explicitly tested libzmq versions are
- 4.2.0 (without DRAFT API)
- 4.2.5 (without DRAFT API)
- 4.3.1 (with and without DRAFT API)
- 4.3.4 (with and without DRAFT API)
- Platforms with full support (i.e. CI executing build and tests)
- Ubuntu 14.04 x64 (with gcc 4.8.4) (without DRAFT API only)
- Ubuntu 14.04 x64 (with gcc 7.3.0)
- Visual Studio 2015 x86
- Visual Studio 2017 x86
- OSX (with clang xcode9.1) (without DRAFT API)
- Ubuntu 18.04 x64 (with gcc 4.8.5, 5.5.0, 7.5.0)
- Ubuntu 20.04 x64 (with gcc 9.3.0, 10.3.0 and clang 12)
- Visual Studio 2017 x64
- Visual Studio 2019 x64
- macOS 10.15 (with clang 12, without DRAFT API)
- Additional platforms that are known to work:
- We have no current reports on additional platforms that are known to work yet. Please add your platform here. If CI can be provided for them with a cloud-based CI service working with GitHub, you are invited to add CI, and make it possible to be included in the list above.
- Additional platforms that probably work:

View File

@ -1,38 +0,0 @@
version: build-{build}
os:
- Visual Studio 2017
- Visual Studio 2015
init:
- cmake --version
- msbuild /version
platform:
- Win32
- x64
configuration:
- Debug
environment:
ZMQ_VER: 4.2.5
cache:
- libzmq -> appveyor.yml
before_build:
- if not exist libzmq (
appveyor DownloadFile https://github.com/zeromq/libzmq/archive/v%ZMQ_VER%.zip &&
7z x v%ZMQ_VER%.zip >NUL &&
cmake -H./libzmq-%ZMQ_VER% -Blibzmq-%ZMQ_VER%/build -DCMAKE_INSTALL_PREFIX=libzmq -DENABLE_DRAFTS=ON -DWITH_PERF_TOOL=OFF -DZMQ_BUILD_TESTS=OFF -DENABLE_CPACK=OFF -A%PLATFORM% &&
cmake --build libzmq-%ZMQ_VER%/build --target install)
- cmake -H. -BBuild -DENABLE_DRAFTS=ON -DCMAKE_PREFIX_PATH=./libzmq -A%PLATFORM%
build:
project: Build/cppzmq.sln
verbosity: normal
test_script:
- cd Build
- ctest -V -C %configuration%

View File

@ -1,69 +0,0 @@
#!/usr/bin/env bash
set -x
set -e
BUILD_TYPE=${BUILD_TYPE:-cmake}
ZMQ_VERSION=${ZMQ_VERSION:-4.3.4}
ENABLE_DRAFTS=${ENABLE_DRAFTS:-OFF}
COVERAGE=${COVERAGE:-OFF}
LIBZMQ=${PWD}/libzmq-build
CPPZMQ=${PWD}/cppzmq-build
# Travis machines have 2 cores
JOBS=2
libzmq_install() {
curl -L https://github.com/zeromq/libzmq/archive/v"${ZMQ_VERSION}".tar.gz \
>zeromq.tar.gz
tar -xvzf zeromq.tar.gz
if [ "${BUILD_TYPE}" = "cmake" ] ; then
cmake -Hlibzmq-${ZMQ_VERSION} -B${LIBZMQ} -DWITH_PERF_TOOL=OFF \
-DZMQ_BUILD_TESTS=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DENABLE_DRAFTS=${ENABLE_DRAFTS}
cmake --build ${LIBZMQ} -- -j${JOBS}
elif [ "${BUILD_TYPE}" = "pkgconfig" ] ; then
pushd .
cd libzmq-${ZMQ_VERSION}
./autogen.sh &&
./configure --prefix=${LIBZMQ} &&
make -j${JOBS}
make install
popd
fi
}
# build zeromq first
cppzmq_build() {
pushd .
CMAKE_PREFIX_PATH=${LIBZMQ} \
cmake -H. -B${CPPZMQ} -DENABLE_DRAFTS=${ENABLE_DRAFTS} \
-DCOVERAGE=${COVERAGE} \
${CMAKE_CPP_STD:-}
cmake --build ${CPPZMQ} -- -j${JOBS}
popd
}
cppzmq_tests() {
pushd .
cd ${CPPZMQ}
ctest -V -j${JOBS}
popd
}
cppzmq_demo() {
pushd .
CMAKE_PREFIX_PATH=${LIBZMQ}:${CPPZMQ} \
cmake -Hdemo -Bdemo/build
cmake --build demo/build
cd demo/build
ctest -V
popd
}
if [ "${ZMQ_VERSION}" != "" ] ; then libzmq_install ; fi
cppzmq_build
cppzmq_tests
cppzmq_demo