From fde20a9bcf65c47bc058301f6c577245598a6447 Mon Sep 17 00:00:00 2001 From: wangfenjin Date: Sun, 12 Mar 2023 09:14:26 +0800 Subject: [PATCH 1/4] add minimal-versions check Change-Id: If82b6798ef1f105449a1bfdad3469fb332fd1178 --- .github/workflows/rust.yaml | 3 +++ libduckdb-sys/Cargo.toml | 7 +++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/rust.yaml b/.github/workflows/rust.yaml index beb1fa00..842ee096 100644 --- a/.github/workflows/rust.yaml +++ b/.github/workflows/rust.yaml @@ -88,6 +88,9 @@ jobs: with: name: PATH value: $env:PATH;${{ github.workspace }}/libduckdb + - uses: taiki-e/install-action@cargo-hack + - uses: taiki-e/install-action@cargo-minimal-versions + - run: cargo minimal-versions test - name: Run cargo-test if: matrix.os == 'windows-latest' run: cargo test --features "buildtime_bindgen modern-full" diff --git a/libduckdb-sys/Cargo.toml b/libduckdb-sys/Cargo.toml index 722eaacf..7e35e298 100644 --- a/libduckdb-sys/Cargo.toml +++ b/libduckdb-sys/Cargo.toml @@ -17,9 +17,8 @@ exclude = ["duckdb-sources"] [features] default = ["vcpkg", "pkg-config"] -bundled = ["cc"] +bundled = ["cc", "tar", "flate2"] buildtime_bindgen = ["bindgen", "pkg-config", "vcpkg"] - httpfs = ["bundled"] json = ["bundled"] parquet = ["bundled"] @@ -30,13 +29,13 @@ extensions-full = ["httpfs", "json", "parquet"] [build-dependencies] autocfg = "1.0" bindgen = { version = "0.64", optional = true, default-features = false, features = ["runtime"] } -flate2 = "1.0" +flate2 = { version = "1.0", optional = true } pkg-config = { version = "0.3.24", optional = true } cc = { version = "1.0", features = ["parallel"], optional = true } vcpkg = { version = "0.2", optional = true } serde = { version = "1.0", features = ["derive"] } serde_json = { version = "1.0" } -tar = "0.4.38" +tar = { version = "0.4.38", optional = true } [dev-dependencies] arrow = { version = "34", default-features = false, features = ["ffi"] } From d8e7c265846a81281344583adf2b2b2237b1e0fe Mon Sep 17 00:00:00 2001 From: wangfenjin Date: Sun, 12 Mar 2023 09:22:55 +0800 Subject: [PATCH 2/4] only enable for linux Change-Id: Id01712311d4573c24dcf3a17fcd9e71eb4646b9e --- .github/workflows/rust.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/rust.yaml b/.github/workflows/rust.yaml index 842ee096..c86de21a 100644 --- a/.github/workflows/rust.yaml +++ b/.github/workflows/rust.yaml @@ -49,6 +49,12 @@ jobs: with: file_path: ${{ github.workspace }}/${{ matrix.duckdb }} extract_dir: libduckdb + - uses: taiki-e/install-action@cargo-hack + if: matrix.os == 'ubuntu-latest' + - uses: taiki-e/install-action@cargo-minimal-versions + if: matrix.os == 'ubuntu-latest' + - run: cargo minimal-versions test + if: matrix.os == 'ubuntu-latest' - run: cargo fmt --all -- --check if: matrix.os == 'ubuntu-latest' - run: cargo clippy --all-targets --workspace --all-features -- -D warnings -A clippy::redundant-closure @@ -88,9 +94,6 @@ jobs: with: name: PATH value: $env:PATH;${{ github.workspace }}/libduckdb - - uses: taiki-e/install-action@cargo-hack - - uses: taiki-e/install-action@cargo-minimal-versions - - run: cargo minimal-versions test - name: Run cargo-test if: matrix.os == 'windows-latest' run: cargo test --features "buildtime_bindgen modern-full" From 0ee842f4d3e2c3b58fa95f055c6d7ad7b79d7353 Mon Sep 17 00:00:00 2001 From: wangfenjin Date: Sun, 12 Mar 2023 11:14:54 +0800 Subject: [PATCH 3/4] run in nightly Change-Id: I3defa9a7f8f4a7327cebb6e8dacfbf94720cade6 --- .github/workflows/rust.yaml | 9 +++------ .gitignore | 2 ++ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/rust.yaml b/.github/workflows/rust.yaml index c86de21a..fa615589 100644 --- a/.github/workflows/rust.yaml +++ b/.github/workflows/rust.yaml @@ -49,12 +49,6 @@ jobs: with: file_path: ${{ github.workspace }}/${{ matrix.duckdb }} extract_dir: libduckdb - - uses: taiki-e/install-action@cargo-hack - if: matrix.os == 'ubuntu-latest' - - uses: taiki-e/install-action@cargo-minimal-versions - if: matrix.os == 'ubuntu-latest' - - run: cargo minimal-versions test - if: matrix.os == 'ubuntu-latest' - run: cargo fmt --all -- --check if: matrix.os == 'ubuntu-latest' - run: cargo clippy --all-targets --workspace --all-features -- -D warnings -A clippy::redundant-closure @@ -134,6 +128,9 @@ jobs: with: rust-version: nightly components: rust-src + - uses: taiki-e/install-action@cargo-hack + - uses: taiki-e/install-action@cargo-minimal-versions + - run: cargo minimal-versions test - name: Tests with asan env: RUSTFLAGS: -Zsanitizer=address diff --git a/.gitignore b/.gitignore index 5ff91ed2..523e907a 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,5 @@ Cargo.lock .ccls-cache/ *.db + +libduckdb-sys/duckdb-sources \ No newline at end of file From 0882cf616d6944e68d582c35071ca8354090ccb9 Mon Sep 17 00:00:00 2001 From: Wang Fenjin Date: Mon, 19 Jun 2023 11:51:50 +0800 Subject: [PATCH 4/4] Update Cargo.toml --- libduckdb-sys/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libduckdb-sys/Cargo.toml b/libduckdb-sys/Cargo.toml index 6f994baa..fca05322 100644 --- a/libduckdb-sys/Cargo.toml +++ b/libduckdb-sys/Cargo.toml @@ -29,7 +29,7 @@ extensions-full = ["httpfs", "json", "parquet"] [build-dependencies] autocfg = "1.0" bindgen = { version = "0.66", optional = true, default-features = false, features = ["runtime"] } -flate2 = "1.0" +flate2 = { version = "1.0", optional = true } pkg-config = { version = "0.3.24", optional = true } cc = { version = "1.0", features = ["parallel"], optional = true } vcpkg = { version = "0.2", optional = true }