Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(platformio): Improve PlatformIO Configuration #101

Merged
merged 5 commits into from
Jun 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ jobs:
- run:
name: Install
command: ./.circleci/install_platform_io.sh
- run:
name: Empty Git Submodule Folders
command: |
rm -rf ./src/lib/{ArduinoJson/*,BIP66/*,uECC/*}
rm -rf ./test/lib/googletest/*
- run:
name: Build
command: ./.circleci/script_platform_io.sh
Expand Down
21 changes: 21 additions & 0 deletions .circleci/platformio.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/**
* This file is part of Ark Cpp Crypto.
*
* (c) Ark Ecosystem <info@ark.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
**/

// This is a dummy prototype 'setup' & 'loop' for CI testing.
// This isn't intended for project or production use.
// It is only used in the 'pio run' command from root in CI;
// successful completion of which asserts that the ARK Cpp-Crypto library builds on its own.
#if (defined PLATFORMIO && !defined UNIT_TEST)

#include <Arduino.h>

void setup() {}
void loop() {}

#endif
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

### Changed

- improved PlatformIO configuration ([#101])
- improved formatting and maintainability ([#98])
- improved Slots implementations ([#92])

Expand Down
7 changes: 3 additions & 4 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@

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

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

[env:esp8266]
platform = espressif8266
board = huzzah
framework = arduino
lib_ldf_mode = ${common.lib_ldf_mode}
lib_deps = ${common.lib_deps}
build_flags = ${common.build_flags}
src_filter = ${common.src_filter}
Expand All @@ -32,7 +32,6 @@ upload_speed = ${common.upload_speed}
platform = espressif32
board = esp32dev
framework = arduino
lib_ldf_mode = ${common.lib_ldf_mode}
lib_deps = ${common.lib_deps}
build_flags = ${common.build_flags}
src_filter = ${common.src_filter}
Expand Down
10 changes: 4 additions & 6 deletions test/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,20 @@
[platformio]
description = "Unit Tests for Ark-Cpp-Crypto"
src_dir = ..
lib_dir = ..
build_dir = .pio/.pioenvs
libdeps_dir = .pio/.piolibdeps

[common]
lib_ldf_mode = off
lib_deps = micro-ecc, AUnit, ArduinoJson@6.10.0, BIP66
build_flags = -I../test/iot/ -I../src -I../src/lib -I../src/include/cpp-crypto -DUNIT_TEST
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>
build_flags = -I../test -I../test/iot/ -I../src -I../src/lib -I../src/include/cpp-crypto -DUNIT_TEST
src_filter = +<src> +<test> -<test/.pio>
upload_speed = 921600

# esp8266 unit tests disabled until support is worked out
#[env:esp8266]
#platform = espressif8266
#board = huzzah
#framework = arduino
#lib_ldf_mode = ${common.lib_ldf_mode}
#lib_deps = ${common.lib_deps}
#build_flags = ${common.build_flags}
#src_filter = ${common.src_filter}
Expand All @@ -35,7 +34,6 @@ upload_speed = 921600
platform = espressif32
board = esp32dev
framework = arduino
lib_ldf_mode = ${common.lib_ldf_mode}
lib_deps = ${common.lib_deps}
build_flags = ${common.build_flags}
src_filter = ${common.src_filter}
Expand Down