Skip to content

Commit 05ed2db

Browse files
authored
Merge pull request #9 from slowli/aov-chores
chore: Update dependencies and Rust version
2 parents 1ce9ab4 + 54aef1e commit 05ed2db

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+2924
-961
lines changed

.clippy.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Minimum supported Rust version. Should be consistent with CI and mentions
2+
# in crate READMEs.
3+
msrv = "1.85"
4+
5+
doc-valid-idents = ["MatterDB", ".."]

.editorconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
11+
[*.rs]
12+
indent_size = 4
13+
14+
[*.md]
15+
trim_trailing_whitespace = false

.github/workflows/cargo-deny.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Cargo Deny
2+
3+
on:
4+
pull_request:
5+
branches: [ "*" ]
6+
push:
7+
branches: ["main"]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
12+
jobs:
13+
cargo_deny:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
17+
strategy:
18+
matrix:
19+
checks:
20+
- advisories
21+
- bans licenses sources
22+
23+
# Prevent sudden announcement of a new advisory from failing ci:
24+
continue-on-error: ${{ matrix.checks == 'advisories' }}
25+
26+
steps:
27+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
28+
- uses: EmbarkStudios/cargo-deny-action@76cd80eb775d7bbbd2d80292136d74d39e1b4918 # v2.0.14
29+
with:
30+
command: check ${{ matrix.checks }}

.github/workflows/ci.yml

Lines changed: 72 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -2,111 +2,94 @@ name: CI
22

33
on:
44
pull_request:
5-
branches:
6-
- '*'
5+
branches: [ "*" ]
6+
push:
7+
branches: ["main"]
8+
9+
env:
10+
CARGO_TERM_COLOR: "always"
11+
CARGO_INCREMENTAL: "0"
12+
RUSTC_WRAPPER: "sccache"
13+
SCCACHE_GHA_ENABLED: "true"
14+
# Minimum supported Rust version.
15+
msrv: 1.85.0
16+
# Nightly Rust necessary for building docs.
17+
nightly: nightly-2025-05-23
718

819
jobs:
9-
fmt:
10-
name: Rustfmt
20+
build-msrv:
1121
runs-on: ubuntu-latest
12-
22+
permissions:
23+
contents: read
1324
steps:
14-
- name: Checkout sources
15-
uses: actions/checkout@v2
16-
17-
- name: Install rust
18-
uses: actions-rs/toolchain@v1
19-
with:
20-
toolchain: stable
21-
components: rustfmt
22-
profile: minimal
23-
override: true
24-
25-
- name: Run rustfmt
26-
uses: actions-rs/cargo@v1
27-
with:
28-
command: fmt
29-
args: --all -- --check
30-
31-
clippy:
32-
name: Clippy
33-
runs-on: ubuntu-latest
34-
35-
steps:
36-
- name: Checkout sources
37-
uses: actions/checkout@v2
38-
39-
- name: Install rust
40-
uses: actions-rs/toolchain@v1
41-
with:
42-
toolchain: stable
43-
components: clippy
44-
profile: minimal
45-
override: true
25+
- uses: actions/checkout@v4
4626

47-
- name: Run clippy
48-
uses: actions-rs/clippy-check@v1
27+
- name: Install Rust
28+
uses: dtolnay/rust-toolchain@master
4929
with:
50-
token: ${{ secrets.GITHUB_TOKEN }}
51-
args: -- -D warnings
30+
toolchain: ${{ env.msrv }}
31+
- name: Install sccache
32+
uses: mozilla-actions/sccache-action@v0.0.9
5233

53-
audit:
54-
name: Security audit
55-
runs-on: ubuntu-latest
56-
57-
steps:
58-
- uses: actions/checkout@v2
59-
- uses: actions-rs/audit-check@v1
60-
with:
61-
token: ${{ secrets.GITHUB_TOKEN }}
34+
- name: Build libraries
35+
run: cargo build --workspace --lib --all-features
6236

63-
deadlinks:
64-
name: Deadlinks
37+
build:
6538
runs-on: ubuntu-latest
66-
39+
permissions:
40+
contents: read
6741
steps:
6842
- name: Checkout sources
69-
uses: actions/checkout@v2
43+
uses: actions/checkout@v4
7044

71-
- name: Install rust
72-
uses: actions-rs/toolchain@v1
45+
- name: Install Rust
46+
uses: dtolnay/rust-toolchain@master
7347
with:
7448
toolchain: stable
75-
profile: minimal
76-
override: true
77-
78-
- name: Install deadlinks
79-
run: cargo install cargo-deadlinks
80-
81-
- name: Cargo doc
82-
run: cargo doc --no-deps
83-
84-
- name: Run deadlinks
85-
run: cargo deadlinks --dir target/doc
86-
87-
test:
88-
name: Test
49+
components: rustfmt, clippy, rust-src
50+
- name: Install sccache
51+
uses: mozilla-actions/sccache-action@v0.0.9
52+
53+
- name: Format
54+
run: cargo fmt --all -- --config imports_granularity=Crate --config group_imports=StdExternalCrate --check
55+
- name: Clippy
56+
run: cargo clippy --workspace --all-features --all-targets -- -D warnings
57+
58+
- name: Run tests
59+
run: cargo test --workspace --all-features --all-targets
60+
- name: Run doc tests
61+
run: cargo test --workspace --all-features --doc
62+
63+
build-nightly:
64+
needs:
65+
- build
66+
- build-msrv
8967
runs-on: ubuntu-latest
90-
68+
permissions:
69+
contents: write
9170
steps:
92-
- name: Checkout sources
93-
uses: actions/checkout@v2
71+
- uses: actions/checkout@v4
9472

95-
- name: Install rust
96-
uses: actions-rs/toolchain@v1
73+
- name: Install Rust
74+
uses: dtolnay/rust-toolchain@master
9775
with:
98-
toolchain: stable
99-
profile: minimal
100-
override: true
101-
102-
- name: Build
103-
uses: actions-rs/cargo@v1
104-
with:
105-
command: build
106-
args: --examples --all
107-
108-
- name: Test
109-
uses: actions-rs/cargo@v1
76+
toolchain: ${{ env.nightly }}
77+
- name: Install sccache
78+
uses: mozilla-actions/sccache-action@v0.0.9
79+
80+
- name: Build libraries
81+
run: cargo build --workspace --exclude vise-e2e-tests --lib --all-features
82+
83+
- name: Build docs
84+
run: |
85+
cargo clean --doc && \
86+
cargo rustdoc -p matterdb-derive --all-features -- -D warnings --cfg docsrs && \
87+
cargo rustdoc -p matterdb --all-features -- -D warnings --cfg docsrs
88+
89+
- name: Deploy
90+
uses: JamesIves/github-pages-deploy-action@v4
91+
if: github.event_name == 'push' && github.ref_type == 'branch'
11092
with:
111-
command: test
112-
args: --all
93+
branch: gh-pages
94+
folder: target/doc
95+
single-commit: true
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Leaked Secrets Scan
2+
3+
on:
4+
pull_request:
5+
branches: [ "*" ]
6+
push:
7+
branches: ["main"]
8+
9+
jobs:
10+
TruffleHog:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
17+
with:
18+
fetch-depth: 0
19+
- name: TruffleHog OSS
20+
uses: trufflesecurity/trufflehog@a94d152bf65bebf5baa486d3d4dfee520af2ceed # v3.88.2
21+
with:
22+
path: ./
23+
base: ${{ github.event.repository.default_branch }}
24+
head: HEAD
25+
extra_args: --debug --only-verified

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
*.bak
1010
node_modules
1111
*.log
12-
target
13-
a.out
12+
a.out
1413
.gitconfig
1514
tags
1615
*.orig
17-
Cargo.lock
1816

17+
# Rust
18+
target
1919
*.proptest-regressions

0 commit comments

Comments
 (0)