Skip to content

Commit a9fc8a4

Browse files
authored
Merge branch 'main' into interrupt
2 parents 524738a + f1e58e8 commit a9fc8a4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+10433
-3605
lines changed

.cargo/config.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[target.'cfg(all())']
2+
rustflags = [
3+
"-Dclippy::all",
4+
"-Dnonstandard-style",
5+
"-Drust-2018-idioms",
6+
]

.github/workflows/release.yaml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: CD
22

33
on:
44
push:
5-
tags: [ '*' ]
5+
tags: ["*"]
66
env:
77
RUST_BACKTRACE: 1
88
jobs:
@@ -12,16 +12,12 @@ jobs:
1212
steps:
1313
- uses: actions/checkout@v2
1414
- uses: actions-rust-lang/setup-rust-toolchain@v1
15-
with:
16-
toolchain: stable
17-
target: ${{ matrix.target }}
18-
components: 'rustfmt, clippy'
1915

2016
# cargo publish
2117
- name: publish crates
2218
uses: katyo/publish-crates@v2
2319
with:
24-
path: './'
20+
path: "./"
2521
args: --no-verify --allow-dirty --all-features
2622
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
2723
ignore-unpublished-changes: true

.github/workflows/rust.yaml

Lines changed: 24 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: CI
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [main]
66
pull_request:
7-
branches: [ main ]
7+
branches: [main]
88
env:
99
RUST_BACKTRACE: 1
1010
jobs:
@@ -14,30 +14,29 @@ jobs:
1414
fail-fast: true
1515
matrix:
1616
include:
17-
- { target: x86_64-pc-windows-msvc, os: windows-latest, duckdb: libduckdb-windows-amd64.zip }
18-
- { target: x86_64-unknown-linux-gnu, os: ubuntu-latest, duckdb: libduckdb-linux-amd64.zip }
19-
#- { target: x86_64-apple-darwin, os: macos-latest }
20-
#- {
21-
#target: x86_64-pc-windows-gnu,
22-
#os: windows-latest,
23-
#host: -x86_64-pc-windows-gnu,
24-
#}
25-
17+
- {
18+
target: x86_64-pc-windows-msvc,
19+
os: windows-latest,
20+
duckdb: libduckdb-windows-amd64.zip,
21+
}
22+
- {
23+
target: x86_64-unknown-linux-gnu,
24+
os: ubuntu-latest,
25+
duckdb: libduckdb-linux-amd64.zip,
26+
}
2627
runs-on: ${{ matrix.os }}
2728
steps:
2829
- uses: actions/checkout@v2
2930
- uses: actions-rust-lang/setup-rust-toolchain@v1
3031
with:
31-
toolchain: stable
3232
target: ${{ matrix.target }}
33-
components: 'rustfmt, clippy'
3433

3534
# download libduckdb
3635
- uses: robinraju/[email protected]
3736
name: Download duckdb
3837
with:
3938
repository: "duckdb/duckdb"
40-
tag: "v1.2.2"
39+
tag: "v1.3.1"
4140
fileName: ${{ matrix.duckdb }}
4241
out-file-path: .
4342

@@ -58,9 +57,16 @@ jobs:
5857
DUCKDB_LIB_DIR: ${{ github.workspace }}/libduckdb
5958
DUCKDB_INCLUDE_DIR: ${{ github.workspace }}/libduckdb
6059
LD_LIBRARY_PATH: ${{ github.workspace }}/libduckdb
61-
run: |
62-
cargo clippy --all-targets --workspace --all-features -- -D warnings -A clippy::redundant-closure
63-
60+
run: cargo clippy --all-targets --all-features --locked -- -D warnings
61+
62+
- name: Dry-run release of crates
63+
if: matrix.os == 'ubuntu-latest'
64+
uses: katyo/publish-crates@v2
65+
with:
66+
path: "./"
67+
args: --allow-dirty --all-features
68+
dry-run: true
69+
ignore-unpublished-changes: true
6470

6571
# For windows
6672
- name: Windows extract duckdb
@@ -98,36 +104,16 @@ jobs:
98104
DUCKDB_INCLUDE_DIR: ${{ github.workspace }}/libduckdb
99105
LD_LIBRARY_PATH: ${{ github.workspace }}/libduckdb
100106

101-
Windows:
102-
name: Windows build from source
103-
needs: test
104-
runs-on: windows-latest
105-
steps:
106-
- uses: actions/checkout@v2
107-
- uses: actions/cache@v3
108-
with:
109-
path: ~/.cargo/registry/index
110-
key: index-${{ runner.os }}-${{ github.run_number }}
111-
restore-keys: |
112-
index-${{ runner.os }}-
113-
- uses: actions-rust-lang/setup-rust-toolchain@v1
114-
with:
115-
toolchain: stable
116-
target: x86_64-pc-windows-msvc
117-
118-
- run: cargo install cargo-examples
119-
120107
Sanitizer:
121108
name: Address Sanitizer
122-
needs: test
123109
runs-on: ubuntu-latest
124110
steps:
125111
- uses: actions/checkout@v2
126112
# Need nightly rust.
127113
- uses: actions-rust-lang/setup-rust-toolchain@v1
128114
with:
129115
toolchain: nightly
130-
components: 'rust-src'
116+
components: "rust-src"
131117
# Install LLVM tools
132118
- name: Install LLVM
133119
run: |
@@ -137,21 +123,9 @@ jobs:
137123
RUSTFLAGS: -Zsanitizer=address -C debuginfo=0
138124
RUSTDOCFLAGS: -Zsanitizer=address
139125
ASAN_OPTIONS: "detect_stack_use_after_return=1:detect_leaks=1:symbolize=1"
140-
# Work around https://github.com/rust-lang/rust/issues/59125 by
141-
# disabling backtraces. In an ideal world we'd probably suppress the
142-
# leak sanitization, but we don't care about backtraces here, so long
143-
# as the other tests have them.
144-
RUST_BACKTRACE: "0"
145126
# We cannot run "modern-full" with asan as the chrono feature will auto-load relase binaries of
146127
# the ICU-extension, which are not built with ASAN and will cause a crash.
147128
run: |
148129
export ASAN_SYMBOLIZER_PATH=$(which llvm-symbolizer)
149130
echo $ASAN_SYMBOLIZER_PATH
150131
cargo -Z build-std test --features "serde_json url r2d2 uuid polars extensions-full" --target x86_64-unknown-linux-gnu --package duckdb
151-
- name: publish crates --dry-run
152-
uses: katyo/publish-crates@v2
153-
with:
154-
path: './'
155-
args: --allow-dirty --all-features
156-
dry-run: true
157-
ignore-unpublished-changes: true

.gitignore

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,9 @@
22
# will have compiled files and executables
33
/target/
44

5-
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
6-
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
7-
Cargo.lock
8-
95
# These are backup files generated by rustfmt
106
**/*.rs.bk
117

12-
138
# Added by cargo
149

1510
/target

.rustfmt.toml

Lines changed: 0 additions & 7 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ cd ~/github/duckdb-rs/crates/libduckdb-sys
5353
cargo test --features bundled
5454
```
5555

56-
Currently in [github actions](https://github.com/wangfenjin/duckdb-rs/actions), we always use the bundled file for testing. So if you change the header in duckdb-cpp repo, you need to make the PR merged and updated the [bundled-file](https://github.com/wangfenjin/duckdb-rs/tree/main/crates/libduckdb-sys/duckdb).
56+
Currently in [github actions](https://github.com/duckdb/duckdb-rs/actions), we always use the bundled file for testing. So if you change the header in duckdb-cpp repo, you need to make the PR merged and updated the [bundled-file](https://github.com/duckdb/duckdb-rs/tree/main/crates/libduckdb-sys/duckdb).
5757
You can generated the amalgamated file by:
5858

5959
```shell

0 commit comments

Comments
 (0)