Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit cc607a6

Browse filesBrowse files
committed
Fix issue #352 - backend used before assigned when loading dependencies
1 parent 18c2040 commit cc607a6
Copy full SHA for cc607a6

File tree

6 files changed

+30
-9
lines changed
Filter options

6 files changed

+30
-9
lines changed

‎.github/workflows/linux.yaml

Copy file name to clipboardExpand all lines: .github/workflows/linux.yaml
+15
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,21 @@ name: linux
44
on: [push, pull_request]
55

66
jobs:
7+
"BusIO_with_dependencies":
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v3
11+
- uses: ruby/setup-ruby@v1
12+
with:
13+
ruby-version: 2.6
14+
- name: Check usage - Test BusIO from scratch
15+
run: |
16+
g++ -v
17+
cd SampleProjects/BusIO
18+
bundle install
19+
bundle exec ensure_arduino_installation.rb
20+
bundle exec arduino_ci.rb
21+
722
"rubocop":
823
runs-on: ubuntu-latest
924
steps:

‎CHANGELOG.md

Copy file name to clipboardExpand all lines: CHANGELOG.md
+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1515
### Removed
1616

1717
### Fixed
18+
- Fixes #352, in which the Arduino backend was being referenced in the CI runner before being explicitly assigned; this affected all tests of modules that used `library.properties` to specify runtime Arduino module dependencies.
1819

1920
### Security
2021

‎SampleProjects/BusIO/.arduino-ci.yml

Copy file name to clipboardExpand all lines: SampleProjects/BusIO/.arduino-ci.yml
+2-3
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@ unittest:
22
platforms:
33
- mega2560
44
libraries:
5-
- "Adafruit BusIO"
6-
# - "Adafruit_BusIO" <= This works if you have the library pre-installed
5+
- "Adafruit_BusIO"
76

87
compile:
98
platforms:
109
- mega2560
1110
libraries:
12-
- "Adafruit BusIO"
11+
- "Adafruit_BusIO"

‎SampleProjects/BusIO/README.md

Copy file name to clipboard
+5-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
# BusIO
22

33
This is an example of a library that depends on Adafruit BusIO.
4-
It is provided to help reproduce #192.
4+
It is provided to help reproduce #192 and #352.
5+
6+
This example specifies a dependency in `library.properties`, which
7+
exercises the `arduino_ci.rb` CI runner in a way that the other
8+
SampleProjects currently do not.

‎SampleProjects/BusIO/library.properties

Copy file name to clipboardExpand all lines: SampleProjects/BusIO/library.properties
+1
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ category=Other
88
url=https://github.com/Arduino-CI/arduino_ci/SampleProjects/BusIO
99
architectures=avr,esp8266
1010
includes=BusIO.h
11+
depends=Adafruit BusIO

‎exe/arduino_ci.rb

Copy file name to clipboardExpand all lines: exe/arduino_ci.rb
+6-5
Original file line numberDiff line numberDiff line change
@@ -351,11 +351,6 @@ def perform_bootstrap
351351
end
352352
end
353353

354-
install_arduino_library_dependencies(
355-
cpp_library.arduino_library_dependencies,
356-
"<#{ArduinoCI::CppLibrary::LIBRARY_PROPERTIES_FILE}>"
357-
)
358-
359354
# return all objects needed by other steps
360355
{
361356
backend: backend,
@@ -604,6 +599,12 @@ def perform_example_compilation_tests(cpp_library, config)
604599

605600
strap = perform_bootstrap
606601
@backend = strap[:backend]
602+
603+
install_arduino_library_dependencies(
604+
strap[:cpp_library].arduino_library_dependencies,
605+
"<#{ArduinoCI::CppLibrary::LIBRARY_PROPERTIES_FILE}>"
606+
)
607+
607608
perform_unit_tests(strap[:cpp_library], strap[:config])
608609
perform_example_compilation_tests(strap[:cpp_library], strap[:config])
609610

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.