Skip to content

Commit 5478d90

Browse files
committed
Replace actions-rs with maintained alternatives. (#595)
Fixes #594
1 parent 270b52a commit 5478d90

File tree

3 files changed

+27
-41
lines changed

3 files changed

+27
-41
lines changed

.github/workflows/build.yml

Lines changed: 24 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ env:
1616
CARGO_TERM_COLOR: always
1717
CARGO_INCREMENTAL: '0'
1818
CARGO_PROFILE_DEV_DEBUG: '0'
19-
RUST_TOOLCHAIN_VERSION: "1.65.0"
19+
RUST_TOOLCHAIN_VERSION: "1.68.2"
2020
RUSTFLAGS: "-D warnings"
2121
RUSTDOCFLAGS: "-D warnings"
2222
RUST_LOG: "info"
@@ -30,22 +30,14 @@ jobs:
3030
RUSTC_BOOTSTRAP: 1
3131
steps:
3232
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
33-
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # renovate: tag=v1.0.7
33+
- uses: dtolnay/rust-toolchain@master
3434
with:
35-
profile: minimal
3635
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
37-
override: true
3836
- uses: Swatinem/rust-cache@359a70e43a0bb8a13953b04a90f76428b4959bb6 # v2.2.0
3937
with:
4038
key: udeps
41-
- uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # renovate: tag=v1.0.3
42-
with:
43-
command: install
44-
args: cargo-udeps --locked
45-
- uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # renovate: tag=v1.0.3
46-
with:
47-
command: udeps
48-
args: --all-targets
39+
- run: cargo install --locked cargo-udeps@0.1.39
40+
- run: cargo udeps --all-targets
4941

5042
run_cargodeny:
5143
name: Run Cargo Deny
@@ -70,63 +62,61 @@ jobs:
7062
runs-on: ubuntu-latest
7163
steps:
7264
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
73-
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # renovate: tag=v1.0.7
65+
- uses: dtolnay/rust-toolchain@master
7466
with:
75-
profile: minimal
7667
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
7768
components: rustfmt
78-
override: true
79-
- uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # renovate: tag=v1.0.3
69+
- uses: Swatinem/rust-cache@359a70e43a0bb8a13953b04a90f76428b4959bb6 # v2.2.0
8070
with:
81-
command: fmt
82-
args: --all -- --check
71+
key: fmt
72+
- run: cargo fmt --all -- --check
8373

8474
run_clippy:
8575
name: Run Clippy
8676
runs-on: ubuntu-latest
8777
steps:
78+
- name: Install host dependencies
79+
run: |
80+
sudo apt-get update
81+
sudo apt-get install protobuf-compiler krb5-user libkrb5-dev libclang-dev liblzma-dev libssl-dev pkg-config
8882
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
89-
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # renovate: tag=v1.0.7
9083
with:
91-
profile: minimal
84+
submodules: recursive
85+
- uses: dtolnay/rust-toolchain@master
86+
with:
9287
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
9388
components: clippy
94-
override: true
9589
- uses: Swatinem/rust-cache@359a70e43a0bb8a13953b04a90f76428b4959bb6 # v2.2.0
9690
with:
9791
key: clippy
9892
- name: Run clippy action to produce annotations
93+
uses: giraffate/clippy-action@13b9d32482f25d29ead141b79e7e04e7900281e0 # v1.0.1
9994
env:
10095
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
101-
uses: actions-rs/clippy-check@b5b5f21f4797c02da247df37026fcd0a5024aa4d # renovate: tag=v1.0.7
10296
if: env.GITHUB_TOKEN != null
10397
with:
104-
args: --all-targets -- -D warnings
105-
token: ${{ secrets.GITHUB_TOKEN }}
98+
clippy_flags: --all-targets -- -D warnings
99+
reporter: 'github-pr-review'
100+
github_token: ${{ secrets.GITHUB_TOKEN }}
106101
- name: Run clippy manually without annotations
107102
env:
108103
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
109104
if: env.GITHUB_TOKEN == null
110-
run: cargo clippy --all-targets -- -D warnings
105+
run: cargo clippy --color never -q --all-targets -- -D warnings
111106

112107
run_rustdoc:
113108
name: Run RustDoc
114109
runs-on: ubuntu-latest
115110
steps:
116111
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
117-
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # renovate: tag=v1.0.7
112+
- uses: dtolnay/rust-toolchain@master
118113
with:
119-
profile: minimal
120114
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
121115
components: rustfmt
122-
override: true
123116
- uses: Swatinem/rust-cache@359a70e43a0bb8a13953b04a90f76428b4959bb6 # v2.2.0
124117
with:
125118
key: doc
126-
- uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # renovate: tag=v1.0.3
127-
with:
128-
command: doc
129-
args: --document-private-items
119+
- run: cargo doc --document-private-items
130120

131121
run_tests:
132122
name: Run Cargo Tests
@@ -138,17 +128,13 @@ jobs:
138128
runs-on: ubuntu-latest
139129
steps:
140130
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
141-
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # renovate: tag=v1.0.7
131+
- uses: dtolnay/rust-toolchain@master
142132
with:
143-
profile: minimal
144133
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
145-
override: true
146134
- uses: Swatinem/rust-cache@359a70e43a0bb8a13953b04a90f76428b4959bb6 # v2.2.0
147135
with:
148136
key: test
149-
- uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # renovate: tag=v1.0.3
150-
with:
151-
command: test
137+
- run: cargo test
152138

153139
tests_passed:
154140
name: All tests passed

.github/workflows/daily_security.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
14-
- uses: actions-rs/audit-check@35b7b53b1e25b55642157ac01b4adceb5b9ebef3 # renovate: tag=v1.2.0
14+
- uses: rustsec/audit-check@dd51754d4e59da7395a4cd9b593f0ff2d61a9b95 # v1.4.1
1515
with:
1616
token: ${{ secrets.GITHUB_TOKEN }}

src/cpu.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ impl FromStr for CpuQuantity {
3232
type Err = Error;
3333

3434
/// Only two formats can be parsed
35-
/// - <usize>m
36-
/// - <f32>
35+
/// - {usize}m
36+
/// - {f32}
3737
/// For the float, only milli-precision is supported.
3838
/// Using more precise values will trigger an error, and using any other
3939
/// unit than 'm' or None will also trigger an error.

0 commit comments

Comments
 (0)