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

feat: bm25 #2

Merged
merged 9 commits into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
66 changes: 66 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Rust

on:
push:
branches: ["main"]
paths:
- ".cargo/**"
- ".github/**"
- "src/**"
- "Cargo.lock"
- "Cargo.toml"
- "pg_bestmatch.control"
pull_request:
branches: ["main"]
paths:
- ".cargo/**"
- ".github/**"
- "src/**"
- "Cargo.lock"
- "Cargo.toml"
- "pg_bestmatch.control"
merge_group:
workflow_dispatch:

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

env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
SCCACHE_GHA_ENABLED: true
RUSTC_WRAPPER: sccache
RUSTFLAGS: "-Dwarnings"

jobs:
check:
strategy:
matrix:
version: [12, 13, 14, 15, 16]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Environment
run: |
sudo apt-get remove -y '^postgres.*' '^libpq.*' '^clang.*' '^llvm.*' '^libclang.*' '^libllvm.*' '^mono-llvm.*'
sudo apt-get purge -y '^postgres.*' '^libpq.*' '^clang.*' '^llvm.*' '^libclang.*' '^libllvm.*' '^mono-llvm.*'
sudo apt-get update
sudo apt-get install -y build-essential
- name: Set up Sccache
uses: mozilla-actions/[email protected]
- name: Set up PostgreSQL
run: |
sudo apt-get install -y postgresql-common
echo | sudo /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh
sudo apt update
sudo apt-get install -y postgresql-${{ matrix.version }} postgresql-server-dev-${{ matrix.version }}
- name: Set up Pgrx
run: |
cargo install cargo-pgrx --debug --branch v0.12.0-alpha.1-patch2 --git https://github.com/tensorchord/pgrx.git
cargo pgrx init --pg${{ matrix.version }}=$(which pg_config)
- name: Clippy
run: cargo clippy --lib --features "pg${{ matrix.version }}"
- name: Build
run: cargo build --lib --features "pg${{ matrix.version }}"
7 changes: 7 additions & 0 deletions .taplo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
formatting.indent_string = " "

[[rule]]
include = ["**/Cargo.toml"]
keys = ["dependencies", "dev-dependencies", "lints"]
formatting.reorder_arrays = true
formatting.reorder_keys = true
8 changes: 8 additions & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[default]
extend-ignore-re = [
# Latex formula
"\\$.+?\\$",
]

[files]
extend-exclude = ["tokenizer/*.json"]
Loading