Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0 release #1

Merged
merged 42 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
3887f95
add hash
lightsing Sep 9, 2024
d177c4a
add db
lightsing Sep 9, 2024
c35aa15
update db
lightsing Sep 9, 2024
b4fda9b
update hash
lightsing Sep 9, 2024
a200765
add trie node
lightsing Sep 9, 2024
dade9e8
fmt
lightsing Sep 10, 2024
df1b7ba
add tests
lightsing Sep 10, 2024
6474db9
move
lightsing Sep 10, 2024
7189bbb
add trie impl
lightsing Sep 12, 2024
eff788f
update docs
lightsing Sep 12, 2024
e2b6f6f
add scroll types
lightsing Sep 12, 2024
ef756c6
fix
lightsing Sep 12, 2024
3c229d3
rename key cache to key hasher
lightsing Sep 12, 2024
ede2c30
add delete
lightsing Sep 12, 2024
5d1c715
fix
lightsing Sep 12, 2024
88e9708
add removal
lightsing Sep 12, 2024
33f8038
docs
lightsing Sep 12, 2024
276d5f0
docs & fixes
lightsing Sep 13, 2024
32ac34d
docs
lightsing Sep 13, 2024
06c2bc3
ci
lightsing Sep 13, 2024
ff29302
fix ci
lightsing Sep 13, 2024
8fbb8ad
fix ci
lightsing Sep 13, 2024
922fd66
fix ci
lightsing Sep 13, 2024
d1df4ed
fix ci
lightsing Sep 13, 2024
30b1b07
enable test
lightsing Sep 13, 2024
293bee1
update README
lightsing Sep 13, 2024
60e32f7
MSRV 1.75
lightsing Sep 13, 2024
e3f163d
fix links
lightsing Sep 13, 2024
e794f01
improve debug
lightsing Sep 13, 2024
1f7cf66
add gc to db
lightsing Sep 13, 2024
29d972d
add gc to trie
lightsing Sep 13, 2024
1611e1e
fix clippy
lightsing Sep 13, 2024
59afa74
relock
lightsing Sep 13, 2024
0e0470c
exclude test target from stable clippy
lightsing Sep 13, 2024
a4c4b48
fix ci
lightsing Sep 13, 2024
d208469
fix ci
lightsing Sep 13, 2024
338924c
gc when delete
lightsing Sep 13, 2024
3607e44
full gc could oom
lightsing Sep 13, 2024
347aec9
add prove
lightsing Sep 13, 2024
426ec2f
add is_gc_supported
lightsing Sep 14, 2024
97f1b28
add book
lightsing Sep 14, 2024
022d98a
update ci
lightsing Sep 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 103 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: CI

concurrency:
cancel-in-progress: true
group: ${{github.workflow}}-${{github.ref}}

on:
pull_request:
types: [synchronize, opened, reopened, ready_for_review]
push:
branches:
- master

env:
CARGO_NET_GIT_FETCH_WITH_CLI: true
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: git

jobs:
skip_check:
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v5
with:
cancel_others: 'true'
concurrent_skipping: 'same_content_newer'
paths_ignore: '["**/README.md"]'

fmt:
needs: [ skip_check ]
if: |
github.event.pull_request.draft == false &&
(github.event.action == 'ready_for_review' || needs.skip_check.outputs.should_skip != 'true')
name: Rustfmt
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: "nightly-2024-07-07"
components: rustfmt
- name: Cargo fmt
run: cargo fmt --all -- --check

clippy-stable:
needs: [ fmt ]
if: |
github.event.pull_request.draft == false &&
(github.event.action == 'ready_for_review' || needs.skip_check.outputs.should_skip != 'true')
name: clippy stable
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: "1.75"
components: clippy
- name: cargo cache
uses: Swatinem/rust-cache@v2
- name: clippy
run: cargo clippy --all --features sled,scroll -- -D warnings

clippy-nightly:
needs: [ fmt ]
if: |
github.event.pull_request.draft == false &&
(github.event.action == 'ready_for_review' || needs.skip_check.outputs.should_skip != 'true')
name: clippy nightly
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: "nightly-2024-07-07"
components: clippy
- name: cargo cache
uses: Swatinem/rust-cache@v2
- name: clippy
run: cargo clippy --all --all-targets --features sled,scroll -- -D warnings

test:
needs: [ clippy-stable, clippy-nightly ]
if: |
github.event.pull_request.draft == false &&
(github.event.action == 'ready_for_review' || needs.skip_check.outputs.should_skip != 'true')
name: unit test
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: "nightly-2024-07-07"
components: clippy
- name: cargo cache
uses: Swatinem/rust-cache@v2
- name: clippy default
run: cargo test --all --all-targets --features sled,scroll
85 changes: 85 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: Docs

concurrency:
cancel-in-progress: true
group: ${{github.workflow}}-${{github.ref}}

on:
pull_request:
branches:
- master
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install toolchain
uses: dtolnay/rust-toolchain@nightly
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true

- name: Install mdbook
run: |
mkdir mdbook
curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.14/mdbook-v0.4.14-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook
echo `pwd`/mdbook >> $GITHUB_PATH

- name: Build book
run: mdbook build docs

- name: Build docs
run: RUSTDOCFLAGS="--enable-index-page -Zunstable-options --cfg docsrs" cargo doc --features sled,scroll --all --no-deps

- name: Move docs to book folder
run: mv target/doc docs/book/docs

- name: Archive artifact
shell: sh
run: |
chmod -c -R +rX "target/doc" |
while read line; do
echo "::warning title=Invalid file permissions automatically fixed::$line"
done
tar \
--dereference --hard-dereference \
--directory "docs/book" \
-cvf "$RUNNER_TEMP/artifact.tar" \
--exclude=.git \
--exclude=.github \
.

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: github-pages
path: ${{ runner.temp }}/artifact.tar
retention-days: 1
if-no-files-found: error

deploy:
# Only deploy if a push to main
if: github.ref_name == 'master' && github.event_name == 'push'
runs-on: ubuntu-latest
needs: [build]

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write
id-token: write

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
/target
/docs/book

# generated by doc tests
/my_db
Loading