-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modernize project and add MSVC support (#10)
* add .gitignore * update tests to use doctest * apply clang-format * update benchmark and version * add /permissive- flag * replace standalone with benchmark test * add codecov.yaml * update google benchmark * update google benchmark * compile with cross-compilation flags * test with other flags * try installing libc++ * try another answer * also install libc++abi-dev * build benchmark as release * remove deprecated std::iterator base class * why does release build of the benchmark target add the "-Werror" flag? * require C++17 * add find utility function * swap argument order * add instructions to run benchmark
- Loading branch information
1 parent
5b3672a
commit aab0c0d
Showing
26 changed files
with
926 additions
and
693 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Benchmark | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
|
||
# https://stackoverflow.com/questions/39332406/install-libc-on-ubuntu | ||
- name: install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install libc++-dev libc++abi-dev | ||
- name: configure | ||
# flags set to avoid strange regular expression backend error: https://github.com/google/benchmark/issues/773 | ||
run: cmake -Hbenchmark -Bbuild -DRUN_HAVE_STD_REGEX=0 -DRUN_HAVE_POSIX_REGEX=0 | ||
|
||
- name: build | ||
run: cmake --build build -j4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Install | ||
|
||
on: [push] | ||
|
||
env: | ||
CTEST_OUTPUT_ON_FAILURE: 1 | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
|
||
- name: build and install library | ||
run: | | ||
cmake -H. -Bbuild -DCMAKE_BUILD_TYPE=Release | ||
sudo cmake --build build --target install | ||
rm -rf build | ||
- name: configure | ||
run: 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: MacOS | ||
|
||
on: [push] | ||
|
||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Style | ||
|
||
on: [push] | ||
|
||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Ubuntu | ||
|
||
on: [push] | ||
|
||
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 -Htest -Bbuild -DENABLE_TEST_COVERAGE=1 | ||
|
||
- name: build | ||
run: cmake --build build --config Debug -j4 | ||
|
||
- name: test | ||
run: | | ||
cd build | ||
ctest --build-config Debug | ||
- name: collect code coverage | ||
run: bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Windows | ||
|
||
on: [push] | ||
|
||
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 | ||
|
||
- name: test | ||
run: | | ||
cd build | ||
ctest --build-config Debug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.DS_Store | ||
.vscode | ||
/build* |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.