- the build and test steps won't run until/unless Dependency and MSRV checks pass
- code coverage won't run until/unless the build steps all pass
## [why]
This helps make more efficient use of CI resources and can help more easily visualize
build issues from the resultant GHA dashboard flow diagram.
## [why]
`cspell` in CI started mysteriously failing mid-2021. Tracking down the
error took some time as it was not obvious from `cspell` feedback where
the issue lay. Ultimately, it was discovered that `cspell` had deprecated
use on NodeJS versions < v12 for `cspell` v5+.
`cspell` is now pinned to v4.2.8, with a maintenance note to allow an
upgrade to the `cspell` version when a version of NodeJS >= v12 is being
used in the CI.
An issue requesting better tool feedback for similar situations was also
opened on the `cspell` repo.[*]
[*]: [🙏🏻 Add warning (or error) when used on deprecated/outdated JS platform versions](https://github.com/streetsidesoftware/cspell/issues/1984)
# [why]
The tool cache is currently failing and seems to be getting further behind current
versions. The [actions-rs/install#12] issue addresses this but seems to be
languishing without any proposed solution.
[ref]: <actions-rs/install#12>
- fixes conversion of new `cargo clippy` output style to GHA annotations
## [why]
`cargo clippy` output formatting changed, using relative instead of absolute paths.
* Make clippy workspace selection more finegrained
* fixup! Make clippy workspace selection more finegrained
* fixup! Make clippy workspace selection more finegrained
* fixup! Make clippy workspace selection more finegrained
* fixup! Make clippy workspace selection more finegrained
* fixup! Make clippy workspace selection more finegrained
* add "clippy.toml" in order to set MSRV for clippy linting
this works only if clippy is invoked with "+nightly"
* add "--target" to clippy in order to also lint tests
Fails trom time to time with:
```
info: installing component 'rustc'
memory allocation of 16777216 bytes failed
Error: The process 'C:\Rust\.cargo\bin\rustup.exe' failed with exit code 3221226505
```
on Build (windows-latest, i686-pc-windows-gnu, feat_os_windows)
Before this change we never ran tests on uucore itself
meaning that is was not possible to test
functions of the shared core, only their usage
in the different binaries
This change adds running uucore to our ci, which will increase coverage for the few doctests that exist
and is extracted from #1988 where first tests for uucore will be introduced
- `ignore` and `excl-br-line` options used to target code coverage analysis
- direct/repeated (non-DRY) CLI options are used by necessity (`grcov` is ignoring command line env variables)
* CI: Only run rustfmt in one environment
- This displays clippy warnings even when rustfmt fails.
- This avoids displaying 3 copies of the same rustfmt warning as Github
annotations.
- Avoids duplicated work.
* CI: Suppress warnings when building for the oldest toolchain version
We had cases of warnings emitted due to `rustc` bugs that were fixed
in non-obsolete versions.
* factor: Remove a workaround for warnings on obsolete rustc
## [why]
Compiler and clippy warnings will change over time. To avoid build failures due to some
updated allow/warn categories for more future rust versions, the tests using the
toolchain utilities are converted to a form which will always "pass" but will push any
errors/warnings to the GHA UI as annotations.
Additional build-breaking tests utilizing more stable tools (or local scripts) can be
added at a later date if/when desired.
This should prevent CI failures for already known-working builds.
## [why]
Code coverage must currently use some unstable features in nightly rust builds. The
nightly builds are, by definition, unstable and subject to frequent breaking changes.
To prevent CI build breakage, the toolchain is pinned to a specific known working set.
Note: (maint!) this will require periodic review until code coverage is more fully
implemented/integrated into Rust and moved into the stable channel.
- refs: <https://github.com/mozilla/grcov/issues/427>, <https://github.com/newsboat/newsboat/issues/916>