diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..a7db5115 --- /dev/null +++ b/.github/workflows/build.yml @@ -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 diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 00000000..d0435112 --- /dev/null +++ b/.github/workflows/coverage.yml @@ -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/ diff --git a/CMakeLists.txt b/CMakeLists.txt index 856faf10..55b73f69 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 ) diff --git a/README.md b/README.md index 25b5d240..005c21dd 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,8 @@ -[![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)