Skip to content

Commit d9322d2

Browse files
sleepdefic1tfaustbrian
authored andcommitted
build(platformio): Improve PlatformIO Configuration (#101)
1 parent 899c1d0 commit d9322d2

5 files changed

Lines changed: 34 additions & 10 deletions

File tree

.circleci/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ jobs:
2323
- run:
2424
name: Install
2525
command: ./.circleci/install_platform_io.sh
26+
- run:
27+
name: Empty Git Submodule Folders
28+
command: |
29+
rm -rf ./src/lib/{ArduinoJson/*,BIP66/*,uECC/*}
30+
rm -rf ./test/lib/googletest/*
2631
- run:
2732
name: Build
2833
command: ./.circleci/script_platform_io.sh

.circleci/platformio.cpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/**
2+
* This file is part of Ark Cpp Crypto.
3+
*
4+
* (c) Ark Ecosystem <info@ark.io>
5+
*
6+
* For the full copyright and license information, please view the LICENSE
7+
* file that was distributed with this source code.
8+
**/
9+
10+
// This is a dummy prototype 'setup' & 'loop' for CI testing.
11+
// This isn't intended for project or production use.
12+
// It is only used in the 'pio run' command from root in CI;
13+
// successful completion of which asserts that the ARK Cpp-Crypto library builds on its own.
14+
#if (defined PLATFORMIO && !defined UNIT_TEST)
15+
16+
#include <Arduino.h>
17+
18+
void setup() {}
19+
void loop() {}
20+
21+
#endif

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
99

1010
### Changed
1111

12+
- improved PlatformIO configuration ([#101])
1213
- improved formatting and maintainability ([#98])
1314
- improved Slots implementations ([#92])
1415

platformio.ini

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,19 @@
1010

1111
[platformio]
1212
description = "A simple Cryptography Implementation in C++ for the ARK Blockchain."
13+
build_dir = .pio/.pioenvs
14+
libdeps_dir = .pio/.piolibdeps
1315

1416
[common]
15-
lib_ldf_mode = off
1617
lib_deps = micro-ecc, ArduinoJson@6.10.0, BIP66
1718
build_flags = -I./src/ -I./src/lib -I./src/include/cpp-crypto
18-
src_filter = +<*> -<.git/> -<examples/> -<lib/ArduinoJson> -<lib/uECC> -<CMakeFiles> -<lib/BIP66> -<lib/date>
19+
src_filter = +<*> +<../.circleci/platformio.cpp>
1920
upload_speed = 921600
2021

2122
[env:esp8266]
2223
platform = espressif8266
2324
board = huzzah
2425
framework = arduino
25-
lib_ldf_mode = ${common.lib_ldf_mode}
2626
lib_deps = ${common.lib_deps}
2727
build_flags = ${common.build_flags}
2828
src_filter = ${common.src_filter}
@@ -32,7 +32,6 @@ upload_speed = ${common.upload_speed}
3232
platform = espressif32
3333
board = esp32dev
3434
framework = arduino
35-
lib_ldf_mode = ${common.lib_ldf_mode}
3635
lib_deps = ${common.lib_deps}
3736
build_flags = ${common.build_flags}
3837
src_filter = ${common.src_filter}

test/platformio.ini

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,20 @@
1111
[platformio]
1212
description = "Unit Tests for Ark-Cpp-Crypto"
1313
src_dir = ..
14-
lib_dir = ..
14+
build_dir = .pio/.pioenvs
15+
libdeps_dir = .pio/.piolibdeps
1516

1617
[common]
17-
lib_ldf_mode = off
1818
lib_deps = micro-ecc, AUnit, ArduinoJson@6.10.0, BIP66
19-
build_flags = -I../test/iot/ -I../src -I../src/lib -I../src/include/cpp-crypto -DUNIT_TEST
20-
src_filter = +<*> -<.git/> -<examples/> -<extras> -<bin> -<lib> -<_3rdParty> -<CMakeFiles> -<src/CMakeFiles> -<test/CMakeFiles> -<src/lib/ArduinoJson> -<src/lib/uECC> -<test/lib/googletest> -<src/lib/BIP66> -<src/lib/date>
19+
build_flags = -I../test -I../test/iot/ -I../src -I../src/lib -I../src/include/cpp-crypto -DUNIT_TEST
20+
src_filter = +<src> +<test> -<test/.pio>
2121
upload_speed = 921600
2222

2323
# esp8266 unit tests disabled until support is worked out
2424
#[env:esp8266]
2525
#platform = espressif8266
2626
#board = huzzah
2727
#framework = arduino
28-
#lib_ldf_mode = ${common.lib_ldf_mode}
2928
#lib_deps = ${common.lib_deps}
3029
#build_flags = ${common.build_flags}
3130
#src_filter = ${common.src_filter}
@@ -35,7 +34,6 @@ upload_speed = 921600
3534
platform = espressif32
3635
board = esp32dev
3736
framework = arduino
38-
lib_ldf_mode = ${common.lib_ldf_mode}
3937
lib_deps = ${common.lib_deps}
4038
build_flags = ${common.build_flags}
4139
src_filter = ${common.src_filter}

0 commit comments

Comments
 (0)