Skip to content

Commit e888899

Browse files
authored
release: v0.7.0 (#158)
2 parents b05116d + 8f09243 commit e888899

File tree

168 files changed

+4130
-2673
lines changed

Some content is hidden

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

168 files changed

+4130
-2673
lines changed

.appveyor.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

.codacy.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
exclude_paths:
3+
- '*.sh'
4+
- '*.md'

.github/workflows/test.yml

Lines changed: 85 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -5,88 +5,115 @@ on:
55
branches:
66
- "**"
77
pull_request:
8-
types: [opened]
8+
types: [ready_for_review, synchronize, opened] # fix: synchronize triggers builds for PR merges with the base branch, currently causes duplicate builds as synchronize is treated the same as push for everything besides merges
99

1010
jobs:
11-
arduino-default:
11+
arduino:
1212
runs-on: ubuntu-latest
1313

1414
steps:
15-
- uses: actions/checkout@v1
16-
- name: Make scripts executable
17-
run: sudo chmod -R +x ./.github/workflows/test/*.sh
18-
- name: Install
19-
run: ./.github/workflows/test/install_arduino.sh
20-
- name: Build
21-
run: ./.github/workflows/test/script_arduino.sh
15+
- uses: actions/checkout@v1
16+
- name: Make scripts executable
17+
run: sudo chmod -R +x ./.github/workflows/test/*.sh
18+
- name: Install Dependencies
19+
run: ./.github/workflows/test/install_arduino.sh
20+
- name: Build Arduino Sketch
21+
run: ./.github/workflows/test/script_arduino.sh
2222

23-
linux-default:
23+
platformio:
2424
runs-on: ubuntu-latest
2525

2626
steps:
27-
- uses: actions/checkout@v1
28-
- name: Make scripts executable
29-
run: sudo chmod -R +x ./.github/workflows/test/*.sh
30-
- name: Install
31-
run: ./.github/workflows/test/install_platform_io.sh
32-
- name: Empty Git Submodule Folders
33-
run: |
34-
rm -rf ./src/lib/{ArduinoJson/*,BIP66/*,uECC/*}
35-
rm -rf ./test/lib/googletest/*
36-
- name: Build
37-
run: ./.github/workflows/test/script_platform_io.sh
27+
- uses: actions/checkout@v1
28+
- name: Install Dependencies
29+
run: |
30+
sudo pip install -U platformio
31+
platformio update
32+
- name: Build
33+
run: |
34+
platformio run
35+
platformio run -d ./test
3836
3937
linux-gcc7:
4038
runs-on: ubuntu-latest
4139

4240
steps:
43-
- uses: actions/checkout@v1
44-
- name: Install dependencies
45-
run: |
46-
sudo apt-add-repository -y ppa:ubuntu-toolchain-r/test
47-
sudo apt-get update
48-
sudo apt-get -y install g++-7 gcc-7 lcov
49-
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60 --slave /usr/bin/g++ g++ /usr/bin/g++-7
50-
sudo update-alternatives --config gcc
51-
- name: Make scripts executable
52-
run: sudo chmod -R +x ./.github/workflows/test/*.sh
53-
- name: Build
54-
run: ./.github/workflows/test/script_desktop.sh
55-
- name: Codecov upload
56-
run: bash <(curl -s https://codecov.io/bash) -t ${{ secrets.CODECOV_TOKEN }}
41+
- uses: actions/checkout@v1
42+
- name: Install Dependencies
43+
run: |
44+
sudo apt-add-repository -y ppa:ubuntu-toolchain-r/test
45+
sudo apt-get update
46+
sudo apt-get -y install g++-7 gcc-7 lcov
47+
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60 --slave /usr/bin/g++ g++ /usr/bin/g++-7
48+
sudo update-alternatives --config gcc
49+
- name: Build
50+
run: |
51+
mkdir build && cd build
52+
cmake -DCMAKE_BUILD_TYPE=Coverage -DUNIT_TEST=ON ..
53+
cmake --build .
54+
- name: Run Tests
55+
run: ./build/test/ark_cpp_crypto_tests
56+
- name: Codecov upload
57+
run: bash <(curl -s https://codecov.io/bash) -t ${{ secrets.CODECOV_TOKEN }}
5758

5859
linux-clang-5:
5960
runs-on: ubuntu-latest
6061

6162
steps:
62-
- uses: actions/checkout@v1
63-
- name: Install dependencies
64-
run: |
65-
sudo apt-get update
66-
sudo apt install liblldb-5.0-dev python-lldb-5.0 lcov
67-
sudo apt install clang-5.0 clang-tidy-5.0 clang-format-5.0 clang-5.0-doc libclang-common-5.0-dev libclang-5.0-dev libclang1-5.0 libllvm5.0 lldb-5.0 llvm-5.0 llvm-5.0-dev
68-
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang-5.0 60
69-
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 50
70-
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-5.0 60
71-
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 50
72-
- name: Make scripts executable
73-
run: sudo chmod -R +x ./.github/workflows/test/*.sh
74-
- name: Build
75-
run: ./.github/workflows/test/script_desktop.sh
76-
- name: Clang Tidy
77-
run: ./.github/workflows/test/clang_tidy.sh
78-
- name: Clang Format
79-
run: ./.github/workflows/test/clang_format.sh
63+
- uses: actions/checkout@v1
64+
- name: Install Dependencies
65+
run: |
66+
sudo apt-get update
67+
sudo apt install liblldb-5.0-dev python-lldb-5.0 lcov
68+
sudo apt install clang-5.0 clang-tidy-5.0 clang-format-5.0 clang-5.0-doc libclang-common-5.0-dev libclang-5.0-dev libclang1-5.0 libllvm5.0 lldb-5.0 llvm-5.0 llvm-5.0-dev
69+
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang-5.0 60
70+
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 50
71+
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-5.0 60
72+
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 50
73+
- name: Make scripts executable
74+
run: sudo chmod -R +x ./.github/workflows/test/*.sh
75+
- name: Build
76+
run: |
77+
mkdir build && cd build
78+
cmake -DUNIT_TEST=ON ..
79+
cmake --build .
80+
- name: Run Tests
81+
run: ./build/test/ark_cpp_crypto_tests
82+
- name: Clang Tidy
83+
run: ./.github/workflows/test/clang_tidy.sh
84+
- name: Clang Format
85+
run: ./.github/workflows/test/clang_format.sh
8086

8187
macOS:
8288
runs-on: macOS-latest
8389

8490
steps:
8591
- uses: actions/checkout@v1
8692
- run: COMPILER=clang++
87-
- name: Install dependencies
88-
run: brew install cmake lcov
89-
- name: Make scripts executable
90-
run: sudo chmod -R +x ./.github/workflows/test/*.sh
93+
- name: Install Dependencies
94+
run: brew install cmake
9195
- name: Build
92-
run: ./.github/workflows/test/script_desktop.sh
96+
run: |
97+
mkdir build && cd build
98+
cmake -DUNIT_TEST=ON ..
99+
cmake --build .
100+
- name: Run Tests
101+
run: ./build/test/ark_cpp_crypto_tests
102+
103+
windows:
104+
runs-on: windows-2016
105+
strategy:
106+
matrix:
107+
build: [Debug, Release]
108+
109+
steps:
110+
- uses: actions/checkout@v1
111+
- name: Setup MSBuild.exe
112+
uses: warrenbuckley/Setup-MSBuild@v1
113+
- name: CMake
114+
run: cmake -D UNIT_TEST=ON -G "Visual Studio 15 2017 Win64" .
115+
- name: Build Solution
116+
shell: cmd
117+
run: msbuild "%GITHUB_WORKSPACE%\ark_cpp_crypto.sln"
118+
- name: Run Tests
119+
run: call "%GITHUB_WORKSPACE%\test\Debug\ark_cpp_crypto_tests"

.github/workflows/test/clang_format.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash -ex
22

3-
grep -nr '\s$' src test examples .gitignore .gitmodules 2>&1 > /dev/null
3+
grep -nr '\s$' src test .gitignore 2>&1 > /dev/null
44
if $?; then
55
echo Trailing whitespace found, aborting
66
exit 1

.github/workflows/test/clang_tidy.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
#!/usr/bin/env bash
2+
13
# run clang tidy
2-
cmake -DENABLE_CLANG_TIDY=ON .
4+
cmake -DENABLE_CLANG_TIDY=ON -DUNIT_TEST=ON .
5+
36
make tidy > output.txt
47
#if [[ -n $(grep "warning: " output.txt) ]] || [[ -n $(grep "error: " output.txt) ]]; then
58
# for now only fail the test on errors. Change this as project matures

.github/workflows/test/install_platform_io.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/usr/bin/env bash
2+
13
# install PlatformIO
24
sudo pip install -U platformio
35

.github/workflows/test/script_arduino.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
bash ./extras/ARDUINO_IDE.sh --auto
44

55
mkdir -p ~/Arduino/libraries/cpp-crypto/
6-
mv ~/project/* ~/Arduino/libraries/cpp-crypto
6+
mv ${GITHUB_WORKSPACE}/* ~/Arduino/libraries/cpp-crypto/
77

8-
arduino-cli lib install "ArduinoJson@6.10.0"
9-
arduino-cli lib install "BIP66"
10-
arduino-cli lib install "micro-ecc"
8+
arduino-cli lib install "ArduinoJson@6.12.0"
9+
arduino-cli lib install "BIP66@0.2.0"
10+
arduino-cli lib install "micro-ecc@1.0.0"
1111

1212
arduino-cli compile --output temp.bin -b esp32:esp32:esp32 ~/Arduino/libraries/cpp-crypto/examples/arduino/ESP32/ESP32.ino --debug

.gitignore

Lines changed: 11 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
/.history
44
/.vs
55
/.vscode
6+
.pio
67
.pioenvs
78
.piolibdeps
89
.vscode/.browse.c_cpp.db*
@@ -11,64 +12,46 @@
1112
/include/uECC
1213
/lib/
1314
/bin/
14-
/src/CMakeFiles
15-
/CMakeFiles
16-
/src/Ark-Cpp-Crypto-lib.dir
17-
/src/cmake_install.cmake
18-
/src/Ark-Cpp-Crypto-lib.vcxproj.filters
19-
/src/Ark-Cpp-Crypto-lib.vcxproj
20-
/src/Ark-Cpp-Crypto-lib.sln
15+
build
16+
/src/ark_cpp_crypto.vcxproj.filters
17+
/src/ark_cpp_crypto.vcxproj
18+
/src/ark_cpp_crypto.sln
2119
/src/ALL_BUILD.vcxproj.filters
2220
/src/ALL_BUILD.vcxproj
23-
/test/Ark-Cpp-Crypto-tests.dir
24-
/test/CMakeFiles
2521
/test/NightlyMemoryCheck.vcxproj.filters
2622
/test/NightlyMemoryCheck.vcxproj
2723
/test/Nightly.vcxproj.filters
2824
/test/Nightly.vcxproj
2925
/test/Experimental.vcxproj.filters
3026
/test/Experimental.vcxproj
31-
/test/DartConfiguration.tcl
32-
/test/CTestTestfile.cmake
3327
/test/Continuous.vcxproj.filters
3428
/test/Continuous.vcxproj
35-
/test/cmake_install.cmake
36-
/test/Ark-Cpp-Crypto-tests.vcxproj.filters
37-
/test/Ark-Cpp-Crypto-tests.vcxproj
38-
/test/Ark-Cpp-Crypto-tests.sln
29+
/test/ark_cpp_crypto_tests.vcxproj.filters
30+
/test/ark_cpp_crypto_tests.vcxproj
31+
/test/ark_cpp_crypto_tests.sln
3932
/test/ALL_BUILD.vcxproj.filters
4033
/test/ALL_BUILD.vcxproj
4134
/test/INSTALL.vcxproj.filters
4235
/test/INSTALL.vcxproj
4336
/Win32
44-
/_3rdParty/Hunter
4537
/ZERO_CHECK.vcxproj.filters
4638
/ZERO_CHECK.vcxproj
47-
/cmake_install.cmake
48-
/CMakeCache.txt
49-
/Ark-Cpp-Crypto.sln
39+
/ark_cpp_crypto.sln
5040
/ALL_BUILD.vcxproj.filters
5141
/ALL_BUILD.vcxproj
5242
/src/INSTALL.vcxproj.filters
5343
/src/INSTALL.vcxproj
5444
/INSTALL.vcxproj.filters
5545
/INSTALL.vcxproj
56-
/src/Debug
57-
/test/Debug
46+
/examples/cmake_example/build
5847
/examples/cmake_example/ZERO_CHECK.vcxproj.filters
59-
/examples/cmake_example/Win32/Debug
6048
/examples/cmake_example/cmake_example.vcxproj.filters
6149
/examples/cmake_example/cmake_example.vcxproj
6250
/examples/cmake_example/cmake_example.sln
63-
/examples/cmake_example/cmake_example.dir/Debug
64-
/examples/cmake_example/Debug
65-
/examples/cmake_example/cmake_install.cmake
66-
/examples/cmake_example/CMakeFiles
67-
/examples/cmake_example/CMakeCache.txt
6851
/examples/cmake_example/ALL_BUILD.vcxproj.filters
6952
/examples/cmake_example/ALL_BUILD.vcxproj
7053
/examples/cmake_example/ZERO_CHECK.vcxproj
71-
/examples/cmake_example/Cpp-Crypto-Example.dir/Debug
7254
/examples/cmake_example/Cpp-Crypto-Example.vcxproj.filters
7355
/examples/cmake_example/Cpp-Crypto-Example.vcxproj
7456
/examples/cmake_example/Cpp-Crypto-Example.sln
57+
/examples/cmake_example/lib/cpp-crypto

.gitmodules

Lines changed: 0 additions & 12 deletions
This file was deleted.

.vscode/launch.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "Debug Tests",
9+
"type": "cppdbg",
10+
"request": "launch",
11+
"program": "${workspaceFolder}/test/Ark-Cpp-Crypto-tests",
12+
"args": [],
13+
"stopAtEntry": false,
14+
"cwd": "${workspaceFolder}/test/",
15+
"environment": [],
16+
"externalConsole": false,
17+
"MIMode": "gdb",
18+
"setupCommands": [
19+
{
20+
"description": "Enable pretty-printing for gdb",
21+
"text": "-enable-pretty-printing",
22+
"ignoreFailures": true
23+
}
24+
],
25+
"miDebuggerPath": "/usr/bin/gdb",
26+
"preLaunchTask": "build_tests"
27+
}
28+
]
29+
}

0 commit comments

Comments
 (0)