Skip to content

Commit 6bad2f0

Browse files
committed
Fix builtin-platform logic, by removing it entirely
1 parent bd397f0 commit 6bad2f0

File tree

5 files changed

+10
-22
lines changed

5 files changed

+10
-22
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
2929

3030
### Removed
3131
- `ARDUINO_CI_SKIP_SPLASH_SCREEN_RSPEC_TESTS` no longer affects any tests because there are no longer splash screens since switching to `arduino-cli`
32+
- `CIConfig.package_builtin?` as this is no longer relevant to the `arduino-cli` backend (which has no built-in packages)
3233

3334
### Fixed
3435
- Mismatches between library names in `library.properties` and the directory names, which can cause cryptic failures

exe/arduino_ci.rb

+3-10
Original file line numberDiff line numberDiff line change
@@ -310,29 +310,22 @@ def perform_example_compilation_tests(cpp_library, config)
310310
# do that, set the URLs, and download the packages
311311
all_packages = example_platform_info.values.map { |v| v[:package] }.uniq.reject(&:nil?)
312312

313-
builtin_packages, external_packages = all_packages.partition { |p| config.package_builtin?(p) }
314-
315-
# inform about builtin packages
316-
builtin_packages.each do |p|
317-
inform("Using built-in board package") { p }
318-
end
319-
320313
# make sure any non-builtin package has a URL defined
321-
external_packages.each do |p|
314+
all_packages.each do |p|
322315
assure("Board package #{p} has a defined URL") { board_package_url[p] }
323316
end
324317

325318
# set up all the board manager URLs.
326319
# we can safely reject nils now, they would be for the builtins
327-
all_urls = external_packages.map { |p| board_package_url[p] }.uniq.reject(&:nil?)
320+
all_urls = all_packages.map { |p| board_package_url[p] }.uniq.reject(&:nil?)
328321

329322
unless all_urls.empty?
330323
assure("Setting board manager URLs") do
331324
@backend.board_manager_urls = all_urls
332325
end
333326
end
334327

335-
external_packages.each do |p|
328+
all_packages.each do |p|
336329
assure("Installing board package #{p}") do
337330
@backend.install_boards(p)
338331
end

lib/arduino_ci/ci_config.rb

-7
Original file line numberDiff line numberDiff line change
@@ -232,13 +232,6 @@ def platform_definition(platform_name)
232232
deep_clone(defn)
233233
end
234234

235-
# Whether a package is built-in to arduino
236-
# @param package [String] the package name (e.g. "arduino:avr")
237-
# @return [bool]
238-
def package_builtin?(package)
239-
package.start_with?("arduino:")
240-
end
241-
242235
# the URL that gives the download info for a given package (a JSON file).
243236
# this is NOT where the package comes from.
244237
# @param package [String] the package name (e.g. "arduino:avr")

misc/default.yml

+6-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,12 @@
33
# https://en.wikipedia.org/wiki/List_of_Arduino_boards_and_compatible_systems
44

55
packages:
6-
# arduino:xxx are builtin, we don't need to include them here
7-
# but if we did, it would be url: https://downloads.arduino.cc/packages/package_index.json
6+
arduino:avr:
7+
url: https://downloads.arduino.cc/packages/package_index.json
8+
arduino:sam:
9+
url: https://downloads.arduino.cc/packages/package_index.json
10+
arduino:samd:
11+
url: https://downloads.arduino.cc/packages/package_index.json
812
esp8266:esp8266:
913
url: http://arduino.esp8266.com/stable/package_esp8266com_index.json
1014
adafruit:avr:

spec/ci_config_spec.rb

-3
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@
2727
expect(zero[:package]).to eq("arduino:samd")
2828
expect(zero[:gcc].class).to eq(Hash)
2929

30-
expect(default_config.package_builtin?("arduino:avr")).to be true
31-
expect(default_config.package_builtin?("adafruit:avr")).to be false
32-
3330
expect(default_config.package_url("adafruit:avr")).to eq("https://adafruit.github.io/arduino-board-index/package_adafruit_index.json")
3431
expect(default_config.package_url("adafruit:samd")).to eq("https://adafruit.github.io/arduino-board-index/package_adafruit_index.json")
3532
expect(default_config.package_url("esp32:esp32")).to eq("https://dl.espressif.com/dl/package_esp32_index.json")

0 commit comments

Comments
 (0)