Skip to content

Commit 2131934

Browse files
committed
GH actions
1 parent 3a50fd4 commit 2131934

4 files changed

Lines changed: 322 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main, master]
6+
tags:
7+
- "v*"
8+
pull_request:
9+
10+
permissions:
11+
contents: read
12+
13+
concurrency:
14+
group: ci-${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: true
16+
17+
env:
18+
CARGO_TERM_COLOR: always
19+
RUSTFLAGS: -D warnings
20+
21+
jobs:
22+
checks:
23+
name: Checks
24+
runs-on: ubuntu-latest
25+
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v4
29+
30+
- name: Install Rust
31+
uses: dtolnay/rust-toolchain@stable
32+
with:
33+
components: rustfmt, clippy
34+
35+
- name: Cache Rust artifacts
36+
uses: Swatinem/rust-cache@v2
37+
38+
- name: Check formatting
39+
run: cargo fmt --all -- --check
40+
41+
- name: Run Clippy
42+
run: cargo clippy --all-targets --all-features -- -D warnings
43+
44+
- name: Run tests
45+
run: cargo test --all-features
46+
47+
no-default-features:
48+
name: No default features
49+
runs-on: ubuntu-latest
50+
51+
steps:
52+
- name: Checkout
53+
uses: actions/checkout@v4
54+
55+
- name: Install Rust
56+
uses: dtolnay/rust-toolchain@stable
57+
58+
- name: Cache Rust artifacts
59+
uses: Swatinem/rust-cache@v2
60+
61+
- name: Run tests
62+
run: cargo test --no-default-features
63+
64+
docs:
65+
name: Documentation
66+
runs-on: ubuntu-latest
67+
68+
steps:
69+
- name: Checkout
70+
uses: actions/checkout@v4
71+
72+
- name: Install Rust
73+
uses: dtolnay/rust-toolchain@stable
74+
75+
- name: Cache Rust artifacts
76+
uses: Swatinem/rust-cache@v2
77+
78+
- name: Build documentation
79+
run: cargo doc --no-deps
80+
env:
81+
RUSTDOCFLAGS: -D warnings
82+
83+
msrv:
84+
name: MSRV
85+
runs-on: ubuntu-latest
86+
87+
steps:
88+
- name: Checkout
89+
uses: actions/checkout@v4
90+
91+
- name: Install Rust
92+
uses: dtolnay/rust-toolchain@1.77
93+
94+
- name: Cache Rust artifacts
95+
uses: Swatinem/rust-cache@v2
96+
97+
- name: Check crate
98+
run: cargo check --all-targets --all-features --locked
99+
100+
package:
101+
name: Packaging
102+
runs-on: ubuntu-latest
103+
104+
steps:
105+
- name: Checkout
106+
uses: actions/checkout@v4
107+
108+
- name: Install Rust
109+
uses: dtolnay/rust-toolchain@stable
110+
111+
- name: Cache Rust artifacts
112+
uses: Swatinem/rust-cache@v2
113+
114+
- name: Fetch dependencies
115+
run: cargo fetch --locked
116+
117+
- name: Verify crate package
118+
run: cargo package --locked
119+
120+
- name: Verify publish dry run
121+
run: cargo publish --dry-run --locked

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
/target
2-
Cargo.lock

Cargo.lock

Lines changed: 198 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ categories = ["science::geo", "algorithms"]
1212
[dependencies]
1313
ndarray = "0.17"
1414
thiserror = "2"
15-
rayon = { version = "1", optional = true }
15+
rayon = { version = "=1.10.0", optional = true }
16+
rayon-core = { version = "=1.12.1", optional = true }
1617

1718
[features]
1819
default = []
19-
parallel = ["dep:rayon"]
20+
parallel = ["dep:rayon", "dep:rayon-core"]

0 commit comments

Comments
 (0)