Merge branch 'main' of github.com:Cyrix126/gupaxx into dev

This commit is contained in:
mostafaei2002 2024-06-11 23:08:56 +03:30
commit f845fd8533
4 changed files with 99 additions and 3 deletions

34
.github/workflows/audit.yml vendored Normal file
View file

@ -0,0 +1,34 @@
# This runs `cargo audit` on all dependencies (only if Cargo deps changed)
name: Audit
on:
push:
paths:
- '**/Cargo.toml'
- '**/Cargo.lock'
env:
CARGO_TERM_COLOR: always
jobs:
audit:
runs-on: ubuntu-latest
steps:
- name: Cache
uses: actions/cache@v3.2.3
with:
path: |
~/.cargo
target
key: audit
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install dependencies
run: cargo install cargo-audit --locked
- name: Audit
run: cargo audit

View file

@ -44,8 +44,6 @@ jobs:
fi fi
shell: bash shell: bash
- name: Test
run: cargo test --release
- name: Build - name: Build
run: | run: |

64
.github/workflows/rust.yml vendored Normal file
View file

@ -0,0 +1,64 @@
name: Rust
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
fmt:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Format
run: cargo fmt --all --check
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v4
- name: Test
run: cargo test
typo:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Spell Check
uses: crate-ci/typos@master
clippy:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v4
- name: Clippy (fail on warnings)
run: cargo clippy -- -D warnings
check:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v4
- name: Check compilation
run: cargo check --verbose
doc:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v4
- name: Documentation
run: cargo doc --no-deps

View file

@ -175,7 +175,7 @@ impl Xmrig {
ui.horizontal(|ui| { ui.horizontal(|ui| {
ui.add_sized( ui.add_sized(
[text_width, text_edit], [text_width, text_edit],
Label::new(format!("Pause on active [0-255]:")), Label::new("Pause on active [0-255]:".to_string()),
); );
ui.add_sized([width, text_edit], Slider::new(&mut self.pause, 0..=255)) ui.add_sized([width, text_edit], Slider::new(&mut self.pause, 0..=255))
.on_hover_text(format!("{} [{}] seconds.", XMRIG_PAUSE, self.pause)); .on_hover_text(format!("{} [{}] seconds.", XMRIG_PAUSE, self.pause));