Skip to content

Commit 4d2a446

Browse files
authored
Merge pull request #3 from Elvis339/feature/v2
feat: v2
2 parents 376a157 + eb8a7bf commit 4d2a446

File tree

22 files changed

+4046
-642
lines changed

22 files changed

+4046
-642
lines changed

.envrc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Automatically enter nix development shell when entering this directory
2+
# Requires: direnv (https://direnv.net/)
3+
#
4+
# First time setup:
5+
# 1. Install direnv: https://direnv.net/docs/installation.html
6+
# 2. Hook into your shell: https://direnv.net/docs/hook.html
7+
# 3. Run: direnv allow
8+
#
9+
# This will automatically load the nix environment whenever you cd into this directory.
10+
11+
if command -v nix &> /dev/null; then
12+
use flake
13+
else
14+
echo "Nix not installed. Run 'just install-nix' to install it."
15+
fi
16+

.github/workflows/bench.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Benchmarks
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
workflow_dispatch:
9+
10+
env:
11+
CARGO_TERM_COLOR: always
12+
13+
jobs:
14+
benchmark:
15+
name: Performance
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
21+
- name: Install Nix
22+
uses: DeterminateSystems/nix-installer-action@main
23+
24+
- name: Setup Nix cache
25+
uses: DeterminateSystems/magic-nix-cache-action@main
26+
27+
- name: Run benchmarks
28+
run: nix develop --command just bench

.github/workflows/ci.yml

Lines changed: 16 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,27 @@
1-
on: [push, pull_request]
2-
31
name: CI
42

3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
512
jobs:
613
check:
714
name: Check
815
runs-on: ubuntu-latest
916
steps:
1017
- name: Checkout sources
11-
uses: actions/checkout@v3
12-
13-
- name: Install stable toolchain
14-
uses: dtolnay/rust-toolchain@master
15-
with:
16-
toolchain: stable
17-
18-
- name: Run cargo check
19-
run: cargo check
20-
21-
test:
22-
name: Test Suite
23-
runs-on: ubuntu-latest
24-
steps:
25-
- name: Checkout sources
26-
uses: actions/checkout@v3
27-
28-
- name: Install stable toolchain
29-
uses: dtolnay/rust-toolchain@master
30-
with:
31-
toolchain: stable
32-
33-
- name: Run cargo test
34-
run: cargo test
18+
uses: actions/checkout@v4
3519

36-
lints:
37-
name: Lints
38-
runs-on: ubuntu-latest
39-
steps:
40-
- name: Checkout sources
41-
uses: actions/checkout@v3
20+
- name: Install Nix
21+
uses: DeterminateSystems/nix-installer-action@main
4222

43-
- name: Install stable toolchain
44-
uses: dtolnay/rust-toolchain@master
45-
with:
46-
toolchain: stable
47-
components: rustfmt, clippy
23+
- name: Setup Nix cache
24+
uses: DeterminateSystems/magic-nix-cache-action@main
4825

49-
- name: Run cargo fmt
50-
run: cargo fmt --all -- --check
26+
- name: Run checks (fmt, lint, test)
27+
run: nix develop --command just check

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
/target
22
.idea
3+
example/target

Cargo.lock

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

0 commit comments

Comments
 (0)