Skip to content

Commit 03668eb

Browse files
authored
Merge pull request #334 from ianfixes/2021-02-15_rescue
Work in progress: 2022 Mergefest
2 parents 33a136d + ba0e4e2 commit 03668eb

29 files changed

+596
-281
lines changed

.gitattributes

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# the Git repository itself.
1414

1515
# Set the default behavior, in case people don't have core.autocrlf set.
16-
* text=auto
16+
* text=auto eol=lf
1717

1818
# Explicitly declare text files you want to always be normalized and converted
1919
# to native line endings on checkout. Git would likely get these right, but

.github/workflows/linux.yaml

+7-7
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,25 @@ jobs:
1111
- uses: ruby/setup-ruby@v1
1212
with:
1313
ruby-version: 2.6
14-
- name: Check style, functionality, and usage
14+
- name: Check style
1515
run: |
1616
g++ -v
1717
bundle install
1818
bundle exec rubocop --version
1919
bundle exec rubocop -D .
2020
21-
"rspec":
21+
"rspec-linux":
2222
runs-on: ubuntu-latest
2323
steps:
2424
- uses: actions/checkout@v2
2525
- uses: ruby/setup-ruby@v1
2626
with:
2727
ruby-version: 2.6
28-
- name: Check style, functionality, and usage
28+
- name: Check functionality
2929
run: |
3030
g++ -v
3131
bundle install
32-
bundle exec rspec --backtrace
32+
bundle exec rspec
3333
3434
"TestSomething":
3535
runs-on: ubuntu-latest
@@ -38,7 +38,7 @@ jobs:
3838
- uses: ruby/setup-ruby@v1
3939
with:
4040
ruby-version: 2.6
41-
- name: TestSomething
41+
- name: Check usage - TestSomething
4242
run: |
4343
g++ -v
4444
bundle install
@@ -53,7 +53,7 @@ jobs:
5353
- uses: ruby/setup-ruby@v1
5454
with:
5555
ruby-version: 2.6
56-
- name: Test NetworkLib from scratch
56+
- name: Check usage - Test NetworkLib from scratch
5757
run: |
5858
g++ -v
5959
cd SampleProjects/NetworkLib
@@ -69,5 +69,5 @@ jobs:
6969
- uses: ruby/setup-ruby@v1
7070
with:
7171
ruby-version: 2.6
72-
- name: Test SharedLibrary should fail
72+
- name: Check usage - Test SharedLibrary should fail
7373
run: ./SampleProjects/SharedLibrary/test.sh

.github/workflows/macos.yaml

+7-7
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,25 @@ jobs:
1111
- uses: ruby/setup-ruby@v1
1212
with:
1313
ruby-version: 2.6
14-
- name: Check style, functionality, and usage
14+
- name: Check style
1515
run: |
1616
g++ -v
1717
bundle install
1818
bundle exec rubocop --version
1919
bundle exec rubocop -D .
2020
21-
"rspec":
21+
"rspec-macos":
2222
runs-on: macos-latest
2323
steps:
2424
- uses: actions/checkout@v2
2525
- uses: ruby/setup-ruby@v1
2626
with:
2727
ruby-version: 2.6
28-
- name: Check style, functionality, and usage
28+
- name: Check functionality
2929
run: |
3030
g++ -v
3131
bundle install
32-
bundle exec rspec --backtrace
32+
bundle exec rspec
3333
3434
"TestSomething":
3535
runs-on: macos-latest
@@ -38,7 +38,7 @@ jobs:
3838
- uses: ruby/setup-ruby@v1
3939
with:
4040
ruby-version: 2.6
41-
- name: TestSomething
41+
- name: Check usage - TestSomething
4242
run: |
4343
g++ -v
4444
bundle install
@@ -53,7 +53,7 @@ jobs:
5353
- uses: ruby/setup-ruby@v1
5454
with:
5555
ruby-version: 2.6
56-
- name: Test NetworkLib from scratch
56+
- name: Check usage - Test NetworkLib from scratch
5757
run: |
5858
g++ -v
5959
cd SampleProjects/NetworkLib
@@ -69,5 +69,5 @@ jobs:
6969
- uses: ruby/setup-ruby@v1
7070
with:
7171
ruby-version: 2.6
72-
- name: Test SharedLibrary should fail
72+
- name: Check usage - Test SharedLibrary should fail
7373
run: ./SampleProjects/SharedLibrary/test.sh

.github/workflows/spelling.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ jobs:
2121
fetch-depth: 0
2222

2323
- name: Check Spelling
24-
uses: codespell-project/actions-codespell@master
24+
uses: codespell-project/actions-codespell@v1.0
2525
with:
2626
check_filenames: true

.github/workflows/windows.yaml

+20-9
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,41 @@ name: windows
44
on: [push, pull_request]
55

66
jobs:
7-
"rubocop_and_rspec":
7+
"rubocop":
88
runs-on: windows-latest
99
steps:
1010
- uses: actions/checkout@v2
1111
- uses: ruby/setup-ruby@v1
1212
with:
1313
ruby-version: 2.6
14-
- name: Check style, functionality, and usage
14+
- name: Check style
1515
run: |
1616
g++ -v
1717
bundle install
1818
bundle exec rubocop --version
19-
bundle exec rubocop -D .
20-
echo "done with Rubocop (See https://github.com/Arduino-CI/arduino_ci/issues/315)"
21-
bundle exec rspec --backtrace
19+
bundle exec rubocop -D . --except Layout/EndOfLine
2220
23-
"TestSomething":
21+
"rspec-windows":
2422
runs-on: windows-latest
2523
steps:
2624
- uses: actions/checkout@v2
2725
- uses: ruby/setup-ruby@v1
2826
with:
2927
ruby-version: 2.6
30-
- name: TestSomething
28+
- name: Check functionality
29+
run: |
30+
g++ -v
31+
bundle install
32+
bundle exec rspec
33+
34+
TestSomething:
35+
runs-on: windows-latest
36+
steps:
37+
- uses: actions/checkout@v2
38+
- uses: ruby/setup-ruby@v1
39+
with:
40+
ruby-version: 2.6
41+
- name: Check usage - TestSomething
3142
run: |
3243
g++ -v
3344
bundle install
@@ -42,7 +53,7 @@ jobs:
4253
- uses: ruby/setup-ruby@v1
4354
with:
4455
ruby-version: 2.6
45-
- name: Test NetworkLib from scratch
56+
- name: Check usage - Test NetworkLib from scratch
4657
run: |
4758
g++ -v
4859
cd SampleProjects/NetworkLib
@@ -58,5 +69,5 @@ jobs:
5869
- uses: ruby/setup-ruby@v1
5970
with:
6071
ruby-version: 2.6
61-
- name: Test SharedLibrary should fail
72+
- name: Check usage - Test SharedLibrary should fail
6273
run: ./SampleProjects/SharedLibrary/test.sh

CHANGELOG.md

+13
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1414
- Support for `dtostrf()`
1515
- Added a CI workflow to lint the code base
1616
- Added a CI workflow to check for spelling errors
17+
- Extraction of byes usage in a compiled sketch is now calculated in a method: `ArduinoBackend.last_bytes_usage`
18+
- Added ```nano_every``` platform to represent ```arduino:megaavr``` architecture
19+
- Working directory is now printed in test runner output
20+
- Explicitly include `irb` via rubygems
1721

1822
### Changed
1923
- We now compile a shared library to be used for each test.
@@ -22,6 +26,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
2226
- Update .gitattributes so we have consistent line endings
2327
- Change 266 files from CRLF to LF.
2428
- Run tests on push as well as on a pull request so developers can see impact
29+
- `ArduinoBackend` now exposes `config_file_path` instead of `config_dir` so that we can be explicit about [strange behavior in `arduino-cli` that isn't going to change anytime soon](https://github.com/arduino/arduino-cli/issues/753)
30+
- Use `arduino-cli` version `0.29.0` as the backend
31+
- Test runner detects console width if possible, allowing variable width from 80-132 chars
2532

2633
### Deprecated
2734

@@ -33,6 +40,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
3340
- Apply "rule of three" to Client copy constructor and copy assignment operator
3441
- Run Windows tests on Windows not Ubuntu
3542
- Properly report error in building shared library
43+
- A missing `examples` directory no longer causes a crash in `cpp_library.rb`
44+
- Referring to an undefined platform no longer causes a crash; it's now a helpful error message
45+
- A copy/paste error that prevented compiler warning flags from being supplied has been fixed, via jgfoster
46+
- RSpec was not communicating compile errors from unit test executables that failed to build. Now it does, via jgfoster
47+
- Windows paths now avoid picking up backslashes, for proper equality comparisons
48+
- Libraries are now considered installed if their entry is a symlink (for which `exist?` would return `false`)
3649

3750
### Security
3851

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ArduinoCI uses a very standard GitHub workflow.
99
* If you are submitting code, use `master` as the base branch
1010
* If you are submitting broken unit tests (illustrating a bug that should be fixed), use `tdd` as the base branch.
1111

12-
Pull requests will trigger a Travis CI job. The following two commands will be expected to pass (so you may want to run them locally before opening the pull request):
12+
Pull requests will trigger a CI job. The following two commands will be expected to pass (so you may want to run them locally before opening the pull request):
1313

1414
* `bundle exec rubocop -D .` - code style tests
1515
* `bundle exec rspec` - functional tests

Gemfile

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
66
gemspec
77

88
gem "bundler", "> 1.15", require: false, group: :test
9+
gem "irb", "~> 1.3.5", require: false
910
gem "keepachangelog_manager", "~> 0.0.2", require: false, group: :test
1011
gem "rspec", "~> 3.0", require: false, group: :test
1112
gem 'rubocop', '~>1.5.0', require: false, group: :test

README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@
55
[![Gitter](https://badges.gitter.im/Arduino-CI/arduino_ci.svg)](https://gitter.im/Arduino-CI/arduino_ci?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
66
[![GitHub Marketplace](https://img.shields.io/badge/Get_it-on_Marketplace-informational.svg)](https://github.com/marketplace/actions/arduino_ci)
77

8-
Arduino CI was created to enable better collaboration among Arduino library maintainers and contributors, by enabling automated code checks to be performed as part of a pull request process.
8+
Arduino CI tests [Arduino libraries](https://arduino.github.io/arduino-cli/library-specification/); it was created to enable better collaboration among Arduino library maintainers and contributors, by enabling automated code checks to be performed as part of a pull request process.
99

1010
* enables running unit tests against the library **without hardware present**
1111
* provides a system of mocks that allow fine-grained control over the hardware inputs, including the system's clock
1212
* verifies compilation of any example sketches included in the library
1313
* can test a wide range of arduino boards with different hardware options available
14-
* compares entries in `library.properties` to the contents of the library and reports mismatches
1514
* can be run both locally and as part of CI (GitHub Actions, TravisCI, Appveyor, etc.)
1615
* runs on multiple platforms -- any platform that supports the Arduino IDE
1716
* provides detailed analysis of segfaults in compilers that support such debugging features

SampleProjects/TestSomething/Gemfile

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
source 'https://rubygems.org'
22
gem 'arduino_ci', path: '../../'
3+
gem "irb", "~> 1.3.5", require: false

0 commit comments

Comments
 (0)