Skip to content

Commit cfbf334

Browse files
committed
Rework github actions
1 parent d507264 commit cfbf334

File tree

3 files changed

+75
-5
lines changed

3 files changed

+75
-5
lines changed

.github/workflows/check.yml

Lines changed: 68 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: Check
22
on: push
33
jobs:
4-
x86_64:
5-
name: x86_64 tests
4+
x86_64-stable:
5+
name: x86_64 stable
66
runs-on: ubuntu-latest
77
steps:
88
- uses: actions/checkout@v2
@@ -15,6 +15,37 @@ jobs:
1515
with:
1616
command: fmt
1717
args: --all -- --check
18+
- name: Build all targets
19+
uses: actions-rs/cargo@v1
20+
with:
21+
command: build
22+
args: --workspace --all-targets
23+
- name: Run Clippy linter
24+
uses: actions-rs/cargo@v1
25+
with:
26+
command: clippy
27+
args: --workspace --all-targets -- -D warnings
28+
- name: Run tests
29+
uses: actions-rs/cargo@v1
30+
with:
31+
command: test
32+
args: --workspace
33+
x86_64-nightly:
34+
name: x86_64 nightly
35+
runs-on: ubuntu-latest
36+
steps:
37+
- uses: actions/checkout@v2
38+
- name: Install nightly toolchain
39+
uses: actions-rs/toolchain@v1
40+
with:
41+
toolchain: nightly
42+
override: true
43+
components: clippy, rustfmt
44+
- name: Run rustfmt
45+
uses: actions-rs/cargo@v1
46+
with:
47+
command: fmt
48+
args: --all -- --check
1849
- name: Build all targets
1950
uses: actions-rs/cargo@v1
2051
with:
@@ -30,6 +61,11 @@ jobs:
3061
with:
3162
command: test
3263
args: --workspace --all-features
64+
x86_64-sanitizer:
65+
name: x86_64 sanitizer
66+
runs-on: ubuntu-latest
67+
steps:
68+
- uses: actions/checkout@v2
3369
- name: Install nightly toolchain
3470
uses: actions-rs/toolchain@v1
3571
with:
@@ -45,8 +81,8 @@ jobs:
4581
with:
4682
command: test
4783
args: --workspace --all-features --target x86_64-unknown-linux-gnu -Zbuild-std
48-
wasm32:
49-
name: wasm32 tests
84+
wasm32-stable:
85+
name: wasm32 stable
5086
runs-on: ubuntu-latest
5187
steps:
5288
- uses: actions/checkout@v2
@@ -80,6 +116,34 @@ jobs:
80116
with:
81117
command: wasi
82118
args: test --workspace --all-features
119+
aarch64-nightly:
120+
name: aarch64 nightly
121+
runs-on: ubuntu-latest
122+
steps:
123+
- uses: actions/checkout@v2
124+
- name: Install cross-compilation toolchain
125+
run: |
126+
sudo apt update
127+
sudo apt install gcc-aarch64-linux-gnu
128+
- name: Install nightly toolchain
129+
uses: actions-rs/toolchain@v1
130+
with:
131+
toolchain: nightly
132+
override: true
133+
components: clippy, rustfmt
134+
target: aarch64-unknown-linux-gnu
135+
- name: Build all targets
136+
uses: actions-rs/cargo@v1
137+
with:
138+
command: build
139+
args: --target aarch64-unknown-linux-gnu --workspace --all-targets --all-features
140+
env:
141+
RUSTFLAGS: -C linker=aarch64-linux-gnu-gcc
142+
- name: Run Clippy linter
143+
uses: actions-rs/cargo@v1
144+
with:
145+
command: clippy
146+
args: --target aarch64-unknown-linux-gnu --workspace --all-targets --all-features -- -D warnings
83147
bench:
84148
name: Benchmarks
85149
runs-on: ubuntu-latest

src/aarch64.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![allow(clippy::missing_safety_doc)]
2+
13
use crate::{Needle, NeedleWithSize, Searcher, Vector, VectorHash};
24

35
#[cfg(target_arch = "aarch64")]

src/lib.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66
77
#![warn(missing_docs)]
88
// Will be stabilized in 1.61.0 with https://github.com/rust-lang/rust/pull/90621
9-
#![cfg_attr(target_arch = "aarch64", feature(aarch64_target_feature))]
9+
#![cfg_attr(
10+
target_arch = "aarch64",
11+
allow(stable_features),
12+
feature(aarch64_target_feature)
13+
)]
1014

1115
/// Substring search implementations using aarch64 architecture features.
1216
#[cfg(target_arch = "aarch64")]

0 commit comments

Comments
 (0)