mirror of
https://github.com/ClementTsang/bottom.git
synced 2025-07-26 23:24:20 +02:00
Merge pull request #720 from ClementTsang/ci_shortening
Cleaned up and updated the primary GitHub CI workflow. Also fixes a bug caught during this check.
This commit is contained in:
commit
c44e860af8
2
.github/workflows/audit.yml
vendored
2
.github/workflows/audit.yml
vendored
@ -11,7 +11,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- uses: Swatinem/rust-cache@842ef286fff290e445b90b4002cc9807c3669641 # 1.3.0
|
- uses: Swatinem/rust-cache@cb2cf0cc7c5198d3364b9630e2c3d457f160790c # 1.4.0
|
||||||
|
|
||||||
- name: Install toolchain
|
- name: Install toolchain
|
||||||
uses: actions-rs/toolchain@88dc2356392166efad76775c878094f4e83ff746 # https://github.com/actions-rs/toolchain/commit/88dc2356392166efad76775c878094f4e83ff746
|
uses: actions-rs/toolchain@88dc2356392166efad76775c878094f4e83ff746 # https://github.com/actions-rs/toolchain/commit/88dc2356392166efad76775c878094f4e83ff746
|
||||||
|
241
.github/workflows/ci.yml
vendored
241
.github/workflows/ci.yml
vendored
@ -3,6 +3,11 @@
|
|||||||
# CI pipeline based on:
|
# CI pipeline based on:
|
||||||
# - https://github.com/heim-rs/heim/blob/master/.github/workflows/ci.yml
|
# - https://github.com/heim-rs/heim/blob/master/.github/workflows/ci.yml
|
||||||
# - https://github.com/BurntSushi/ripgrep/blob/master/.github/workflows/ci.yml
|
# - https://github.com/BurntSushi/ripgrep/blob/master/.github/workflows/ci.yml
|
||||||
|
#
|
||||||
|
# CI pipeline should do:
|
||||||
|
# - cargo fmt on supported platforms
|
||||||
|
# - cargo test on supported platforms, cargo check on unsupported
|
||||||
|
# - cargo clippy after (apparently faster) on supported platforms
|
||||||
|
|
||||||
name: ci
|
name: ci
|
||||||
|
|
||||||
@ -16,6 +21,7 @@ on:
|
|||||||
env:
|
env:
|
||||||
CARGO_INCREMENTAL: 0
|
CARGO_INCREMENTAL: 0
|
||||||
CARGO_PROFILE_DEV_DEBUG: 0
|
CARGO_PROFILE_DEV_DEBUG: 0
|
||||||
|
CARGO_HUSKY_DONT_INSTALL_HOOKS: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
rustfmt:
|
rustfmt:
|
||||||
@ -28,13 +34,14 @@ jobs:
|
|||||||
- macOS-latest
|
- macOS-latest
|
||||||
- windows-2019
|
- windows-2019
|
||||||
steps:
|
steps:
|
||||||
- id: skip_check
|
- name: Check if this action should be skipped
|
||||||
|
id: skip_check
|
||||||
uses: fkirc/skip-duplicate-actions@38c3738dcac87b41e2b7038775457756c793566e # https://github.com/fkirc/skip-duplicate-actions/commit/38c3738dcac87b41e2b7038775457756c793566e
|
uses: fkirc/skip-duplicate-actions@38c3738dcac87b41e2b7038775457756c793566e # https://github.com/fkirc/skip-duplicate-actions/commit/38c3738dcac87b41e2b7038775457756c793566e
|
||||||
with:
|
with:
|
||||||
concurrent_skipping: "same_content_newer"
|
concurrent_skipping: "same_content_newer"
|
||||||
skip_after_successful_duplicate: "true"
|
skip_after_successful_duplicate: "true"
|
||||||
paths: '[".cargo/**", ".github/workflows/ci.yml", "sample_configs/**", "src/**", "tests/**", "build.rs", "Cargo.lock", "Cargo.toml", "clippy.toml", "rustfmt.toml"]'
|
paths: '[".cargo/**", ".github/workflows/ci.yml", "sample_configs/**", "src/**", "tests/**", "build.rs", "Cargo.lock", "Cargo.toml", "clippy.toml", "rustfmt.toml"]'
|
||||||
do_not_skip: '["workflow_dispatch"]'
|
do_not_skip: '["workflow_dispatch", "push"]'
|
||||||
|
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
|
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
|
||||||
@ -47,50 +54,87 @@ jobs:
|
|||||||
override: true
|
override: true
|
||||||
components: rustfmt
|
components: rustfmt
|
||||||
|
|
||||||
- uses: Swatinem/rust-cache@842ef286fff290e445b90b4002cc9807c3669641 # 1.3.0
|
- uses: Swatinem/rust-cache@cb2cf0cc7c5198d3364b9630e2c3d457f160790c # 1.4.0
|
||||||
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
|
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
|
||||||
|
|
||||||
- run: cargo fmt --all -- --check
|
- run: cargo fmt --all -- --check
|
||||||
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
|
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
|
||||||
|
|
||||||
clippy:
|
# Runs tests + clippy on the main supported platforms.
|
||||||
runs-on: ${{ matrix.os }}
|
supported:
|
||||||
|
needs: [rustfmt]
|
||||||
|
runs-on: ${{ matrix.triple.os }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os:
|
triple:
|
||||||
- ubuntu-latest
|
- {
|
||||||
- macOS-latest
|
os: "ubuntu-latest",
|
||||||
- windows-2019
|
target: "x86_64-unknown-linux-gnu",
|
||||||
|
cross: false,
|
||||||
|
}
|
||||||
|
- {
|
||||||
|
os: "ubuntu-latest",
|
||||||
|
target: "armv7-unknown-linux-gnueabihf",
|
||||||
|
cross: true,
|
||||||
|
}
|
||||||
|
- { os: "macOS-latest", target: "x86_64-apple-darwin", cross: false }
|
||||||
|
- {
|
||||||
|
os: "windows-2019",
|
||||||
|
target: "x86_64-pc-windows-msvc",
|
||||||
|
cross: false,
|
||||||
|
}
|
||||||
|
features: [
|
||||||
|
"--all-features",
|
||||||
|
# "--features battery",
|
||||||
|
# "--features gpu", # Think it's fine to skip this specific test.
|
||||||
|
"--no-default-features",
|
||||||
|
]
|
||||||
steps:
|
steps:
|
||||||
- id: skip_check
|
- name: Check if this action should be skipped
|
||||||
|
id: skip_check
|
||||||
uses: fkirc/skip-duplicate-actions@38c3738dcac87b41e2b7038775457756c793566e # https://github.com/fkirc/skip-duplicate-actions/commit/38c3738dcac87b41e2b7038775457756c793566e
|
uses: fkirc/skip-duplicate-actions@38c3738dcac87b41e2b7038775457756c793566e # https://github.com/fkirc/skip-duplicate-actions/commit/38c3738dcac87b41e2b7038775457756c793566e
|
||||||
with:
|
with:
|
||||||
concurrent_skipping: "same_content_newer"
|
concurrent_skipping: "same_content_newer"
|
||||||
skip_after_successful_duplicate: "true"
|
skip_after_successful_duplicate: "true"
|
||||||
paths: '[".cargo/**", ".github/workflows/ci.yml", "sample_configs/**", "src/**", "tests/**", "build.rs", "Cargo.lock", "Cargo.toml", "clippy.toml", "rustfmt.toml"]'
|
paths: '[".cargo/**", ".github/workflows/ci.yml", "sample_configs/**", "src/**", "tests/**", "build.rs", "Cargo.lock", "Cargo.toml", "clippy.toml", "rustfmt.toml"]'
|
||||||
do_not_skip: '["workflow_dispatch"]'
|
do_not_skip: '["workflow_dispatch", "push"]'
|
||||||
|
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
|
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
|
||||||
|
|
||||||
- uses: actions-rs/toolchain@88dc2356392166efad76775c878094f4e83ff746 # https://github.com/actions-rs/toolchain/commit/88dc2356392166efad76775c878094f4e83ff746
|
- name: Setup Rust toolchain
|
||||||
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
|
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
|
||||||
|
uses: actions-rs/toolchain@88dc2356392166efad76775c878094f4e83ff746 # https://github.com/actions-rs/toolchain/commit/88dc2356392166efad76775c878094f4e83ff746
|
||||||
with:
|
with:
|
||||||
profile: minimal
|
profile: minimal
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
override: true
|
override: true
|
||||||
components: clippy
|
components: clippy
|
||||||
|
|
||||||
- uses: Swatinem/rust-cache@842ef286fff290e445b90b4002cc9807c3669641 # 1.3.0
|
- name: Enable Rust cache
|
||||||
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
|
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
|
||||||
|
uses: Swatinem/rust-cache@cb2cf0cc7c5198d3364b9630e2c3d457f160790c # 1.4.0
|
||||||
|
|
||||||
- run: cargo clippy --all-targets --workspace -- -D warnings
|
- name: Build tests
|
||||||
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
|
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
|
||||||
|
run: cargo test --no-run --locked ${{ matrix.features }}
|
||||||
|
env:
|
||||||
|
RUST_BACKTRACE: full
|
||||||
|
|
||||||
# Run cargo --check on all platforms
|
- name: Run tests
|
||||||
check:
|
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
|
||||||
needs: [rustfmt, clippy]
|
run: cargo test --no-fail-fast ${{ matrix.features }} -- --nocapture --quiet
|
||||||
|
env:
|
||||||
|
RUST_BACKTRACE: full
|
||||||
|
|
||||||
|
- name: Run clippy
|
||||||
|
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
|
||||||
|
run: cargo clippy ${{ matrix.features }} --workspace -- -D warnings
|
||||||
|
|
||||||
|
# Run cargo check on all other platforms
|
||||||
|
other_check:
|
||||||
|
needs: [rustfmt]
|
||||||
runs-on: ${{ matrix.triple.os }}
|
runs-on: ${{ matrix.triple.os }}
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
strategy:
|
strategy:
|
||||||
@ -98,12 +142,6 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
triple:
|
triple:
|
||||||
# x86 or x64
|
# x86 or x64
|
||||||
- {
|
|
||||||
os: "ubuntu-latest",
|
|
||||||
target: "x86_64-unknown-linux-gnu",
|
|
||||||
cross: false,
|
|
||||||
rust: stable,
|
|
||||||
}
|
|
||||||
- {
|
- {
|
||||||
os: "ubuntu-latest",
|
os: "ubuntu-latest",
|
||||||
target: "i686-unknown-linux-gnu",
|
target: "i686-unknown-linux-gnu",
|
||||||
@ -122,18 +160,6 @@ jobs:
|
|||||||
cross: true,
|
cross: true,
|
||||||
rust: stable,
|
rust: stable,
|
||||||
}
|
}
|
||||||
- {
|
|
||||||
os: "macOS-latest",
|
|
||||||
target: "x86_64-apple-darwin",
|
|
||||||
cross: false,
|
|
||||||
rust: stable,
|
|
||||||
}
|
|
||||||
- {
|
|
||||||
os: "windows-2019",
|
|
||||||
target: "x86_64-pc-windows-msvc",
|
|
||||||
cross: false,
|
|
||||||
rust: stable,
|
|
||||||
}
|
|
||||||
- {
|
- {
|
||||||
os: "windows-2019",
|
os: "windows-2019",
|
||||||
target: "i686-pc-windows-msvc",
|
target: "i686-pc-windows-msvc",
|
||||||
@ -167,14 +193,6 @@ jobs:
|
|||||||
rust: beta,
|
rust: beta,
|
||||||
}
|
}
|
||||||
|
|
||||||
# aarch64
|
|
||||||
- {
|
|
||||||
os: "ubuntu-latest",
|
|
||||||
target: "aarch64-unknown-linux-gnu",
|
|
||||||
cross: true,
|
|
||||||
rust: stable,
|
|
||||||
}
|
|
||||||
|
|
||||||
# armv7
|
# armv7
|
||||||
- {
|
- {
|
||||||
os: "ubuntu-latest",
|
os: "ubuntu-latest",
|
||||||
@ -216,13 +234,14 @@ jobs:
|
|||||||
}
|
}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- id: skip_check
|
- name: Check if this action should be skipped
|
||||||
|
id: skip_check
|
||||||
uses: fkirc/skip-duplicate-actions@38c3738dcac87b41e2b7038775457756c793566e # https://github.com/fkirc/skip-duplicate-actions/commit/38c3738dcac87b41e2b7038775457756c793566e
|
uses: fkirc/skip-duplicate-actions@38c3738dcac87b41e2b7038775457756c793566e # https://github.com/fkirc/skip-duplicate-actions/commit/38c3738dcac87b41e2b7038775457756c793566e
|
||||||
with:
|
with:
|
||||||
concurrent_skipping: "same_content_newer"
|
concurrent_skipping: "same_content_newer"
|
||||||
skip_after_successful_duplicate: "true"
|
skip_after_successful_duplicate: "true"
|
||||||
paths: '[".cargo/**", ".github/workflows/ci.yml", "sample_configs/**", "src/**", "tests/**", "build.rs", "Cargo.lock", "Cargo.toml", "clippy.toml", "rustfmt.toml"]'
|
paths: '[".cargo/**", ".github/workflows/ci.yml", "sample_configs/**", "src/**", "tests/**", "build.rs", "Cargo.lock", "Cargo.toml", "clippy.toml", "rustfmt.toml"]'
|
||||||
do_not_skip: '["workflow_dispatch"]'
|
do_not_skip: '["workflow_dispatch", "push"]'
|
||||||
|
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
|
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
|
||||||
@ -236,7 +255,7 @@ jobs:
|
|||||||
override: true
|
override: true
|
||||||
target: ${{ matrix.triple.target }}
|
target: ${{ matrix.triple.target }}
|
||||||
|
|
||||||
- uses: Swatinem/rust-cache@842ef286fff290e445b90b4002cc9807c3669641 # 1.3.0
|
- uses: Swatinem/rust-cache@cb2cf0cc7c5198d3364b9630e2c3d457f160790c # 1.4.0
|
||||||
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
|
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
|
||||||
with:
|
with:
|
||||||
key: ${{ matrix.triple.target }}
|
key: ${{ matrix.triple.target }}
|
||||||
@ -248,133 +267,3 @@ jobs:
|
|||||||
command: check
|
command: check
|
||||||
args: --all-targets --verbose --target=${{ matrix.triple.target }} --features "battery" --locked
|
args: --all-targets --verbose --target=${{ matrix.triple.target }} --features "battery" --locked
|
||||||
use-cross: ${{ matrix.triple.cross }}
|
use-cross: ${{ matrix.triple.cross }}
|
||||||
|
|
||||||
# Check without the battery feature enabled on x86-64 for supported operating systems
|
|
||||||
check-without-battery:
|
|
||||||
needs: [rustfmt, clippy]
|
|
||||||
runs-on: ${{ matrix.triple.os }}
|
|
||||||
continue-on-error: true
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
triple:
|
|
||||||
- {
|
|
||||||
os: "ubuntu-latest",
|
|
||||||
target: "x86_64-unknown-linux-gnu",
|
|
||||||
cross: false,
|
|
||||||
rust: stable,
|
|
||||||
}
|
|
||||||
- {
|
|
||||||
os: "macOS-latest",
|
|
||||||
target: "x86_64-apple-darwin",
|
|
||||||
cross: false,
|
|
||||||
rust: stable,
|
|
||||||
}
|
|
||||||
- {
|
|
||||||
os: "windows-2019",
|
|
||||||
target: "x86_64-pc-windows-msvc",
|
|
||||||
cross: false,
|
|
||||||
rust: stable,
|
|
||||||
}
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- id: skip_check
|
|
||||||
uses: fkirc/skip-duplicate-actions@38c3738dcac87b41e2b7038775457756c793566e # https://github.com/fkirc/skip-duplicate-actions/commit/38c3738dcac87b41e2b7038775457756c793566e
|
|
||||||
with:
|
|
||||||
concurrent_skipping: "same_content_newer"
|
|
||||||
skip_after_successful_duplicate: "true"
|
|
||||||
paths: '[".cargo/**", ".github/workflows/ci.yml", "sample_configs/**", "src/**", "tests/**", "build.rs", "Cargo.lock", "Cargo.toml", "clippy.toml", "rustfmt.toml"]'
|
|
||||||
do_not_skip: '["workflow_dispatch"]'
|
|
||||||
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
|
|
||||||
|
|
||||||
- name: Install toolchain
|
|
||||||
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
|
|
||||||
uses: actions-rs/toolchain@88dc2356392166efad76775c878094f4e83ff746 # https://github.com/actions-rs/toolchain/commit/88dc2356392166efad76775c878094f4e83ff746
|
|
||||||
with:
|
|
||||||
profile: minimal
|
|
||||||
toolchain: ${{ matrix.triple.rust }}
|
|
||||||
override: true
|
|
||||||
target: ${{ matrix.triple.target }}
|
|
||||||
|
|
||||||
- uses: Swatinem/rust-cache@842ef286fff290e445b90b4002cc9807c3669641 # 1.3.0
|
|
||||||
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
|
|
||||||
with:
|
|
||||||
key: ${{ matrix.triple.target }}
|
|
||||||
|
|
||||||
- name: Check without battery feature on the main 3
|
|
||||||
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: check
|
|
||||||
args: --all-targets --verbose --target=${{ matrix.triple.target }} --no-default-features --locked
|
|
||||||
use-cross: ${{ matrix.triple.cross }}
|
|
||||||
|
|
||||||
# Run tests x86-64 for supported operating systems
|
|
||||||
test:
|
|
||||||
needs: [rustfmt, clippy]
|
|
||||||
runs-on: ${{ matrix.triple.os }}
|
|
||||||
continue-on-error: true
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
triple:
|
|
||||||
- {
|
|
||||||
os: "ubuntu-latest",
|
|
||||||
target: "x86_64-unknown-linux-gnu",
|
|
||||||
cross: false,
|
|
||||||
rust: stable,
|
|
||||||
}
|
|
||||||
- {
|
|
||||||
os: "macOS-latest",
|
|
||||||
target: "x86_64-apple-darwin",
|
|
||||||
cross: false,
|
|
||||||
rust: stable,
|
|
||||||
}
|
|
||||||
- {
|
|
||||||
os: "windows-2019",
|
|
||||||
target: "x86_64-pc-windows-msvc",
|
|
||||||
cross: false,
|
|
||||||
rust: stable,
|
|
||||||
}
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- id: skip_check
|
|
||||||
uses: fkirc/skip-duplicate-actions@38c3738dcac87b41e2b7038775457756c793566e # https://github.com/fkirc/skip-duplicate-actions/commit/38c3738dcac87b41e2b7038775457756c793566e
|
|
||||||
with:
|
|
||||||
concurrent_skipping: "same_content_newer"
|
|
||||||
skip_after_successful_duplicate: "true"
|
|
||||||
paths: '[".cargo/**", ".github/workflows/ci.yml", "sample_configs/**", "src/**", "tests/**", "build.rs", "Cargo.lock", "Cargo.toml", "clippy.toml", "rustfmt.toml"]'
|
|
||||||
do_not_skip: '["workflow_dispatch"]'
|
|
||||||
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
|
|
||||||
|
|
||||||
- name: Install toolchain
|
|
||||||
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
|
|
||||||
uses: actions-rs/toolchain@88dc2356392166efad76775c878094f4e83ff746 # https://github.com/actions-rs/toolchain/commit/88dc2356392166efad76775c878094f4e83ff746
|
|
||||||
with:
|
|
||||||
profile: minimal
|
|
||||||
toolchain: ${{ matrix.triple.rust }}
|
|
||||||
override: true
|
|
||||||
target: ${{ matrix.triple.target }}
|
|
||||||
|
|
||||||
- uses: Swatinem/rust-cache@842ef286fff290e445b90b4002cc9807c3669641 # 1.3.0
|
|
||||||
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
|
|
||||||
with:
|
|
||||||
key: ${{ matrix.triple.target }}
|
|
||||||
|
|
||||||
- name: Build tests
|
|
||||||
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
|
|
||||||
run: cargo test --no-run --locked
|
|
||||||
env:
|
|
||||||
CARGO_HUSKY_DONT_INSTALL_HOOKS: true
|
|
||||||
RUST_BACKTRACE: full
|
|
||||||
|
|
||||||
- name: Run tests
|
|
||||||
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
|
|
||||||
run: cargo test --no-fail-fast -- --nocapture --quiet
|
|
||||||
env:
|
|
||||||
CARGO_HUSKY_DONT_INSTALL_HOOKS: true
|
|
||||||
RUST_BACKTRACE: full
|
|
||||||
|
5
.github/workflows/coverage.yml
vendored
5
.github/workflows/coverage.yml
vendored
@ -23,7 +23,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
concurrent_skipping: "same_content_newer"
|
concurrent_skipping: "same_content_newer"
|
||||||
skip_after_successful_duplicate: "false"
|
skip_after_successful_duplicate: "false"
|
||||||
do_not_skip: '["workflow_dispatch"]'
|
do_not_skip: '["workflow_dispatch", "push"]'
|
||||||
|
|
||||||
coverage:
|
coverage:
|
||||||
needs: pre_job
|
needs: pre_job
|
||||||
@ -37,9 +37,8 @@ jobs:
|
|||||||
profile: minimal
|
profile: minimal
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
override: true
|
override: true
|
||||||
components: rustfmt
|
|
||||||
|
|
||||||
- uses: Swatinem/rust-cache@842ef286fff290e445b90b4002cc9807c3669641 # 1.3.0
|
- uses: Swatinem/rust-cache@cb2cf0cc7c5198d3364b9630e2c3d457f160790c # 1.4.0
|
||||||
with:
|
with:
|
||||||
key: ${{ matrix.triple.target }}
|
key: ${{ matrix.triple.target }}
|
||||||
|
|
||||||
|
6
.github/workflows/deployment.yml
vendored
6
.github/workflows/deployment.yml
vendored
@ -141,7 +141,7 @@ jobs:
|
|||||||
override: true
|
override: true
|
||||||
target: ${{ matrix.triple.target }}
|
target: ${{ matrix.triple.target }}
|
||||||
|
|
||||||
- uses: Swatinem/rust-cache@842ef286fff290e445b90b4002cc9807c3669641 # 1.3.0
|
- uses: Swatinem/rust-cache@cb2cf0cc7c5198d3364b9630e2c3d457f160790c # 1.4.0
|
||||||
with:
|
with:
|
||||||
key: ${{ matrix.triple.target }}
|
key: ${{ matrix.triple.target }}
|
||||||
|
|
||||||
@ -249,7 +249,7 @@ jobs:
|
|||||||
override: true
|
override: true
|
||||||
target: x86_64-pc-windows-msvc
|
target: x86_64-pc-windows-msvc
|
||||||
|
|
||||||
- uses: Swatinem/rust-cache@842ef286fff290e445b90b4002cc9807c3669641 # 1.3.0
|
- uses: Swatinem/rust-cache@cb2cf0cc7c5198d3364b9630e2c3d457f160790c # 1.4.0
|
||||||
with:
|
with:
|
||||||
key: x86_64-pc-windows-msvc-msi
|
key: x86_64-pc-windows-msvc-msi
|
||||||
|
|
||||||
@ -309,7 +309,7 @@ jobs:
|
|||||||
override: true
|
override: true
|
||||||
target: x86_64-unknown-linux-gnu
|
target: x86_64-unknown-linux-gnu
|
||||||
|
|
||||||
- uses: Swatinem/rust-cache@842ef286fff290e445b90b4002cc9807c3669641 # 1.3.0
|
- uses: Swatinem/rust-cache@cb2cf0cc7c5198d3364b9630e2c3d457f160790c # 1.4.0
|
||||||
with:
|
with:
|
||||||
key: x86_64-unknown-linux-gnu-deb
|
key: x86_64-unknown-linux-gnu-deb
|
||||||
|
|
||||||
|
6
.github/workflows/nightly.yml
vendored
6
.github/workflows/nightly.yml
vendored
@ -137,7 +137,7 @@ jobs:
|
|||||||
override: true
|
override: true
|
||||||
target: ${{ matrix.triple.target }}
|
target: ${{ matrix.triple.target }}
|
||||||
|
|
||||||
- uses: Swatinem/rust-cache@842ef286fff290e445b90b4002cc9807c3669641 # 1.3.0
|
- uses: Swatinem/rust-cache@cb2cf0cc7c5198d3364b9630e2c3d457f160790c # 1.4.0
|
||||||
with:
|
with:
|
||||||
key: ${{ matrix.triple.target }}
|
key: ${{ matrix.triple.target }}
|
||||||
|
|
||||||
@ -243,7 +243,7 @@ jobs:
|
|||||||
override: true
|
override: true
|
||||||
target: x86_64-pc-windows-msvc
|
target: x86_64-pc-windows-msvc
|
||||||
|
|
||||||
- uses: Swatinem/rust-cache@842ef286fff290e445b90b4002cc9807c3669641 # 1.3.0
|
- uses: Swatinem/rust-cache@cb2cf0cc7c5198d3364b9630e2c3d457f160790c # 1.4.0
|
||||||
with:
|
with:
|
||||||
key: x86_64-pc-windows-msvc-msi
|
key: x86_64-pc-windows-msvc-msi
|
||||||
|
|
||||||
@ -303,7 +303,7 @@ jobs:
|
|||||||
override: true
|
override: true
|
||||||
target: x86_64-unknown-linux-gnu
|
target: x86_64-unknown-linux-gnu
|
||||||
|
|
||||||
- uses: Swatinem/rust-cache@842ef286fff290e445b90b4002cc9807c3669641 # 1.3.0
|
- uses: Swatinem/rust-cache@cb2cf0cc7c5198d3364b9630e2c3d457f160790c # 1.4.0
|
||||||
with:
|
with:
|
||||||
key: x86_64-unknown-linux-gnu-deb
|
key: x86_64-unknown-linux-gnu-deb
|
||||||
|
|
||||||
|
@ -392,7 +392,7 @@ use CPU (3) as the default instead.
|
|||||||
.arg(use_old_network_legend)
|
.arg(use_old_network_legend)
|
||||||
.arg(whole_word);
|
.arg(whole_word);
|
||||||
|
|
||||||
let app = if cfg!(feature = "battery") {
|
if cfg!(feature = "battery") {
|
||||||
let battery = Arg::new("battery")
|
let battery = Arg::new("battery")
|
||||||
.long("battery")
|
.long("battery")
|
||||||
.help("Shows the battery widget.")
|
.help("Shows the battery widget.")
|
||||||
@ -401,8 +401,6 @@ use CPU (3) as the default instead.
|
|||||||
);
|
);
|
||||||
app.arg(battery)
|
app.arg(battery)
|
||||||
} else {
|
} else {
|
||||||
app
|
|
||||||
};
|
|
||||||
|
|
||||||
app
|
app
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
@ -916,6 +916,7 @@ fn get_hide_table_gap(matches: &clap::ArgMatches, config: &Config) -> bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn get_use_battery(matches: &clap::ArgMatches, config: &Config) -> bool {
|
fn get_use_battery(matches: &clap::ArgMatches, config: &Config) -> bool {
|
||||||
|
if cfg!(feature = "battery") {
|
||||||
if matches.is_present("battery") {
|
if matches.is_present("battery") {
|
||||||
return true;
|
return true;
|
||||||
} else if let Some(flags) = &config.flags {
|
} else if let Some(flags) = &config.flags {
|
||||||
@ -923,6 +924,7 @@ fn get_use_battery(matches: &clap::ArgMatches, config: &Config) -> bool {
|
|||||||
return battery;
|
return battery;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user