Skip to content

Commit e699436

Browse files
authored
Merge pull request #338 from ianfixes/2022-12-28_tweaks
Further bugfixes and documentation fixes
2 parents a967a67 + 8904255 commit e699436

File tree

19 files changed

+156
-50
lines changed

19 files changed

+156
-50
lines changed

.github/workflows/linter.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
steps:
1717
- name: Checkout Code
18-
uses: actions/checkout@v2
18+
uses: actions/checkout@v3
1919
with:
2020
# Full git history is needed to get a proper list of changed files within `super-linter`
2121
fetch-depth: 0

.github/workflows/linux.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
"rubocop":
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v2
10+
- uses: actions/checkout@v3
1111
- uses: ruby/setup-ruby@v1
1212
with:
1313
ruby-version: 2.6
@@ -21,7 +21,7 @@ jobs:
2121
"rspec-linux":
2222
runs-on: ubuntu-latest
2323
steps:
24-
- uses: actions/checkout@v2
24+
- uses: actions/checkout@v3
2525
- uses: ruby/setup-ruby@v1
2626
with:
2727
ruby-version: 2.6
@@ -34,7 +34,7 @@ jobs:
3434
"TestSomething":
3535
runs-on: ubuntu-latest
3636
steps:
37-
- uses: actions/checkout@v2
37+
- uses: actions/checkout@v3
3838
- uses: ruby/setup-ruby@v1
3939
with:
4040
ruby-version: 2.6
@@ -44,12 +44,13 @@ jobs:
4444
bundle install
4545
cd SampleProjects/TestSomething
4646
bundle install
47+
bundle exec arduino_ci.rb --help
4748
bundle exec arduino_ci.rb
4849
4950
NetworkLib:
5051
runs-on: ubuntu-latest
5152
steps:
52-
- uses: actions/checkout@v2
53+
- uses: actions/checkout@v3
5354
- uses: ruby/setup-ruby@v1
5455
with:
5556
ruby-version: 2.6
@@ -65,7 +66,7 @@ jobs:
6566
SharedLibrary:
6667
runs-on: ubuntu-latest
6768
steps:
68-
- uses: actions/checkout@v2
69+
- uses: actions/checkout@v3
6970
- uses: ruby/setup-ruby@v1
7071
with:
7172
ruby-version: 2.6

.github/workflows/macos.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
"rubocop":
88
runs-on: macos-latest
99
steps:
10-
- uses: actions/checkout@v2
10+
- uses: actions/checkout@v3
1111
- uses: ruby/setup-ruby@v1
1212
with:
1313
ruby-version: 2.6
@@ -21,7 +21,7 @@ jobs:
2121
"rspec-macos":
2222
runs-on: macos-latest
2323
steps:
24-
- uses: actions/checkout@v2
24+
- uses: actions/checkout@v3
2525
- uses: ruby/setup-ruby@v1
2626
with:
2727
ruby-version: 2.6
@@ -34,7 +34,7 @@ jobs:
3434
"TestSomething":
3535
runs-on: macos-latest
3636
steps:
37-
- uses: actions/checkout@v2
37+
- uses: actions/checkout@v3
3838
- uses: ruby/setup-ruby@v1
3939
with:
4040
ruby-version: 2.6
@@ -44,12 +44,13 @@ jobs:
4444
bundle install
4545
cd SampleProjects/TestSomething
4646
bundle install
47+
bundle exec arduino_ci.rb --help
4748
bundle exec arduino_ci.rb
4849
4950
NetworkLib:
5051
runs-on: macos-latest
5152
steps:
52-
- uses: actions/checkout@v2
53+
- uses: actions/checkout@v3
5354
- uses: ruby/setup-ruby@v1
5455
with:
5556
ruby-version: 2.6
@@ -65,7 +66,7 @@ jobs:
6566
SharedLibrary:
6667
runs-on: macos-latest
6768
steps:
68-
- uses: actions/checkout@v2
69+
- uses: actions/checkout@v3
6970
- uses: ruby/setup-ruby@v1
7071
with:
7172
ruby-version: 2.6

.github/workflows/spelling.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
steps:
1717
- name: Checkout Code
18-
uses: actions/checkout@v2
18+
uses: actions/checkout@v3
1919
with:
2020
# Full git history is needed to get a proper list of changed files within `super-linter`
2121
fetch-depth: 0

.github/workflows/windows.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
"rubocop":
88
runs-on: windows-latest
99
steps:
10-
- uses: actions/checkout@v2
10+
- uses: actions/checkout@v3
1111
- uses: ruby/setup-ruby@v1
1212
with:
1313
ruby-version: 2.6
@@ -21,7 +21,7 @@ jobs:
2121
"rspec-windows":
2222
runs-on: windows-latest
2323
steps:
24-
- uses: actions/checkout@v2
24+
- uses: actions/checkout@v3
2525
- uses: ruby/setup-ruby@v1
2626
with:
2727
ruby-version: 2.6
@@ -34,7 +34,7 @@ jobs:
3434
TestSomething:
3535
runs-on: windows-latest
3636
steps:
37-
- uses: actions/checkout@v2
37+
- uses: actions/checkout@v3
3838
- uses: ruby/setup-ruby@v1
3939
with:
4040
ruby-version: 2.6
@@ -44,12 +44,13 @@ jobs:
4444
bundle install
4545
cd SampleProjects/TestSomething
4646
bundle install
47+
bundle exec arduino_ci.rb --help
4748
bundle exec arduino_ci.rb
4849
4950
NetworkLib:
5051
runs-on: windows-latest
5152
steps:
52-
- uses: actions/checkout@v2
53+
- uses: actions/checkout@v3
5354
- uses: ruby/setup-ruby@v1
5455
with:
5556
ruby-version: 2.6
@@ -65,7 +66,7 @@ jobs:
6566
SharedLibrary:
6667
runs-on: windows-latest
6768
steps:
68-
- uses: actions/checkout@v2
69+
- uses: actions/checkout@v3
6970
- uses: ruby/setup-ruby@v1
7071
with:
7172
ruby-version: 2.6

CHANGELOG.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,25 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
## [Unreleased]
99
### Added
10+
- C++ definitions of `ARDUINO_CI_COMPILATION_MOCKS` and `ARDUINO_CI_GODMODE` to aid in compilation macros
11+
- `CIConfig.available_override_config_path()` to search for available override files in standard locations
12+
- `CIConfig.override_file_from_project_library` and `CIConfig.override_file_from_example` to expose config locations
13+
- 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/`.
1015

1116
### Changed
17+
- `CIConfig` now uses `Pathname` instead of strings
1218

1319
### Deprecated
1420

1521
### Removed
22+
- `CIConfig.with_config`, which was only used internally
1623

1724
### Fixed
25+
- `arduino_ci.rb --help` no longer crashes
1826

1927
- Fix missing `LED_BUILTIN` definition for Arduino Due, Zero and Circuit Playground.
28+
- No longer ignore failures if the first step of compiling files for the unit test fails.
2029

2130
### Security
2231

@@ -30,7 +39,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
3039
- Support for `dtostrf()`
3140
- Added a CI workflow to lint the code base
3241
- Added a CI workflow to check for spelling errors
33-
- Extraction of byes usage in a compiled sketch is now calculated in a method: `ArduinoBackend.last_bytes_usage`
42+
- Extraction of bytes usage in a compiled sketch is now calculated in a method: `ArduinoBackend.last_bytes_usage`
3443
- Added ```nano_every``` platform to represent ```arduino:megaavr``` architecture
3544
- Working directory is now printed in test runner output
3645
- Explicitly include `irb` via rubygems

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,11 @@ gem 'arduino_ci', path: '/path/to/development/dir/for/arduino_ci'
118118

119119
### Installing the Dependencies
120120

121-
Fulfilling the `arduino_ci` library dependency is as easy as running either of these two commands:
121+
Fulfilling the `arduino_ci` library dependency is as easy as running one or both of these commands:
122122

123123
```console
124-
$ bundle install # adds packages to global library (may require admin rights)
125-
$ bundle install --path vendor/bundle # adds packages to local library
124+
$ bundle config set --local path 'vendor/bundle' # if you lack administrative privileges to install globally
125+
$ bundle install
126126
```
127127

128128
This will create a `Gemfile.lock` in your project directory, which you may optionally check into source control. A broader introduction to ruby dependencies is outside the scope of this document.
@@ -169,7 +169,7 @@ jobs:
169169
runTest:
170170
runs-on: ubuntu-latest
171171
steps:
172-
- uses: actions/checkout@v2
172+
- uses: actions/checkout@v3
173173
- uses: ruby/setup-ruby@v1
174174
with:
175175
ruby-version: 2.6

REFERENCE.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ This allows a file (or glob) pattern to be executed in your tests directory, cre
4444
This allows a file (or glob) pattern to be executed in your tests directory, creating a blacklist of files to skip. E.g. `--testfile-reject=test_animal_*.cpp` would match `test_animal_cat.cpp` and `test_animal_dog.cpp` (skipping those) and test only `test_plant_rose.cpp`, `test_plant_daisy.cpp`, etc.
4545

4646

47+
### `--min-free-space` option
48+
49+
This specifies the minimum free SRAM memory for stack/heap, in bytes, that _must_ be leftover after compilation. This value applies globally -- to _all_ platforms that will be included in a test run.
50+
51+
4752
### `CUSTOM_INIT_SCRIPT` environment variable
4853

4954
If set, testing will execute (using `/bin/sh`) the script referred to by this variable -- relative to the current working directory (i.e. the root directory of the library). The script will _run_ in the Arduino Libraries directory (changing to the Libraries directory, running the script, and returning to the individual library root afterward). This enables use cases like the GitHub action to install custom library versions (i.e. a version of a library that is different than what the library manager would automatically install by name) prior to CI test runs.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
compile:
2+
platforms:
3+
- uno
4+
- due
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
compile:
2+
platforms:
3+
- uno
4+
- due

0 commit comments

Comments
 (0)