Skip to content

Commit 2dad517

Browse files
authored
modernise and rename project (#50)
* 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
1 parent 18213ca commit 2dad517

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+2479
-1821
lines changed

.clang-format

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
BasedOnStyle: Google
3+
AccessModifierOffset: '-2'
4+
AlignTrailingComments: 'true'
5+
AllowAllParametersOfDeclarationOnNextLine: 'false'
6+
AlwaysBreakTemplateDeclarations: 'No'
7+
BreakBeforeBraces: Attach
8+
ColumnLimit: '100'
9+
ConstructorInitializerAllOnOneLineOrOnePerLine: 'true'
10+
IncludeBlocks: Regroup
11+
IndentPPDirectives: AfterHash
12+
IndentWidth: '2'
13+
NamespaceIndentation: All
14+
BreakBeforeBinaryOperators: All
15+
BreakBeforeTernaryOperators: 'true'
16+
...

.github/workflows/examples.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Examples
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
env:
12+
CTEST_OUTPUT_ON_FAILURE: 1
13+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
14+
15+
jobs:
16+
build:
17+
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- uses: actions/checkout@v1
22+
23+
- name: configure
24+
run: cmake -Hexample -Bbuild
25+
26+
- name: build
27+
run: cmake --build build -j4

.github/workflows/install.yml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Install
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
env:
12+
CTEST_OUTPUT_ON_FAILURE: 1
13+
14+
jobs:
15+
build:
16+
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- uses: actions/checkout@v1
21+
22+
- name: build and install library
23+
run: |
24+
CXX=g++-9 cmake -Hglue -Bbuild -DCMAKE_BUILD_TYPE=Release
25+
sudo cmake --build build --target install
26+
rm -rf build
27+
28+
- name: configure
29+
run: CXX=g++-9 cmake -Htest -Bbuild -DTEST_INSTALLED_VERSION=1
30+
31+
- name: build
32+
run: cmake --build build --config Debug -j4
33+
34+
- name: test
35+
run: |
36+
cd build
37+
ctest --build-config Debug

.github/workflows/macos.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: MacOS
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
env:
12+
CTEST_OUTPUT_ON_FAILURE: 1
13+
14+
jobs:
15+
build:
16+
17+
runs-on: macos-latest
18+
19+
steps:
20+
- uses: actions/checkout@v1
21+
22+
- name: configure
23+
run: cmake -Htest -Bbuild
24+
25+
- name: build
26+
run: cmake --build build --config Debug -j4
27+
28+
- name: test
29+
run: |
30+
cd build
31+
ctest --build-config Debug

.github/workflows/style.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Style
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
build:
13+
14+
runs-on: macos-latest
15+
16+
steps:
17+
- uses: actions/checkout@v1
18+
19+
- name: Install clang-format
20+
run: brew install clang-format
21+
22+
- name: configure
23+
run: cmake -Htest -Bbuild
24+
25+
- name: check style
26+
run: cmake --build build --target check-format

.github/workflows/ubuntu.yml

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Ubuntu
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
env:
12+
CTEST_OUTPUT_ON_FAILURE: 1
13+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
14+
15+
jobs:
16+
build:
17+
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- uses: actions/checkout@v1
22+
23+
- name: install valgrind
24+
run: sudo apt install -y valgrind
25+
26+
- name: configure
27+
run: CXX=g++-8 cmake -Htest -Bbuild -DCMAKE_BUILD_TYPE=Debug
28+
29+
- name: build
30+
run: cmake --build build -j4
31+
32+
- name: test
33+
run: cmake --build build -j4
34+
35+
- name: run tests with valgrind
36+
run: valgrind --track-origins=yes --error-exitcode=1 --leak-check=full ./build/PEGParserTests
37+
38+
- name: configure with code coverage
39+
run: CXX=g++-8 cmake -Htest -Bbuild -DENABLE_TEST_COVERAGE=1
40+
41+
- name: build with code coverage
42+
run: cmake --build build -j4
43+
44+
- name: test with code coverage
45+
run: |
46+
cd build
47+
ctest --build-config Debug
48+
49+
- name: install code coverage tools
50+
run: |
51+
wget https://github.com/linux-test-project/lcov/releases/download/v1.14/lcov-1.14.tar.gz
52+
tar xvfz lcov-1.14.tar.gz;
53+
sudo make install -C lcov-1.14
54+
55+
- name: collect code coverage
56+
run: |
57+
lcov --gcov-tool $(which gcov-8) --directory . --capture --no-external --exclude "*tests*" --exclude "*_deps*" --quiet --output-file coverage.info
58+
lcov --gcov-tool $(which gcov-8) --list coverage.info
59+
bash <(curl -s https://codecov.io/bash) -f coverage.info || echo "Codecov did not collect coverage reports"

.github/workflows/windows.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Windows
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
env:
12+
CTEST_OUTPUT_ON_FAILURE: 1
13+
14+
jobs:
15+
build:
16+
17+
runs-on: windows-latest
18+
19+
steps:
20+
- uses: actions/checkout@v1
21+
22+
- name: configure
23+
run: cmake -Htest -Bbuild
24+
25+
- name: build
26+
run: cmake --build build --config Debug -j4
27+
28+
# I have absolutely no idea why the windows tests freeze here.
29+
# Abort for now and will come back later.
30+
# - name: test
31+
# run: |
32+
# cd build
33+
# ctest --build-config Debug
34+
- name: test
35+
run: cmake -E false

.travis.yml

-70
This file was deleted.

0 commit comments

Comments
 (0)