Skip to content

Commit df8161d

Browse files
committed
Update GH actions
1 parent 9b2c537 commit df8161d

File tree

3 files changed

+90
-56
lines changed

3 files changed

+90
-56
lines changed

.github/workflows/ci.yml

Lines changed: 88 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,97 @@
1-
name: ci
1+
name: CI
22
on:
33
push:
44
branches:
55
- master
66
pull_request:
77

8-
# https://stackoverflow.com/questions/57612428/cloning-private-github-repository-within-organisation-in-actions
9-
# I created a token with private repo access in my account that I set in the rust-bfield repo vault
108
jobs:
11-
test:
12-
name: test
13-
runs-on: ${{ matrix.os }}
14-
strategy:
15-
matrix:
16-
build: [pinned, stable]
17-
include:
18-
- build: pinned
19-
os: ubuntu-18.04
20-
rust: 1.40.0
21-
- build: stable
22-
os: ubuntu-18.04
23-
rust: stable
9+
tests:
10+
runs-on: ubuntu-latest
2411
steps:
25-
- uses: actions/checkout@v1
26-
- name: Install Rust
27-
uses: hecrj/setup-rust-action@v1
28-
with:
29-
rust-version: ${{ matrix.rust }}
30-
- name: Build System Info
31-
run: rustc --version
32-
- name: create SSH key
33-
uses: webfactory/ssh-agent@v0.2.0
34-
with:
35-
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
36-
- name: Run tests
37-
env:
38-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39-
run: cargo test
40-
41-
test_with_features:
42-
name: test
43-
runs-on: ${{ matrix.os }}
44-
strategy:
45-
matrix:
46-
build: [pinned, stable]
47-
include:
48-
- build: pinned
49-
os: ubuntu-18.04
50-
rust: 1.40.0
51-
- build: stable
52-
os: ubuntu-18.04
53-
rust: stable
12+
- name: Checkout
13+
uses: actions/checkout@master
14+
15+
- uses: actions-rs/toolchain@v1
16+
with:
17+
profile: minimal
18+
toolchain: 1.40.0
19+
override: true
20+
21+
- name: create SSH key
22+
uses: webfactory/ssh-agent@v0.2.0
23+
with:
24+
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
25+
26+
- name: version info
27+
run: rustc --version; cargo --version;
28+
29+
- name: Run all tests
30+
run: cargo test
31+
32+
tests-prefetching:
33+
runs-on: ubuntu-latest
5434
steps:
55-
- uses: actions/checkout@v1
56-
- name: Install Rust
57-
uses: hecrj/setup-rust-action@v1
58-
with:
59-
rust-version: ${{ matrix.rust }}
60-
- name: Build System Info
61-
run: rustc --version
62-
- name: Run tests
63-
env:
64-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
65-
run: RUST_TEST_THREADS=1 cargo test --features marker_lookup
35+
- name: Checkout
36+
uses: actions/checkout@master
37+
38+
- uses: actions-rs/toolchain@v1
39+
with:
40+
profile: minimal
41+
toolchain: nightly
42+
override: true
43+
44+
- name: create SSH key
45+
uses: webfactory/ssh-agent@v0.2.0
46+
with:
47+
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
48+
49+
- name: version info
50+
run: rustc --version; cargo --version;
51+
52+
- name: Run all tests
53+
run: cargo test --all-features
54+
55+
fmt:
56+
runs-on: ubuntu-latest
57+
steps:
58+
- name: Checkout
59+
uses: actions/checkout@master
60+
61+
- uses: actions-rs/toolchain@v1
62+
with:
63+
profile: minimal
64+
toolchain: stable
65+
override: true
66+
67+
- name: create SSH key
68+
uses: webfactory/ssh-agent@v0.2.0
69+
with:
70+
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
71+
72+
- uses: actions-rs/cargo@v1
73+
with:
74+
command: fmt
75+
args: --all -- --check
76+
77+
clippy:
78+
runs-on: ubuntu-latest
79+
steps:
80+
- name: Checkout
81+
uses: actions/checkout@master
82+
83+
- uses: actions-rs/toolchain@v1
84+
with:
85+
profile: minimal
86+
toolchain: stable
87+
override: true
88+
89+
- name: create SSH key
90+
uses: webfactory/ssh-agent@v0.2.0
91+
with:
92+
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
93+
94+
- uses: actions-rs/cargo@v1
95+
with:
96+
command: clippy
97+
args: -- -D warnings

src/bfield.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ pub struct BField<T> {
1313
}
1414

1515
impl<'a, T: Clone + DeserializeOwned + Serialize> BField<T> {
16+
#[allow(clippy::too_many_arguments)]
1617
pub fn create<P>(
1718
filename: P,
1819
size: usize,

src/bfield_member.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ impl<T: Clone + DeserializeOwned + Serialize> BFieldMember<T> {
175175
let hash = murmurhash3_x64_128(key, 0);
176176
let mut merged_marker = u128::max_value();
177177
let mut positions: [usize; 16] = [0; 16]; // support up to 16 hashes
178+
#[allow(clippy::needless_range_loop)]
178179
for marker_ix in 0usize..self.params.n_hashes as usize {
179180
let pos = marker_pos(hash, marker_ix, self.bitvec.size(), marker_width);
180181
positions[marker_ix] = pos;

0 commit comments

Comments
 (0)