From a90b2cf762a7b27b35d1bbb5350f5d6248570d11 Mon Sep 17 00:00:00 2001 From: Davide Pesavento Date: Mon, 6 Feb 2023 00:38:38 -0500 Subject: [PATCH] ci: adopt reusable workflows from `named-data/actions` Change-Id: Ib5b73ca2082cec8fc105a875f5c261a979db11c7 --- .github/workflows/ci.yml | 60 ++++---------------------------------- .github/workflows/docs.yml | 39 +++++++++---------------- docs/doxygen.conf.in | 4 +-- 3 files changed, 22 insertions(+), 81 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f328d39a..e5cc01a0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,63 +3,15 @@ on: push: paths-ignore: - 'docs/**' + - '*.conf.sample' - '*.md' - '.mailmap' workflow_dispatch: -permissions: - contents: read +permissions: {} jobs: - linux: - name: ${{ matrix.compiler }} on ${{ matrix.os }} - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-20.04] - compiler: [g++-7, g++-8, g++-9, g++-10, - clang++-7, clang++-8, clang++-9, clang++-10, clang++-11, clang++-12] - include: - - os: ubuntu-22.04 - compiler: g++-11 - - os: ubuntu-22.04 - compiler: g++-12 - - os: ubuntu-22.04 - compiler: clang++-13 - - os: ubuntu-22.04 - compiler: clang++-14 - env: - CXX: ${{ matrix.compiler }} - steps: - - name: Install C++ compiler - run: | - sudo apt-get -qy install ${CXX/clang++/clang} - ${CXX} --version - - name: Checkout - uses: actions/checkout@v3 - - name: Build and test - run: ./.jenkins - - macos: - name: Xcode ${{ matrix.xcode }} on ${{ matrix.os }} - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [macos-11] - xcode: ['12.4', '12.5', '13.2'] - include: - - os: macos-12 - xcode: '13.4' - - os: macos-12 - xcode: '14.2' - steps: - - name: Set up Xcode - uses: maxim-lobanov/setup-xcode@v1 - with: - xcode-version: ${{ matrix.xcode }} - - name: Checkout - uses: actions/checkout@v3 - - name: Build and test - run: ./.jenkins + Ubuntu: + uses: named-data/actions/.github/workflows/jenkins-script-ubuntu.yml@v1 + macOS: + uses: named-data/actions/.github/workflows/jenkins-script-macos.yml@v1 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 17506731..87abd32e 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -5,31 +5,20 @@ on: - '*.md' - '.mailmap' workflow_dispatch: + inputs: + skip-deploy: + description: 'Skip deployment?' + required: true + type: boolean -permissions: - contents: read +permissions: {} jobs: - build: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [macos-latest, ubuntu-latest] - env: - JOB_NAME: Docs - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Install dependencies - run: | - find .jenkins.d/ -type f -name '[1-9]*.sh' -exec chmod -x '{}' + - ./.jenkins - - name: Build documentation - run: | - pybindir=$(python3 -c 'import sysconfig; print(sysconfig.get_path("scripts", "posix_user"))') - export PATH="${pybindir}${PATH:+:}${PATH}" - ./waf --color=yes configure - ./waf --color=yes build --targets=version.hpp - ./waf --color=yes build --targets=manpages - ./waf --color=yes docs + html: + uses: named-data/actions/.github/workflows/docs-html.yml@v1 + with: + # Deploy only the master branch and release tags + deploy: ${{ !inputs.skip-deploy && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/ndn-cxx-')) }} + secrets: inherit + man: + uses: named-data/actions/.github/workflows/docs-man.yml@v1 diff --git a/docs/doxygen.conf.in b/docs/doxygen.conf.in index dab1abbf..c48312c0 100644 --- a/docs/doxygen.conf.in +++ b/docs/doxygen.conf.in @@ -68,7 +68,7 @@ OUTPUT_DIRECTORY = docs/doxygen # performance problems for the file system. # The default value is: NO. -CREATE_SUBDIRS = YES +CREATE_SUBDIRS = NO # If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII # characters to appear in the names of generated files. If set to NO, non-ASCII @@ -1178,7 +1178,7 @@ HTML_COLORSTYLE_GAMMA = 91 # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_TIMESTAMP = YES +HTML_TIMESTAMP = NO # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the