Use github actions instead of travis for CI.

This commit is contained in:
Christopher Kohlhoff 2020-12-29 08:31:42 +11:00
parent b84e6c16b2
commit b0f219ea42
2 changed files with 362 additions and 372 deletions

362
.github/workflows/ci.yml vendored Normal file
View File

@ -0,0 +1,362 @@
name: asio CI
on:
push:
branches: [ master, citest-*, github-actions-1 ]
jobs:
build:
strategy:
fail-fast: false
matrix:
build-type: ['sanity']
runs-on: [ubuntu-18.04, ubuntu-20.04, macos-latest]
compiler: [g++-4.8, g++-5, g++-6, g++-7, g++-8, g++-9, g++-10, clang++-10, g++]
cxx-std: ['c++03', 'c++11', 'c++14', 'c++17', 'c++2a']
separate-compilation: ['', '--enable-separate-compilation']
optim-level: ['-O0']
no-deprecated: ['']
select-reactor: ['', '-DASIO_DISABLE_EPOLL', '-DASIO_DISABLE_KQUEUE']
handler-tracking: ['']
boost: ['']
boost-url: ['']
exclude:
# Newer compilers don't run on ubuntu 18.04
- runs-on: ubuntu-18.04
compiler: g++
- runs-on: ubuntu-18.04
compiler: g++-7
- runs-on: ubuntu-18.04
compiler: g++-8
- runs-on: ubuntu-18.04
compiler: g++-9
- runs-on: ubuntu-18.04
compiler: g++-10
- runs-on: ubuntu-18.04
compiler: clang++-10
# Older compilers don't run on ubuntu 20.04
- runs-on: ubuntu-20.04
compiler: g++
- runs-on: ubuntu-20.04
compiler: g++-4.8
- runs-on: ubuntu-20.04
compiler: g++-4.9
- runs-on: ubuntu-20.04
compiler: g++-5
- runs-on: ubuntu-20.04
compiler: g++-6
# Versioned g++ and clang++ don't run on macOS
- runs-on: macos-latest
compiler: g++-4.8
- runs-on: macos-latest
compiler: g++-4.9
- runs-on: macos-latest
compiler: g++-5
- runs-on: macos-latest
compiler: g++-6
- runs-on: macos-latest
compiler: g++-7
- runs-on: macos-latest
compiler: g++-8
- runs-on: macos-latest
compiler: g++-9
- runs-on: macos-latest
compiler: g++-10
- runs-on: macos-latest
compiler: clang++-10
# Older compilers don't support newer std variants
- compiler: g++-4.8
cxx-std: c++14
- compiler: g++-4.8
cxx-std: c++17
- compiler: g++-4.8
cxx-std: c++2a
- compiler: g++-5
cxx-std: c++2a
- compiler: g++-6
cxx-std: c++2a
- compiler: g++-7
cxx-std: c++2a
# Specifying the select reactor is OS-specific
- runs-on: ubuntu-18.04
select-reactor: -DASIO_DISABLE_KQUEUE
- runs-on: ubuntu-20.04
select-reactor: -DASIO_DISABLE_KQUEUE
- runs-on: macos-latest
select-reactor: -DASIO_DISABLE_EPOLL
# Trim builds that use separate compilation
- compiler: g++-5
separate-compilation: --enable-separate-compilation
- compiler: g++-6
separate-compilation: --enable-separate-compilation
- compiler: g++-7
separate-compilation: --enable-separate-compilation
- compiler: g++-8
separate-compilation: --enable-separate-compilation
- compiler: g++-9
separate-compilation: --enable-separate-compilation
- runs-on: macos-latest
cxx-std: c++14
separate-compilation: --enable-separate-compilation
- runs-on: macos-latest
cxx-std: c++17
separate-compilation: --enable-separate-compilation
# Trim builds that use select reactor
- compiler: g++-5
select-reactor: -DASIO_DISABLE_EPOLL
- compiler: g++-6
select-reactor: -DASIO_DISABLE_EPOLL
- compiler: g++-7
select-reactor: -DASIO_DISABLE_EPOLL
- compiler: g++-8
select-reactor: -DASIO_DISABLE_EPOLL
- compiler: g++-9
select-reactor: -DASIO_DISABLE_EPOLL
# C++03 builds are always explicitly included
- cxx-std: c++03
include:
#
# Linux / g++-10 -std=c++2a / -O2 / standalone
#
- build-type: full
runs-on: ubuntu-20.04
compiler: g++-10
cxx-std: c++2a
optim-level: -O2
#
# Linux / g++-10 -std=c++17 / -O2 / boost 1.73
#
- build-type: full
runs-on: ubuntu-20.04
compiler: g++-10
cxx-std: c++17
optim-level: -O2
with-boost: --with-boost=$GITHUB_WORKSPACE/boost_1_73_0
boost-url: https://sourceforge.net/projects/boost/files/boost/1.73.0/boost_1_73_0.tar.bz2/download
#
# Linux / g++-9 -std=c++14 / -O0 / standalone / separate compilation
#
- build-type: full
runs-on: ubuntu-20.04
compiler: g++-9
cxx-std: c++14
separate-compilation: --enable-separate-compilation
optim-level: -O0
#
# Linux / g++-6 / -O2 / standalone
#
- build-type: full
runs-on: ubuntu-18.04
compiler: g++-6
cxx-std: c++14
optim-level: -O2
#
# Linux / g++-6 / -O0 / standalone / handler tracking
#
- build-type: full
runs-on: ubuntu-18.04
compiler: g++-6
cxx-std: c++14
optim-level: -O0
handler-tracking: -DASIO_ENABLE_HANDLER_TRACKING
#
# Linux / g++-6 / -O0 / standalone / epoll disabled
#
- build-type: full
runs-on: ubuntu-18.04
compiler: g++-6
cxx-std: c++14
optim-level: -O0
select-reactor: -DASIO_DISABLE_EPOLL
#
# Linux / g++-6 / -O0 / standalone / separate compilation / handler tracking
#
- build-type: full
runs-on: ubuntu-18.04
compiler: g++-6
cxx-std: c++14
separate-compilation: --enable-separate-compilation
optim-level: -O0
handler-tracking: -DASIO_ENABLE_HANDLER_TRACKING
#
# Linux / g++-6 / -O0 / standalone / separate compilation / epoll disabled
#
- build-type: full
runs-on: ubuntu-18.04
compiler: g++-6
cxx-std: c++14
separate-compilation: --enable-separate-compilation
optim-level: -O0
select-reactor: -DASIO_DISABLE_EPOLL
#
# Linux / g++-6 / -O2 / boost 1.64
#
- build-type: full
runs-on: ubuntu-18.04
compiler: g++-10
cxx-std: c++14
optim-level: -O2
with-boost: --with-boost=$GITHUB_WORKSPACE/boost_1_64_0
boost-url: https://sourceforge.net/projects/boost/files/boost/1.64.0/boost_1_64_0.tar.bz2/download
#
# Linux / g++-6 / -O0 / boost 1.64 / epoll disabled
#
- build-type: full
runs-on: ubuntu-18.04
compiler: g++-10
cxx-std: c++14
optim-level: -O0
with-boost: --with-boost=$GITHUB_WORKSPACE/boost_1_64_0
boost-url: https://sourceforge.net/projects/boost/files/boost/1.64.0/boost_1_64_0.tar.bz2/download
select-reactor: -DASIO_DISABLE_EPOLL
#
# Linux / g++-6 / -O0 / boost 1.64 / separate compilation
#
- build-type: full
runs-on: ubuntu-18.04
compiler: g++-10
cxx-std: c++14
separate-compilation: --enable-separate-compilation
optim-level: -O0
with-boost: --with-boost=$GITHUB_WORKSPACE/boost_1_64_0
boost-url: https://sourceforge.net/projects/boost/files/boost/1.64.0/boost_1_64_0.tar.bz2/download
#
# Linux / g++-4.8 / -O2 / standalone
#
- build-type: full
runs-on: ubuntu-18.04
compiler: g++-4.8
cxx-std: c++11
optim-level: -O2
#
# Linux / g++-4.8 / -O0 / standalone / separate compilation
#
- build-type: full
runs-on: ubuntu-18.04
compiler: g++-4.8
cxx-std: c++11
separate-compilation: --enable-separate-compilation
optim-level: -O0
#
# Linux / g++-4.8 / -O2 / boost 1.64
#
- build-type: full
runs-on: ubuntu-18.04
compiler: g++-4.8
cxx-std: c++03
separate-compilation: --enable-separate-compilation
optim-level: -O2
with-boost: --with-boost=$GITHUB_WORKSPACE/boost_1_64_0
boost-url: https://sourceforge.net/projects/boost/files/boost/1.64.0/boost_1_64_0.tar.bz2/download
#
# Linux / g++-4.8 -std=c++11 / -O2 / boost 1.64
#
- build-type: full
runs-on: ubuntu-18.04
compiler: g++-4.8
cxx-std: c++11
separate-compilation: --enable-separate-compilation
optim-level: -O2
with-boost: --with-boost=$GITHUB_WORKSPACE/boost_1_64_0
boost-url: https://sourceforge.net/projects/boost/files/boost/1.64.0/boost_1_64_0.tar.bz2/download
#
# Linux / clang++-10 -std=c++2a / -O2 / standalone
#
- build-type: full
runs-on: ubuntu-20.04
compiler: clang++-10
cxx-std: c++2a
optim-level: -O2
#
# Linux / clang++-10 -std=c++11 / -O0 / standalone / separate compilation
#
- build-type: full
runs-on: ubuntu-20.04
compiler: clang++-10
cxx-std: c++11
separate-compilation: --enable-separate-compilation
optim-level: -O0
#
# macOS / c++2a -fcoroutines-ts / -O2 / standalone
#
- build-type: full
runs-on: macos-latest
compiler: g++
cxx-std: c++2a -fcoroutines-ts
optim-level: -O2
#
# macOS / c++11 / -O2 / standalone
#
- build-type: full
runs-on: macos-latest
compiler: g++
cxx-std: c++11
optim-level: -O2
#
# macOS / c++11 / -O0 / standalone / kqueue disabled
#
- build-type: full
runs-on: macos-latest
compiler: g++
cxx-std: c++11
optim-level: -O0
select-reactor: -DASIO_DISABLE_KQUEUE
#
# macOS / c++11 / -O0 / standalone / separate compilation
#
- build-type: full
runs-on: macos-latest
compiler: g++
cxx-std: c++11
separate-compilation: --enable-separate-compilation
optim-level: -O0
#
# macOS / c++03 / -O2 / boost 1.64
#
- build-type: full
runs-on: macos-latest
compiler: g++
cxx-std: c++03
optim-level: -O2
with-boost: --with-boost=$GITHUB_WORKSPACE/boost_1_64_0
boost-url: https://sourceforge.net/projects/boost/files/boost/1.64.0/boost_1_64_0.tar.bz2/download
#
# macOS / c++03 / -O2 / boost 1.64 / separate compilation
#
- build-type: full
runs-on: macos-latest
compiler: g++
cxx-std: c++03
separate-compilation: --enable-separate-compilation
optim-level: -O0
with-boost: --with-boost=$GITHUB_WORKSPACE/boost_1_64_0
boost-url: https://sourceforge.net/projects/boost/files/boost/1.64.0/boost_1_64_0.tar.bz2/download
runs-on: ${{ matrix.runs-on }}
env:
CXX: ${{ matrix.compiler }}
CXXFLAGS: -std=${{ matrix.cxx-std }} ${{ matrix.optim-level }} -Wall -Wextra ${{ matrix.no-deprecated }} ${{ matrix.select-reactor }} ${{ matrix.handler-tracking }}
steps:
- uses: actions/checkout@v2
- name: Install autotools
if: startsWith(matrix.runs-on, 'macos')
run: brew install automake
- name: Install compiler
if: startsWith(matrix.runs-on, 'ubuntu')
run: sudo apt-get install -y ${{ matrix.compiler }}
- name: Install boost
if: startsWith(matrix.with-boost, '--with-boost=$GITHUB_WORKSPACE')
run: |
wget --quiet -O - ${{ matrix.boost-url }} | tar -xj
- name: Configure
working-directory: asio
run: |
./autogen.sh
./configure ${{ matrix.separate-compilation }} ${{ matrix.with-boost }}
- name: Sanity check
if: startsWith(matrix.build-type, 'sanity')
working-directory: asio/src/tests
run: make unit/io_context.log unit/ip/tcp.log unit/ts/net.log
- name: Build
if: startsWith(matrix.build-type, 'full')
working-directory: asio
run: make && make check

View File

@ -1,372 +0,0 @@
language: cpp
os: linux
dist: xenial
cache:
directories:
- ${TRAVIS_BUILD_DIR}/boost_1_64_0
- ${TRAVIS_BUILD_DIR}/boost_1_73_0
matrix:
include:
#
#---------------------------------------------------------------------------
# Linux / g++-9
#---------------------------------------------------------------------------
#
# Linux / g++-9 -std=c++2a / -O2 / standalone
#
- os: linux
dist: bionic
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-9
env:
- CXXFLAGS="-std=c++2a -fconcepts -Wall -Wextra -O2"
- CONFIGFLAGS="--with-boost=no"
- MATRIX_EVAL="CC=gcc-9 CXX=g++-9"
compiler: gcc
#
# Linux / g++-9 -std=c++17 / -O2 / boost 1.73
#
- os: linux
dist: bionic
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-9
env:
- BOOST_DIR="boost_1_73_0"
- BOOST_URL="https://sourceforge.net/projects/boost/files/boost/1.73.0/boost_1_73_0.tar.bz2/download"
- CXXFLAGS="-std=c++17 -Wall -Wextra -O2"
- CONFIGFLAGS="--with-boost=$PWD/$BOOST_DIR"
- MATRIX_EVAL="CC=gcc-9 CXX=g++-9"
compiler: gcc
#
# Linux / g++-9 -std=c++14 / -O0 / standalone / separate compilation
#
- os: linux
dist: bionic
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-9
env:
- CXXFLAGS="-std=c++14 -Wall -Wextra -O0 -fno-inline"
- CONFIGFLAGS="--with-boost=no --enable-separate-compilation"
- MATRIX_EVAL="CC=gcc-9 CXX=g++-9"
compiler: gcc
#
#---------------------------------------------------------------------------
# Linux / g++-6
#---------------------------------------------------------------------------
#
# Linux / g++-6 / -O2 / standalone
#
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-6
env:
- CXXFLAGS="-Wall -Wextra -O2"
- CONFIGFLAGS="--with-boost=no"
- MATRIX_EVAL="CC=gcc-6 CXX=g++-6"
compiler: gcc
#
# Linux / g++-6 / -O0 / standalone / handler tracking
#
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-6
env:
- CXXFLAGS="-Wall -Wextra -O0 -fno-inline -DASIO_ENABLE_HANDLER_TRACKING"
- CONFIGFLAGS="--with-boost=no"
- MATRIX_EVAL="CC=gcc-6 CXX=g++-6"
compiler: gcc
#
# Linux / g++-6 / -O0 / standalone / epoll disabled
#
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-6
env:
- CXXFLAGS="-Wall -Wextra -O0 -fno-inline -DASIO_DISABLE_EPOLL"
- CONFIGFLAGS="--with-boost=no"
- MATRIX_EVAL="CC=gcc-6 CXX=g++-6"
compiler: gcc
#
# Linux / g++-6 / -O0 / standalone / separate compilation / handler tracking
#
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-6
env:
- CXXFLAGS="-Wall -Wextra -O0 -fno-inline -DASIO_ENABLE_HANDLER_TRACKING"
- CONFIGFLAGS="--with-boost=no --enable-separate-compilation"
- MATRIX_EVAL="CC=gcc-6 CXX=g++-6"
compiler: gcc
#
# Linux / g++-6 / -O0 / standalone / separate compilation / epoll disabled
#
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-6
env:
- CXXFLAGS="-Wall -Wextra -O0 -fno-inline -DASIO_DISABLE_EPOLL"
- CONFIGFLAGS="--with-boost=no --enable-separate-compilation"
- MATRIX_EVAL="CC=gcc-6 CXX=g++-6"
compiler: gcc
#
# Linux / g++-6 / -O2 / boost 1.64
#
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-6
env:
- BOOST_DIR="boost_1_64_0"
- BOOST_URL="https://sourceforge.net/projects/boost/files/boost/1.64.0/boost_1_64_0.tar.bz2/download"
- CXXFLAGS="-Wall -Wextra -O2"
- CONFIGFLAGS=""
- MATRIX_EVAL="CC=gcc-6 CXX=g++-6"
compiler: gcc
#
# Linux / g++-6 / -O0 / boost 1.64 / epoll disabled
#
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-6
env:
- BOOST_DIR="boost_1_64_0"
- BOOST_URL="https://sourceforge.net/projects/boost/files/boost/1.64.0/boost_1_64_0.tar.bz2/download"
- CXXFLAGS="-Wall -Wextra -O0 -fno-inline -DASIO_DISABLE_EPOLL"
- CONFIGFLAGS=""
- MATRIX_EVAL="CC=gcc-6 CXX=g++-6"
compiler: gcc
#
# Linux / g++-6 / -O0 / boost 1.64 / separate compilation
#
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-6
env:
- BOOST_DIR="boost_1_64_0"
- BOOST_URL="https://sourceforge.net/projects/boost/files/boost/1.64.0/boost_1_64_0.tar.bz2/download"
- CXXFLAGS="-Wall -Wextra -O0 -fno-inline"
- CONFIGFLAGS="--enable-separate-compilation"
- MATRIX_EVAL="CC=gcc-6 CXX=g++-6"
compiler: gcc
#
#---------------------------------------------------------------------------
# Linux / g++-4.8
#---------------------------------------------------------------------------
#
# Linux / g++-4.8 / -O2 / standalone
#
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8
env:
- CXXFLAGS="-Wall -Wextra -O2"
- CONFIGFLAGS="--with-boost=no"
- MATRIX_EVAL="CC=gcc-4.8 CXX=g++-4.8"
compiler: gcc
#
# Linux / g++-4.8 / -O0 / standalone / separate compilation
#
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8
env:
- CXXFLAGS="-Wall -Wextra -O0 -fno-inline"
- CONFIGFLAGS="--with-boost=no --enable-separate-compilation"
- MATRIX_EVAL="CC=gcc-4.8 CXX=g++-4.8"
compiler: gcc
#
# Linux / g++-4.8 / -O2 / boost 1.64
#
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8
env:
- BOOST_DIR="boost_1_64_0"
- BOOST_URL="https://sourceforge.net/projects/boost/files/boost/1.64.0/boost_1_64_0.tar.bz2/download"
- CXXFLAGS="-Wall -Wextra -O2"
- CONFIGFLAGS=""
- MATRIX_EVAL="CC=gcc-4.8 CXX=g++-4.8"
compiler: gcc
#
# Linux / g++-4.8 -std=c++11 / -O2 / boost 1.64
#
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8
env:
- BOOST_DIR="boost_1_64_0"
- BOOST_URL="https://sourceforge.net/projects/boost/files/boost/1.64.0/boost_1_64_0.tar.bz2/download"
- CXXFLAGS="-std=c++11 -Wall -Wextra -O2"
- CONFIGFLAGS=""
- MATRIX_EVAL="CC=gcc-4.8 CXX=g++-4.8"
compiler: gcc
#
#---------------------------------------------------------------------------
# Linux / clang-3.8
#---------------------------------------------------------------------------
#
# Linux / clang-3.8 / -O2 / standalone"
#
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.8
packages:
- clang-3.8
env:
- CXXFLAGS="-Wall -Wextra -O2"
- CONFIGFLAGS="--with-boost=no"
- MATRIX_EVAL="CC=clang-3.8 CXX=clang++-3.8"
compiler: clang
#
# Linux / clang-3.8 / -O0 / standalone / separate compilation
#
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.8
packages:
- clang-3.8
env:
- CXXFLAGS="-Wall -Wextra -O0 -fno-inline"
- CONFIGFLAGS="--with-boost=no --enable-separate-compilation"
- MATRIX_EVAL="CC=clang-3.8 CXX=clang++-3.8"
compiler: clang
#
#---------------------------------------------------------------------------
# macOS / xcode10.1
#---------------------------------------------------------------------------
#
# macOS / xcode10.1 / -std=c++2a -fcoroutines-ts -O2 / standalone
#
- os: osx
env:
- CXXFLAGS="-std=c++2a -fcoroutines-ts -Wall -Wextra -O0 -fno-inline"
- CONFIGFLAGS="--with-boost=no"
osx_image: xcode10.1
#
# macOS / xcode10.1 / -O2 / standalone
#
- os: osx
env:
- CXXFLAGS="-Wall -Wextra -O0 -fno-inline"
- CONFIGFLAGS="--with-boost=no"
osx_image: xcode10.1
#
# macOS / xcode10.1 / -O0 / standalone / kqueue disabled
#
- os: osx
env:
- CXXFLAGS="-Wall -Wextra -O0 -fno-inline -DASIO_DISABLE_KQUEUE"
- CONFIGFLAGS="--with-boost=no"
osx_image: xcode10.1
#
# macOS / xcode10.1 / -O0 / standalone / separate compilation
#
- os: osx
env:
- CXXFLAGS="-Wall -Wextra -O0 -fno-inline"
- CONFIGFLAGS="--with-boost=no --enable-separate-compilation"
osx_image: xcode10.1
#
# macOS / xcode10.1 / -O2 / boost 1.64
#
- os: osx
env:
- BOOST_DIR="boost_1_64_0"
- BOOST_URL="https://sourceforge.net/projects/boost/files/boost/1.64.0/boost_1_64_0.tar.bz2/download"
- CXXFLAGS="-Wall -Wextra -O2"
- CONFIGFLAGS=""
osx_image: xcode10.1
#
# macOS / xcode10.1 / -O0 / boost 1.64 / separate compilation
#
- os: osx
env:
- BOOST_DIR="boost_1_64_0"
- BOOST_URL="https://sourceforge.net/projects/boost/files/boost/1.64.0/boost_1_64_0.tar.bz2/download"
- CXXFLAGS="-Wall -Wextra -O0 -fno-inline"
- CONFIGFLAGS="--enable-separate-compilation"
osx_image: xcode10.1
before_install:
- eval "${MATRIX_EVAL}"
install:
- |
if [[ "${BOOST_URL}" != "" ]]; then
if [[ -z "$(ls -A ${BOOST_DIR})" ]]; then
{ travis_retry wget --quiet -O - ${BOOST_URL} | tar -xj; } || exit 1
fi
fi
script:
- cd asio && ./autogen.sh && ./configure $CONFIGFLAGS && make && make check
notifications:
email: false