mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-11-23 20:22:51 +01:00
Merge #706
706: ci/tuneverboselevel r=korken89 a=AfoHT - xtask: Change default loglevel - xtask: Fix cargo fmt logmsg - ci: xtask default verbosity Co-authored-by: Henrik Tjäder <henrik@tjaders.com>
This commit is contained in:
commit
3a0e2ac924
2 changed files with 10 additions and 11 deletions
12
.github/workflows/build.yml
vendored
12
.github/workflows/build.yml
vendored
|
@ -68,7 +68,7 @@ jobs:
|
||||||
- name: Cache Dependencies
|
- name: Cache Dependencies
|
||||||
uses: Swatinem/rust-cache@v2
|
uses: Swatinem/rust-cache@v2
|
||||||
|
|
||||||
- run: cargo xtask --verbose --backend ${{ matrix.backend }} check
|
- run: cargo xtask --backend ${{ matrix.backend }} check
|
||||||
|
|
||||||
# Clippy
|
# Clippy
|
||||||
clippy:
|
clippy:
|
||||||
|
@ -107,7 +107,7 @@ jobs:
|
||||||
- name: Cache Dependencies
|
- name: Cache Dependencies
|
||||||
uses: Swatinem/rust-cache@v2
|
uses: Swatinem/rust-cache@v2
|
||||||
|
|
||||||
- run: cargo xtask --verbose --backend ${{ matrix.backend }} clippy
|
- run: cargo xtask --backend ${{ matrix.backend }} clippy
|
||||||
|
|
||||||
# Verify all examples, checks
|
# Verify all examples, checks
|
||||||
checkexamples:
|
checkexamples:
|
||||||
|
@ -142,11 +142,11 @@ jobs:
|
||||||
|
|
||||||
- name: Check the examples
|
- name: Check the examples
|
||||||
if: ${{ matrix.backend == 'thumbv8-base' }}
|
if: ${{ matrix.backend == 'thumbv8-base' }}
|
||||||
run: cargo xtask --verbose --backend ${{ matrix.backend }} --exampleexclude pool example-check
|
run: cargo xtask --backend ${{ matrix.backend }} --exampleexclude pool example-check
|
||||||
|
|
||||||
- name: Check the examples
|
- name: Check the examples
|
||||||
if: ${{ matrix.backend != 'thumbv8-base' }}
|
if: ${{ matrix.backend != 'thumbv8-base' }}
|
||||||
run: cargo xtask --verbose --backend ${{ matrix.backend }} example-check
|
run: cargo xtask --backend ${{ matrix.backend }} example-check
|
||||||
|
|
||||||
# Verify the example output with run-pass tests
|
# Verify the example output with run-pass tests
|
||||||
testexamples:
|
testexamples:
|
||||||
|
@ -195,7 +195,7 @@ jobs:
|
||||||
run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs
|
run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs
|
||||||
|
|
||||||
- name: Run-pass tests
|
- name: Run-pass tests
|
||||||
run: cargo xtask --verbose --backend ${{ matrix.backend }} qemu
|
run: cargo xtask --backend ${{ matrix.backend }} qemu
|
||||||
|
|
||||||
# Run test suite
|
# Run test suite
|
||||||
tests:
|
tests:
|
||||||
|
@ -235,7 +235,7 @@ jobs:
|
||||||
run: find . -type f -name lib.rs -execdir sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' {} +
|
run: find . -type f -name lib.rs -execdir sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' {} +
|
||||||
|
|
||||||
- name: Run cargo test
|
- name: Run cargo test
|
||||||
run: cargo xtask --verbose --backend ${{ matrix.backend }} test ${{ matrix.package }}
|
run: cargo xtask --backend ${{ matrix.backend }} test ${{ matrix.package }}
|
||||||
|
|
||||||
# Build documentation, check links
|
# Build documentation, check links
|
||||||
docs:
|
docs:
|
||||||
|
|
|
@ -109,9 +109,8 @@ fn main() -> anyhow::Result<()> {
|
||||||
let cli = Cli::parse();
|
let cli = Cli::parse();
|
||||||
|
|
||||||
let env_logger_default_level = match cli.verbose {
|
let env_logger_default_level = match cli.verbose {
|
||||||
0 => Env::default().default_filter_or("error"),
|
0 => Env::default().default_filter_or("info"),
|
||||||
1 => Env::default().default_filter_or("info"),
|
1 => Env::default().default_filter_or("debug"),
|
||||||
2 => Env::default().default_filter_or("debug"),
|
|
||||||
_ => Env::default().default_filter_or("trace"),
|
_ => Env::default().default_filter_or("trace"),
|
||||||
};
|
};
|
||||||
env_logger::Builder::from_env(env_logger_default_level)
|
env_logger::Builder::from_env(env_logger_default_level)
|
||||||
|
@ -188,12 +187,12 @@ fn main() -> anyhow::Result<()> {
|
||||||
|
|
||||||
match cli.command {
|
match cli.command {
|
||||||
Commands::FormatCheck(args) => {
|
Commands::FormatCheck(args) => {
|
||||||
info!("Running cargo fmt: {args:?}");
|
info!("Running cargo fmt --check: {args:?}");
|
||||||
let check_only = true;
|
let check_only = true;
|
||||||
cargo_format(&cargologlevel, &args, check_only)?;
|
cargo_format(&cargologlevel, &args, check_only)?;
|
||||||
}
|
}
|
||||||
Commands::Format(args) => {
|
Commands::Format(args) => {
|
||||||
info!("Running cargo fmt --check: {args:?}");
|
info!("Running cargo fmt: {args:?}");
|
||||||
let check_only = false;
|
let check_only = false;
|
||||||
cargo_format(&cargologlevel, &args, check_only)?;
|
cargo_format(&cargologlevel, &args, check_only)?;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue