ci: replace Travis with GitHub Actions

Sync docs/conf.py with ndn-cxx

Change-Id: I2c7106ef52a0e7c00de6767c6b59dbd3ce1dc082
This commit is contained in:
Davide Pesavento
2021-10-01 21:20:53 -04:00
parent ad7a61b745
commit 22eeb2914f
10 changed files with 160 additions and 176 deletions
+68
View File
@@ -0,0 +1,68 @@
name: CI
on:
push:
paths-ignore:
- 'docs/**'
- '*.md'
- '.mailmap'
workflow_dispatch:
permissions:
contents: read
jobs:
linux:
name: ${{ matrix.compiler }} on ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
compiler: [g++-8, g++-9, g++-10, g++-11,
clang++-7, clang++-8, clang++-9, clang++-10, clang++-11, clang++-12]
os: [ubuntu-20.04]
include:
- compiler: g++-7
os: ubuntu-18.04
- compiler: clang++-5.0
os: ubuntu-18.04
- compiler: clang++-6.0
os: ubuntu-18.04
runs-on: ${{ matrix.os }}
env:
CXX: ${{ matrix.compiler }}
NODE_LABELS: Linux Ubuntu
WAF_JOBS: 2
steps:
- name: Install C++ compiler
run: |
sudo apt-get -qy install ${CXX/clang++/clang}
${CXX} --version
- name: Checkout
uses: actions/checkout@v2
- name: Build and test
run: ./.jenkins
macos:
name: Xcode ${{ matrix.xcode }} on ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
xcode: ['11.3', '11.7', '12.4']
os: [macos-10.15]
include:
- xcode: '12.5'
os: macos-11
- xcode: '13'
os: macos-11
runs-on: ${{ matrix.os }}
env:
NODE_LABELS: OSX
WAF_JOBS: 3
steps:
- name: Set up Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ${{ matrix.xcode }}
- name: Checkout
uses: actions/checkout@v2
- name: Build and test
run: ./.jenkins
+36
View File
@@ -0,0 +1,36 @@
name: Docs
on:
push:
paths-ignore:
- '*.md'
- '.mailmap'
workflow_dispatch:
permissions:
contents: read
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [macos-11, ubuntu-20.04]
runs-on: ${{ matrix.os }}
env:
JOB_NAME: Docs
WAF_JOBS: 3
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install dependencies
run: |
case ${RUNNER_OS} in
Linux) export NODE_LABELS="Linux Ubuntu" ;;
macOS) export NODE_LABELS="OSX" ;;
esac
find .jenkins.d/ -type f -name '[1-9]*.sh' -exec chmod -x '{}' +
./.jenkins
- name: Build documentation
run: |
./waf --color=yes configure
./waf --color=yes docs
+7 -13
View File
@@ -2,31 +2,25 @@
set -e
source .jenkins.d/util.sh
if has Linux $NODE_LABELS; then
export PATH="${HOME}/.local/bin${PATH:+:}${PATH}"
fi
export CACHE_DIR=${CACHE_DIR:-/tmp}
export WAF_JOBS=${WAF_JOBS:-1}
[[ $JOB_NAME == *"code-coverage" ]] && export DISABLE_ASAN=yes
nanos() {
# Cannot use date(1) because macOS does not support %N format specifier
python3 -c 'import time; print(int(time.time() * 1e9))'
}
for file in .jenkins.d/*; do
[[ -f $file && -x $file ]] || continue
if [[ -n $TRAVIS ]]; then
if [[ -n $GITHUB_ACTIONS ]]; then
label=$(basename "$file" | sed -E 's/[[:digit:]]+-(.*)\..*/\1/')
echo -ne "travis_fold:start:${label}\r"
echo -ne "travis_time:start:${label}\r"
start=$(nanos)
echo "::group::${label}"
fi
echo "\$ $file"
"$file"
if [[ -n $TRAVIS ]]; then
finish=$(nanos)
echo -ne "travis_time:end:${label}:start=${start},finish=${finish},duration=$((finish-start)),event=${label}\r"
echo -ne "travis_fold:end:${label}\r"
if [[ -n $GITHUB_ACTIONS ]]; then
echo "::endgroup::"
fi
done
+20 -5
View File
@@ -3,13 +3,13 @@ set -ex
if has OSX $NODE_LABELS; then
FORMULAE=(boost openssl pkg-config)
if has OSX-10.13 $NODE_LABELS || has OSX-10.14 $NODE_LABELS; then
FORMULAE+=(python)
if [[ $JOB_NAME == *"Docs" ]]; then
FORMULAE+=(doxygen graphviz)
fi
if [[ -n $TRAVIS ]]; then
# Travis images come with a large number of pre-installed
# brew packages, don't waste time upgrading all of them
if [[ -n $GITHUB_ACTIONS ]]; then
# GitHub Actions runners have a large number of pre-installed
# Homebrew packages. Don't waste time upgrading all of them.
brew list --versions "${FORMULAE[@]}" || brew update
for FORMULA in "${FORMULAE[@]}"; do
brew list --versions "$FORMULA" || brew install "$FORMULA"
@@ -23,8 +23,23 @@ if has OSX $NODE_LABELS; then
brew cleanup
fi
if [[ $JOB_NAME == *"Docs" ]]; then
pip3 install --upgrade --upgrade-strategy=eager sphinx sphinxcontrib-doxylink
fi
elif has Ubuntu $NODE_LABELS; then
sudo apt-get -qq update
sudo apt-get -qy install build-essential pkg-config python3-minimal \
libboost-all-dev libssl-dev libsqlite3-dev
case $JOB_NAME in
*code-coverage)
sudo apt-get -qy install lcov python3-pip
pip3 install --user --upgrade --upgrade-strategy=eager 'gcovr~=5.0'
;;
*Docs)
sudo apt-get -qy install doxygen graphviz python3-pip
pip3 install --user --upgrade --upgrade-strategy=eager sphinx sphinxcontrib-doxylink
;;
esac
fi
@@ -5,4 +5,4 @@ PROJ=ChronoSync
sudo rm -fr /usr/local/include/"$PROJ"
sudo rm -f /usr/local/lib{,64}/lib"$PROJ"*
sudo rm -f /usr/local/lib{,64}/pkgconfig/"$PROJ".pc
sudo rm -f /usr/local/lib{,64}/pkgconfig/{,lib}"$PROJ".pc
-105
View File
@@ -1,105 +0,0 @@
version: ~> 1.0
language: cpp
os: linux
dist: bionic
arch:
- amd64
- arm64
- ppc64le
- s390x
env:
- COMPILER=g++-7
- COMPILER=g++-9
- COMPILER=clang++-6.0
- COMPILER=clang++-9
jobs:
include:
# Linux
- env: COMPILER=g++-8
- env: COMPILER=clang++-5.0
- env: COMPILER=clang++-7
- env: COMPILER=clang++-8
- env: COMPILER=clang++-10
- env: COMPILER=clang++-11
# macOS
- os: osx
osx_image: xcode9.4
env: # default compiler
- os: osx
osx_image: xcode10.1
env: # default compiler
- os: osx
osx_image: xcode10.3
env: # default compiler
- os: osx
osx_image: xcode11.3
env: # default compiler
- os: osx
osx_image: xcode11.6
env: # default compiler
- os: osx
osx_image: xcode12
env: # default compiler
allow_failures:
- arch: s390x # bug 5098
- env: COMPILER=clang++-11
fast_finish: true
before_install:
- |
: Adding apt repositories
case ${COMPILER} in
g++-9)
# https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test/+packages
travis_retry sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
travis_retry sudo apt-get -qq update
;;
clang++-1?)
# https://apt.llvm.org/
LLVM_REPO=${COMPILER/clang++/llvm-toolchain-${TRAVIS_DIST}}
travis_retry wget -nv -O - "https://apt.llvm.org/llvm-snapshot.gpg.key" | sudo apt-key add -
travis_retry sudo add-apt-repository -y "deb http://apt.llvm.org/${TRAVIS_DIST}/ ${LLVM_REPO%-11} main"
travis_retry sudo apt-get -qq update
;;
esac
install:
- |
: Installing C++ compiler
if [[ -n ${COMPILER} ]]; then
travis_retry sudo apt-get -qy install ${COMPILER/clang++/clang}
fi
before_script:
- |
: Setting environment variables
if [[ -n ${COMPILER} ]]; then
export CXX=${COMPILER}
fi
case ${TRAVIS_OS_NAME} in
linux) export NODE_LABELS="Linux Ubuntu Ubuntu-18.04" ;;
osx) export NODE_LABELS="OSX OSX-$(sw_vers -productVersion | cut -d . -f -2)" ;;
esac
export WAF_JOBS=2
- |
: Enabling workarounds
case "${TRAVIS_CPU_ARCH},${COMPILER}" in
ppc64le,g++-7)
# AddressSanitizer does not seem to be working
export DISABLE_ASAN=yes
;;
*,clang++-8)
# https://bugs.llvm.org/show_bug.cgi?id=40808
export DISABLE_ASAN=yes
;;
esac
- ${CXX:-c++} --version
script:
- ./.jenkins
+4 -3
View File
@@ -1,8 +1,9 @@
# ChronoSync: synchronization library for distributed realtime applications for NDN
![Language](https://img.shields.io/badge/C%2B%2B-14-blue.svg)
[![Build Status](https://travis-ci.org/named-data/ChronoSync.svg?branch=master)](https://travis-ci.org/named-data/ChronoSync)
![Latest Version](https://img.shields.io/github/tag/named-data/ChronoSync.svg?color=darkkhaki&label=latest%20version)
[![CI](https://github.com/named-data/ChronoSync/actions/workflows/ci.yml/badge.svg)](https://github.com/named-data/ChronoSync/actions/workflows/ci.yml)
[![Docs](https://github.com/named-data/ChronoSync/actions/workflows/docs.yml/badge.svg)](https://github.com/named-data/ChronoSync/actions/workflows/docs.yml)
![Language](https://img.shields.io/badge/C%2B%2B-14-blue)
![Latest version](https://img.shields.io/github/v/tag/named-data/ChronoSync?label=Latest%20version)
> DEPRECATION NOTICE: ChronoSync's design is outdated. We recommend using more recent sync protocols, such as [PSync](https://named-data.net/doc/PSync/current/index.html) or [StateVectorSync](https://named-data.github.io/StateVectorSync/).
+16 -7
View File
@@ -1,10 +1,8 @@
# -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
@@ -20,13 +18,13 @@ import sys
# -- Project information -----------------------------------------------------
project = u'ChronoSync: A Synchronization Protocol for NDN'
copyright = u'Copyright © 2012-2020 Regents of the University of California.'
copyright = u'Copyright © 2012-2021 Regents of the University of California.'
author = u'Named Data Networking Project'
# The short X.Y version
# The short X.Y version.
#version = ''
# The full version, including alpha/beta/rc tags
# The full version, including alpha/beta/rc tags.
#release = ''
# There are two options for replacing |today|: either, you set today to some
@@ -40,12 +38,13 @@ today_fmt = '%Y-%m-%d'
# If your documentation needs a minimal Sphinx version, state it here.
#
needs_sphinx = '1.1'
needs_sphinx = '1.3'
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.extlinks',
'sphinx.ext.todo',
]
@@ -86,6 +85,12 @@ html_theme_path = ['.']
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
html_copy_source = False
html_show_sourcelink = False
# Disable syntax highlighting of code blocks by default.
highlight_language = 'none'
# -- Options for LaTeX output ------------------------------------------------
@@ -132,3 +137,7 @@ man_pages = [
doxylink = {
'ChronoSync': ('ChronoSync.tag', 'doxygen/'),
}
extlinks = {
'issue': ('https://redmine.named-data.net/issues/%s', 'issue #'),
}
+7 -38
View File
@@ -1041,13 +1041,6 @@ VERBATIM_HEADERS = YES
ALPHABETICAL_INDEX = YES
# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in
# which the alphabetical index list will be split.
# Minimum value: 1, maximum value: 20, default value: 5.
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
COLS_IN_ALPHA_INDEX = 5
# In case all classes in a project start with a common prefix, all classes will
# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
# can be used to specify a prefix (or a list of prefixes) that should be ignored
@@ -1746,16 +1739,6 @@ LATEX_BATCHMODE = NO
LATEX_HIDE_INDICES = NO
# If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source
# code with syntax highlighting in the LaTeX output.
#
# Note that which sources are shown also depends on other settings such as
# SOURCE_BROWSER.
# The default value is: NO.
# This tag requires that the tag GENERATE_LATEX is set to YES.
LATEX_SOURCE_CODE = NO
# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
# bibliography, e.g. plainnat, or ieeetr. See
# http://en.wikipedia.org/wiki/BibTeX and \cite for more info.
@@ -1828,16 +1811,6 @@ RTF_STYLESHEET_FILE =
RTF_EXTENSIONS_FILE =
# If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code
# with syntax highlighting in the RTF output.
#
# Note that which sources are shown also depends on other settings such as
# SOURCE_BROWSER.
# The default value is: NO.
# This tag requires that the tag GENERATE_RTF is set to YES.
RTF_SOURCE_CODE = NO
#---------------------------------------------------------------------------
# Configuration options related to the man page output
#---------------------------------------------------------------------------
@@ -1927,15 +1900,6 @@ GENERATE_DOCBOOK = NO
DOCBOOK_OUTPUT = docbook
# If the DOCBOOK_PROGRAMLISTING tag is set to YES, doxygen will include the
# program listings (including syntax highlighting and cross-referencing
# information) to the DOCBOOK output. Note that enabling this will significantly
# increase the size of the DOCBOOK output.
# The default value is: NO.
# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
DOCBOOK_PROGRAMLISTING = NO
#---------------------------------------------------------------------------
# Configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------
@@ -2044,11 +2008,16 @@ INCLUDE_FILE_PATTERNS =
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
PREDEFINED = DOXYGEN \
NDN_CXX_DECLARE_WIRE_ENCODE_INSTANTIATIONS(x)= \
NDN_LOG_INIT(x)= \
NDN_LOG_MEMBER_DECL()= \
NDN_LOG_MEMBER_DECL_SPECIALIZED(x)= \
NDN_LOG_MEMBER_INIT(x,y)= \
NDN_LOG_MEMBER_INIT_SPECIALIZED(x,y)= \
CHRONOSYNC_PUBLIC_WITH_TESTS_ELSE_PROTECTED=protected \
CHRONOSYNC_PUBLIC_WITH_TESTS_ELSE_PRIVATE=private \
CHRONOSYNC_PROTECTED_WITH_TESTS_ELSE_PRIVATE=private \
CHRONOSYNC_VIRTUAL_WITH_TESTS= \
NDN_CXX_DECLARE_WIRE_ENCODE_INSTANTIATIONS(x)=
CHRONOSYNC_VIRTUAL_WITH_TESTS=
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
# tag can be used to specify a list of macro names that should be expanded. The
+1 -4
View File
@@ -8,15 +8,12 @@ ChronoSync - A synchronization Protocol in NDN
DesignDoc
* :doc:`DesignDoc`
**Additional documentation**
* `API documentation (doxygen) <doxygen/annotated.html>`_
Downloading
-----------
* `Source code GitHub git repository <https://github.com/named-data/ChronoSync>`_.
* `Source code git repository <https://github.com/named-data/ChronoSync>`_
License
-------