Skip to content

Commit

Permalink
Merge #178: Database
Browse files Browse the repository at this point in the history
  • Loading branch information
yukibtc committed Nov 13, 2023
2 parents ba6cfad + 776cc98 commit f20c776
Show file tree
Hide file tree
Showing 75 changed files with 5,510 additions and 440 deletions.
4 changes: 4 additions & 0 deletions .githooks/pre-push
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@ buildargs=(
"-p nostr --no-default-features --features alloc"
"-p nostr --no-default-features --features alloc,all-nips"
"-p nostr --features blocking"
"-p nostr-database"
"-p nostr-sdk-net"
"-p nostr-sdk"
"-p nostr-sdk --no-default-features"
"-p nostr-sdk --features blocking"
"-p nostr-sdk --features sqlite"
#"-p nostr-sdk --features rocksdb"
"-p nostr-ffi"
"-p nostr-sdk-ffi"
)
Expand All @@ -23,6 +26,7 @@ for arg in "${buildargs[@]}"; do
done

buildargs=(
"-p nostr-sdk --features indexeddb --target wasm32-unknown-unknown"
"-p nostr-js --target wasm32-unknown-unknown"
"-p nostr-sdk-js --target wasm32-unknown-unknown"
)
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@ jobs:
-p nostr --no-default-features --features alloc,
-p nostr --no-default-features --features "alloc all-nips",
-p nostr --features blocking,
-p nostr-database
-p nostr-sdk,
-p nostr-sdk --no-default-features,
-p nostr-sdk --features blocking,
-p nostr-sdk --features sqlite,
]
steps:
- name: Checkout
Expand All @@ -57,6 +59,40 @@ jobs:
- name: Clippy
run: cargo clippy ${{ matrix.build-args }} -- -D warnings

build-msrv-1660:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- version: stable # STABLE
- version: 1.66.0 # MSRV
build-args:
[
-p nostr-sdk --features rocksdb,
]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-msrv-1.66.0-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }}
- name: Set default toolchain
run: rustup default ${{ matrix.rust.version }}
- name: Set profile
run: rustup set profile minimal && rustup component add clippy
- name: Build
run: cargo build ${{ matrix.build-args }}
- name: Tests
run: cargo test ${{ matrix.build-args }}
- name: Clippy
run: cargo clippy ${{ matrix.build-args }} -- -D warnings

build-wasm:
name: Build WASM
runs-on: ubuntu-latest
Expand All @@ -69,6 +105,7 @@ jobs:
[
-p nostr,
-p nostr-sdk,
-p nostr-sdk --features indexeddb,
-p nostr-js,
]
steps:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
target/
db/
.DS_Store
*.db
*.db-shm
Expand Down
Loading

0 comments on commit f20c776

Please sign in to comment.