Skip to content

Commit

Permalink
modernise and rename project (#50)
Browse files Browse the repository at this point in the history
* modernize and rename project

* use gcc-9

* improve compiler compatibility

* improve instalibility

* include array header

* install glue target

* remove lossy conversions

* add find_package(PEGParserGlue)

* disable shadown warning

* remove deprecated std::iterator

* remove conversion

* rename examples and unshadow member

* add example workflow

* remove arg name

* rename workflow

* try with auto

* remove default argument

* move callback type outside function

* rename peg -> presets

* move OtherExpression out of type declarations

* use template callback parameter

* unwrap call

* add missing args

* add explicit conversion

* add implicit args

* use explicit arguments

* add explicit conversion

* don't supress output

* abort windows tests
  • Loading branch information
TheLartians authored May 7, 2020
1 parent 18213ca commit 2dad517
Show file tree
Hide file tree
Showing 51 changed files with 2,479 additions and 1,821 deletions.
16 changes: 16 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
BasedOnStyle: Google
AccessModifierOffset: '-2'
AlignTrailingComments: 'true'
AllowAllParametersOfDeclarationOnNextLine: 'false'
AlwaysBreakTemplateDeclarations: 'No'
BreakBeforeBraces: Attach
ColumnLimit: '100'
ConstructorInitializerAllOnOneLineOrOnePerLine: 'true'
IncludeBlocks: Regroup
IndentPPDirectives: AfterHash
IndentWidth: '2'
NamespaceIndentation: All
BreakBeforeBinaryOperators: All
BreakBeforeTernaryOperators: 'true'
...
27 changes: 27 additions & 0 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Examples

on:
push:
branches:
- master
pull_request:
branches:
- master

env:
CTEST_OUTPUT_ON_FAILURE: 1
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1

- name: configure
run: cmake -Hexample -Bbuild

- name: build
run: cmake --build build -j4
37 changes: 37 additions & 0 deletions .github/workflows/install.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Install

on:
push:
branches:
- master
pull_request:
branches:
- master

env:
CTEST_OUTPUT_ON_FAILURE: 1

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1

- name: build and install library
run: |
CXX=g++-9 cmake -Hglue -Bbuild -DCMAKE_BUILD_TYPE=Release
sudo cmake --build build --target install
rm -rf build
- name: configure
run: CXX=g++-9 cmake -Htest -Bbuild -DTEST_INSTALLED_VERSION=1

- name: build
run: cmake --build build --config Debug -j4

- name: test
run: |
cd build
ctest --build-config Debug
31 changes: 31 additions & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: MacOS

on:
push:
branches:
- master
pull_request:
branches:
- master

env:
CTEST_OUTPUT_ON_FAILURE: 1

jobs:
build:

runs-on: macos-latest

steps:
- uses: actions/checkout@v1

- name: configure
run: cmake -Htest -Bbuild

- name: build
run: cmake --build build --config Debug -j4

- name: test
run: |
cd build
ctest --build-config Debug
26 changes: 26 additions & 0 deletions .github/workflows/style.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Style

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:

runs-on: macos-latest

steps:
- uses: actions/checkout@v1

- name: Install clang-format
run: brew install clang-format

- name: configure
run: cmake -Htest -Bbuild

- name: check style
run: cmake --build build --target check-format
59 changes: 59 additions & 0 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Ubuntu

on:
push:
branches:
- master
pull_request:
branches:
- master

env:
CTEST_OUTPUT_ON_FAILURE: 1
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1

- name: install valgrind
run: sudo apt install -y valgrind

- name: configure
run: CXX=g++-8 cmake -Htest -Bbuild -DCMAKE_BUILD_TYPE=Debug

- name: build
run: cmake --build build -j4

- name: test
run: cmake --build build -j4

- name: run tests with valgrind
run: valgrind --track-origins=yes --error-exitcode=1 --leak-check=full ./build/PEGParserTests

- name: configure with code coverage
run: CXX=g++-8 cmake -Htest -Bbuild -DENABLE_TEST_COVERAGE=1

- name: build with code coverage
run: cmake --build build -j4

- name: test with code coverage
run: |
cd build
ctest --build-config Debug
- name: install code coverage tools
run: |
wget https://github.com/linux-test-project/lcov/releases/download/v1.14/lcov-1.14.tar.gz
tar xvfz lcov-1.14.tar.gz;
sudo make install -C lcov-1.14
- name: collect code coverage
run: |
lcov --gcov-tool $(which gcov-8) --directory . --capture --no-external --exclude "*tests*" --exclude "*_deps*" --quiet --output-file coverage.info
lcov --gcov-tool $(which gcov-8) --list coverage.info
bash <(curl -s https://codecov.io/bash) -f coverage.info || echo "Codecov did not collect coverage reports"
35 changes: 35 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Windows

on:
push:
branches:
- master
pull_request:
branches:
- master

env:
CTEST_OUTPUT_ON_FAILURE: 1

jobs:
build:

runs-on: windows-latest

steps:
- uses: actions/checkout@v1

- name: configure
run: cmake -Htest -Bbuild

- name: build
run: cmake --build build --config Debug -j4

# I have absolutely no idea why the windows tests freeze here.
# Abort for now and will come back later.
# - name: test
# run: |
# cd build
# ctest --build-config Debug
- name: test
run: cmake -E false
70 changes: 0 additions & 70 deletions .travis.yml

This file was deleted.

Loading

0 comments on commit 2dad517

Please sign in to comment.