-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: usamoi <[email protected]>
- Loading branch information
Showing
12 changed files
with
1,030 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |
Oops, something went wrong.