Skip to content

Commit f5ca638

Browse files
authored
feat: add cryptographic functionality (#30)
1 parent 2f7db6f commit f5ca638

File tree

14 files changed

+3416
-310
lines changed

14 files changed

+3416
-310
lines changed

.github/workflows/lint.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,4 @@ jobs:
2424
run: |
2525
cd hypercomplex
2626
/home/runner/.local/bin/cpplint --quiet Hypercomplex.hpp
27+
/home/runner/.local/bin/cpplint --quiet Polynomial.hpp

.github/workflows/unit.yml

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747

4848
- name: Execute Test Program
4949
working-directory: ${{env.working-directory}}
50-
run: ./test -d yes -w NoAssertions --use-colour yes --benchmark-samples 100 --benchmark-resamples 100000
50+
run: ./test ~[local] -d yes -w NoAssertions --use-colour yes --benchmark-samples 100 --benchmark-resamples 100000
5151

5252
code-coverage:
5353
runs-on: ubuntu-20.04
@@ -56,10 +56,13 @@ jobs:
5656

5757
steps:
5858

59-
- name: Install MPFR
59+
- name: Install lcov
6060
run: |
6161
sudo apt-get update -y
62-
sudo apt-get install -y libmpfr-dev
62+
sudo apt-get install -y lcov
63+
64+
- name: Install MPFR
65+
run: sudo apt-get install -y libmpfr-dev
6366

6467
- name: Checkout Repository
6568
uses: actions/checkout@v2
@@ -73,20 +76,26 @@ jobs:
7376

7477
- name: Compile Test Program
7578
working-directory: ${{env.working-directory}}
76-
run: g++ -O0 -Wall --std=c++17 --coverage -o test test.cpp -lmpfr -lgmp
79+
run: g++ -O0 -fprofile-arcs -ftest-coverage -Wall --std=c++17 --coverage -o test test.cpp -lmpfr -lgmp
7780

7881
- name: Execute Test Program
7982
working-directory: ${{env.working-directory}}
80-
run: ./test
83+
run: ./test ~[local]
8184

8285
- name: Generate Coverage Report
83-
run: gcov -o . test.cpp
84-
85-
- name: Submit Report to Codecov
8686
working-directory: ${{env.working-directory}}
8787
run: |
88-
CODECOV_TOKEN=${{ secrets.CODECOV_TOKEN }}
89-
bash <(curl -s https://codecov.io/bash)
88+
gcov test.cpp
89+
lcov --capture --directory . --output-file coverage.info
90+
rm -rf *.gcov test.gc*
91+
92+
- name: Submit Report to Codecov
93+
uses: codecov/codecov-action@v3
94+
with:
95+
token: ${{ secrets.CODECOV_TOKEN }}
96+
files: .test/unit/coverage.info
97+
fail_ci_if_error: true
98+
verbose: true
9099

91100
memcheck:
92101
runs-on: ubuntu-20.04
@@ -120,6 +129,6 @@ jobs:
120129
- name: Analyze Test Program Execution
121130
working-directory: ${{env.working-directory}}
122131
run: |
123-
valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --verbose --log-file=valgrind.txt ./test
132+
valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --verbose --log-file=valgrind.txt ./test ~[local]
124133
cat valgrind.txt
125134
grep -q -w "All heap blocks were freed -- no leaks are possible" "valgrind.txt"

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,7 @@
44
# local documentation
55
docs/html
66
docs/latex
7+
8+
# Sage notebooks
9+
Hypercomplex.html
10+
Hypercomplex.ipynb

.test/docs/test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
/*
22
###############################################################################
33
#
4-
# Test: raw library include
4+
# Test: code presented in the documentation
55
#
66
# AUTHOR: Maciej_Bak
7-
# AFFILIATION: Swiss_Institute_of_Bioinformatics
7+
# AFFILIATION: Department_of_Mathematics_City_University_of_London
88
99
# CREATED: 22-10-2020
1010
# LICENSE: MIT

.test/include/test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Test: raw library include
55
#
66
# AUTHOR: Maciej_Bak
7-
# AFFILIATION: Swiss_Institute_of_Bioinformatics
7+
# AFFILIATION: Department_of_Mathematics_City_University_of_London
88
99
# CREATED: 22-10-2020
1010
# LICENSE: MIT

.test/install/test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Test: include installed library
55
#
66
# AUTHOR: Maciej_Bak
7-
# AFFILIATION: Swiss_Institute_of_Bioinformatics
7+
# AFFILIATION: Department_of_Mathematics_City_University_of_London
88
99
# CREATED: 22-10-2020
1010
# LICENSE: MIT

0 commit comments

Comments
 (0)