GH actions

This commit is contained in:
Michele Caini 2019-09-25 14:03:45 +02:00
parent 6f6294ebc2
commit 87e23c74b5
4 changed files with 113 additions and 5 deletions

74
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,74 @@
name: build
on: [push, pull_request]
jobs:
linux:
timeout-minutes: 5
strategy:
matrix:
os: [ubuntu-18.04]
compiler: [g++, clang++]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v1
- name: Compile tests
working-directory: build
env:
CXX: ${{ matrix.compiler }}
run: |
cmake -DBUILD_TESTING=ON -Dlibuv_buildtests=OFF ..
make -j4
- name: Run tests
working-directory: build
env:
CTEST_OUTPUT_ON_FAILURE: 1
run: ctest --timeout 5 -C Debug -j4
windows:
timeout-minutes: 5
strategy:
matrix:
os: [windows-2019, windows-2016]
include:
- os: windows-2019
generator: Visual Studio 16 2019
- os: windows-2016
generator: Visual Studio 15 2017
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v1
- name: Compile tests
working-directory: build
run: |
cmake -DBUILD_TESTING=ON -Dlibuv_buildtests=OFF -DCMAKE_CXX_FLAGS=/W1 -G"${{ matrix.generator }}" ..
cmake --build . -j 4
- name: Run tests
working-directory: build
env:
CTEST_OUTPUT_ON_FAILURE: 1
run: ctest --timeout 5 -C Debug -j4
macos:
timeout-minutes: 5
runs-on: macOS-10.14
steps:
- uses: actions/checkout@v1
- name: Compile tests
working-directory: build
run: |
cmake -DBUILD_TESTING=ON -Dlibuv_buildtests=OFF ..
make -j4
- name: Run tests
working-directory: build
env:
CTEST_OUTPUT_ON_FAILURE: 1
run: ctest --timeout 5 -C Debug -j4

33
.github/workflows/coverage.yml vendored Normal file
View File

@ -0,0 +1,33 @@
name: coverage
on: [push, pull_request]
jobs:
codecov:
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Compile tests
working-directory: build
env:
CXXFLAGS: "-O0 --coverage -fno-inline -fno-inline-small-functions -fno-default-inline"
CXX: g++
run: |
cmake -DBUILD_TESTING=ON -Dlibuv_buildtests=OFF ..
make -j4
- name: Run tests
working-directory: build
env:
CTEST_OUTPUT_ON_FAILURE: 1
run: ctest --timeout 5 -C Debug -j4
- name: Upload coverage to Codecov
working-directory: build
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
wget https://codecov.io/bash -O codecov
chmod +x codecov
./codecov -t $CODECOV_TOKEN -B $GITHUB_REF -s test/

View File

@ -141,13 +141,15 @@ install(
# AOB
#
FILE(GLOB GH_WORKFLOWS .github/workflows/*.yml)
add_custom_target(
uvw_aob
SOURCES
${GH_WORKFLOWS}
.github/FUNDING.yml
cmake/in/deps.in
appveyor.yml
AUTHORS
LICENSE
README.md
.travis.yml
)

View File

@ -3,9 +3,8 @@
<!--
@cond TURN_OFF_DOXYGEN
-->
[![Build Status](https://travis-ci.org/skypjack/uvw.svg?branch=master)](https://travis-ci.org/skypjack/uvw)
[![Build status](https://ci.appveyor.com/api/projects/status/m5ndm8gnu8isg2to?svg=true)](https://ci.appveyor.com/project/skypjack/uvw)
[![Coverage Status](https://coveralls.io/repos/github/skypjack/uvw/badge.svg?branch=master)](https://coveralls.io/github/skypjack/uvw?branch=master)
[![Build Status](https://github.com/skypjack/uvw/workflows/build/badge.svg)](https://github.com/skypjack/uvw/actions)
[![Coverage](https://codecov.io/gh/skypjack/uvw/branch/master/graph/badge.svg)](https://codecov.io/gh/skypjack/uvw)
[![Download](https://api.bintray.com/packages/skypjack/conan/uvw%3Askypjack/images/download.svg)](https://bintray.com/skypjack/conan/uvw%3Askypjack/_latestVersion)
[![Gitter chat](https://badges.gitter.im/skypjack/uvw.png)](https://gitter.im/skypjack/uvw)
[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.me/skypjack)