arduino_ci 0.1.12 → 0.1.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e4f20d94ac4bedc4752bd3e1654d82e975495178e03acb376bde929706a29f99
4
- data.tar.gz: e759bee8b5ab8150575f14f54bba4c94923a5c7da0de888cf6f81cb563e2f12d
3
+ metadata.gz: 8bc68a43b822ba3c0456a181772f22d0aabd5a3d068e4012da71a25c073b85d1
4
+ data.tar.gz: ca27e600b1c0768a5a2e69b0bde17cd6d985d3a99b9c963fc50b8d3675780e3e
5
5
  SHA512:
6
- metadata.gz: b50125ea2dd1b132bbe7caf9b79153cedffa340ca75cac954c9ebc183755dc31cf81033699792a727f9a594aceb779c278b306871e7df44467e5d385951763f5
7
- data.tar.gz: a48e40b8f1d92be759f545196410bf09f2870737f7c3254d87a16f78bcbbf6798f79ed1f155bc70b98bdbcc1ad3432a735dfb0bdedc1b60b132530634000759a
6
+ metadata.gz: 990cab7ac8de31536d3287d4bad8853f3a0710d89f49511cc54176be2a6ac4e725814bde7dcd9aaa3b6ce5dff47522a6294d802f3b53dacb921c6eb8a4702c7c
7
+ data.tar.gz: d6eb5c03d83ea50cf1ee361360ede6869481f65123667604f0ef5309611c493717e706d04893a2a55786249acf509b08eeef31ff149d1c411cb4a787e59ddb52
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
 
2
- # ArduinoCI Ruby gem (`arduino_ci`) [![Gem Version](https://badge.fury.io/rb/arduino_ci.svg)](https://rubygems.org/gems/arduino_ci) [![Documentation](http://img.shields.io/badge/docs-rdoc.info-blue.svg)](http://www.rubydoc.info/gems/arduino_ci/0.1.12)
2
+ # ArduinoCI Ruby gem (`arduino_ci`) [![Gem Version](https://badge.fury.io/rb/arduino_ci.svg)](https://rubygems.org/gems/arduino_ci) [![Documentation](http://img.shields.io/badge/docs-rdoc.info-blue.svg)](http://www.rubydoc.info/gems/arduino_ci/0.1.13)
3
3
 
4
4
  You want your Arduino library to be automatically built and tested every time someone contributes code to your project on GitHub, but the Arduino IDE lacks the ability to run unit tests. [Arduino CI](https://github.com/ianfixes/arduino_ci) provides that ability.
5
5
 
@@ -161,7 +161,7 @@ end
161
161
  last_board = nil
162
162
  if !cpp_library.tests_dir.exist?
163
163
  inform_multiline("Skipping unit tests; no tests dir at #{cpp_library.tests_dir}") do
164
- puts cpp_library.tests_dir.find.to_a.to_s
164
+ puts cpp_library.tests_dir.parent.find.to_a.to_s
165
165
  true
166
166
  end
167
167
  elsif cpp_library.test_files.empty?
@@ -207,13 +207,22 @@ if library_examples.empty?
207
207
  else
208
208
  attempt("Setting compiler warning level") { @arduino_cmd.set_pref("compiler.warning_level", "all") }
209
209
 
210
- # unlike previous, iterate examples / boards
211
- library_examples.each do |example_path|
210
+ # switching boards takes time, so iterate board first
211
+ # _then_ whichever examples match it
212
+ examples_by_platform = library_examples.each_with_object({}) do |example_path, acc|
212
213
  ovr_config = config.from_example(example_path)
213
214
  ovr_config.platforms_to_build.each do |p|
214
- board = all_platforms[p][:board]
215
- assure("Switching to board for #{p} (#{board})") { @arduino_cmd.use_board(board) } unless last_board == board
216
- last_board = board
215
+ acc[p] = [] unless acc.key?(p)
216
+ acc[p] << example_path
217
+ end
218
+ end
219
+
220
+ examples_by_platform.each do |platform, example_paths|
221
+ board = all_platforms[platform][:board]
222
+ assure("Switching to board for #{platform} (#{board})") { @arduino_cmd.use_board(board) } unless last_board == board
223
+ last_board = board
224
+
225
+ example_paths.each do |example_path|
217
226
  example_name = File.basename(example_path)
218
227
  attempt("Verifying #{example_name}") do
219
228
  ret = @arduino_cmd.verify_sketch(example_path)
@@ -1,3 +1,3 @@
1
1
  module ArduinoCI
2
- VERSION = "0.1.12".freeze
2
+ VERSION = "0.1.13".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arduino_ci
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.12
4
+ version: 0.1.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ian Katz
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-09-14 00:00:00.000000000 Z
11
+ date: 2018-09-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: os