diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..5e759d3 --- /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 .. + 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 -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 .. + 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 0000000..802d94b --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,39 @@ +name: coverage + +on: [push, pull_request] + +jobs: + + coveralls: + timeout-minutes: 5 + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + + - name: Reattach HEAD + run: git checkout "$(echo ${{ github.ref }} | sed -E 's|refs/[a-zA-Z]+/||')" + - 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 .. + make -j4 + - name: Run tests + working-directory: build + env: + CTEST_OUTPUT_ON_FAILURE: 1 + run: ctest --timeout 5 -C Debug -j4 + - name: Setup Python + uses: actions/setup-python@master + with: + version: 3.7 + - name: Update coveralls + env: + COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} + run: | + pip install --upgrade wheel + pip install cpp-coveralls + coveralls --gcov gcov-7 --gcov-options '\-lp' -r . -b build -x cpp -x hpp -e deps -i src diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 095206d..0000000 --- a/.travis.yml +++ /dev/null @@ -1,55 +0,0 @@ -language: cpp -dist: trusty -sudo: false - -matrix: - include: - - os: linux - compiler: gcc - addons: - apt: - sources: ['ubuntu-toolchain-r-test'] - packages: ['g++-7'] - env: COMPILER=g++-7 - - os: linux - compiler: clang - addons: - apt: - sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-trusty-6.0'] - packages: ['clang-6.0', 'g++-7'] - env: COMPILER=clang++-6.0 - - os: osx - osx_image: xcode10 - compiler: clang - env: COMPILER=clang++ - - os: linux - compiler: gcc - addons: - apt: - sources: ['ubuntu-toolchain-r-test'] - packages: ['g++-7'] - env: - - COMPILER=g++-7 - - CXXFLAGS="-O0 --coverage -fno-inline -fno-inline-small-functions -fno-default-inline" - before_script: - - pip install --user cpp-coveralls - after_success: - - coveralls --gcov gcov-7 --gcov-options '\-lp' --root ${TRAVIS_BUILD_DIR} --build-root ${TRAVIS_BUILD_DIR}/build --extension cpp --extension hpp --exclude deps --include src - -notifications: - email: - on_success: never - on_failure: always - -install: -- echo ${PATH} -- cmake --version -- export CXX=${COMPILER} -- echo ${CXX} -- ${CXX} --version -- ${CXX} -v - -script: -- mkdir -p build && cd build -- cmake -DCMAKE_BUILD_TYPE=Release .. && make -j4 -- CTEST_OUTPUT_ON_FAILURE=1 make test diff --git a/CMakeLists.txt b/CMakeLists.txt index 97c3906..05728f4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -207,12 +207,14 @@ endif() # AOB # +FILE(GLOB GH_WORKFLOWS .github/workflows/*.yml) + add_custom_target( meta_aob SOURCES - appveyor.yml + ${GH_WORKFLOWS} + .github/FUNDING.yml AUTHORS LICENSE README.md - .travis.yml ) diff --git a/README.md b/README.md index cd43a89..7f27376 100644 --- a/README.md +++ b/README.md @@ -3,14 +3,11 @@ -[![GitHub version](https://badge.fury.io/gh/skypjack%2Fmeta.svg)](http://badge.fury.io/gh/skypjack%2Fmeta) -[![LoC](https://tokei.rs/b1/github/skypjack/meta)](https://github.com/skypjack/meta) -[![Build Status](https://travis-ci.org/skypjack/meta.svg?branch=master)](https://travis-ci.org/skypjack/meta) -[![Build status](https://ci.appveyor.com/api/projects/status/xs3bos4xl06y0wyv?svg=true)](https://ci.appveyor.com/project/skypjack/meta) -[![Coverage Status](https://coveralls.io/repos/github/skypjack/meta/badge.svg?branch=master)](https://coveralls.io/github/skypjack/meta?branch=master) +[![GitHub version](https://badge.fury.io/gh/skypjack%2Fmeta.svg)](https://github.com/skypjack/meta/releases) +[![Build Status](https://github.com/skypjack/meta/workflows/build/badge.svg)](https://github.com/skypjack/meta/actions) +[![Coverage Status](https://codecov.io/gh/skypjack/meta/branch/master/graph/badge.svg)](https://codecov.io/gh/skypjack/meta) [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.me/skypjack) - -[![Patreon](https://c5.patreon.com/external/logo/become_a_patron_button.png)](https://www.patreon.com/bePatron?c=1772573) +[![Patreon](https://img.shields.io/badge/become-patron-red.svg)](https://www.patreon.com/bePatron?c=1772573) > The reflection system was born within [EnTT](https://github.com/skypjack/entt) > and is developed and enriched there. This project is designed for those who @@ -18,6 +15,14 @@ > free reflection system which certainly deserves to be treated also separately > due to its quality and its rather peculiar features. +If you use `meta` and you want to say thanks or support the project, please +**consider becoming a patron**: + +[![Patreon](https://c5.patreon.com/external/logo/become_a_patron_button.png)](https://www.patreon.com/bePatron?c=1772573) + +[Many thanks](https://skypjack.github.io/patreon/) to those who supported me and +still support me today. + # Table of Contents * [Introduction](#introduction) diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 8f7c016..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,44 +0,0 @@ -# can use variables like {build} and {branch} -version: 1.0.{build} - -skip_tags: true - -image: -- Visual Studio 2019 -- Visual Studio 2017 - -environment: - BUILD_DIR: "%APPVEYOR_BUILD_FOLDER%\\build" - CTEST_OUTPUT_ON_FAILURE: 1 - -configuration: - - Debug - -matrix: - fast_finish: true - -for: - - - matrix: - only: - - image: Visual Studio 2019 - environment: - CMAKE_GENERATOR: "Visual Studio 16 2019" - - - matrix: - only: - - image: Visual Studio 2017 - environment: - CMAKE_GENERATOR: "Visual Studio 15 2017" - -before_build: - - cd %BUILD_DIR% - - cmake .. -DBUILD_TESTING=ON -DBUILD_LIB=ON -DCMAKE_CXX_FLAGS=/W1 -G"%CMAKE_GENERATOR%" - -after_build: - - ctest --timeout 5 -C Debug -j4 - -build: - parallel: true - project: build/meta.sln - verbosity: minimal