Skip to content

Commit 3fe43c2

Browse files
committed
Allow configuration overrides in examples directory
1 parent 89ce4d5 commit 3fe43c2

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1111
- `CIConfig.available_override_config_path()` to search for available override files in standard locations
1212
- `CIConfig.override_file_from_project_library` and `CIConfig.override_file_from_example` to expose config locations
1313
- CI runner script now expliclty informs about config overrides
14+
- A project `examples/` directory can now provide its own configuration override file, which provides no new flexibility but simply mirrors the behavior for `tests/`.
1415

1516
### Changed
1617
- `CIConfig` now uses `Pathname` instead of strings
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
compile:
2+
platforms:
3+
- uno
4+
- due
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
compile:
2+
platforms:
3+
- uno
4+
- due

exe/arduino_ci.rb

+5-2
Original file line numberDiff line numberDiff line change
@@ -488,13 +488,16 @@ def perform_example_compilation_tests(cpp_library, config)
488488
return
489489
end
490490

491+
inform("Using configuration override from examples") { config.override_file_from_example(cpp_library.examples_dir) }
492+
ex_config = config.from_example(cpp_library.examples_dir)
493+
491494
library_examples.each do |example_path|
492495
example_name = File.basename(example_path)
493496
puts
494497
inform("Discovered example sketch") { example_name }
495498

496-
inform("Using configuration override from example") { config.override_file_from_example(example_path) }
497-
ovr_config = config.from_example(example_path)
499+
inform("Using configuration override from example") { ex_config.override_file_from_example(example_path) }
500+
ovr_config = ex_config.from_example(example_path)
498501

499502
platforms = choose_platform_set(ovr_config, "library example", ovr_config.platforms_to_build, cpp_library.library_properties)
500503

0 commit comments

Comments
 (0)