Skip to content

Commit

Permalink
Merge branch 'main' into feat/add-transaction-method
Browse files Browse the repository at this point in the history
  • Loading branch information
sundy-li authored May 30, 2024
2 parents a3df040 + ce5df36 commit 7bd7747
Show file tree
Hide file tree
Showing 67 changed files with 2,342 additions and 710 deletions.
4 changes: 2 additions & 2 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ runs:
targets: ${{ inputs.target }}

- name: Setup sccache
uses: mozilla-actions/[email protected].3
uses: mozilla-actions/[email protected].4

- name: Cache Cargo
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.cargo/registry/
Expand Down
28 changes: 16 additions & 12 deletions .github/workflows/bindings.nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Setup Rust toolchain
uses: ./.github/actions/setup
with:
cache-key: bindings-nodejs
cache-key: bindings-nodejs-integration
- name: Setup node
uses: actions/setup-node@v4
with:
Expand All @@ -50,22 +50,24 @@ jobs:

build:
needs: integration
name: build-${{ matrix.os }}-${{ matrix.arch }}
name: build-${{ matrix.target }}
runs-on: ${{ matrix.runner }}
strategy:
matrix:
include:
- { os: linux, arch: arm64, target: aarch64-unknown-linux-gnu, runner: ubuntu-20.04 }
- { os: linux, arch: x64, target: x86_64-unknown-linux-gnu, runner: ubuntu-20.04 }
- { os: windows, arch: x64, target: x86_64-pc-windows-msvc, runner: windows-2019 }
- { os: macos, arch: x64, target: x86_64-apple-darwin, runner: macos-11 }
- { os: macos, arch: arm64, target: aarch64-apple-darwin, runner: macos-11 }
- { target: x86_64-unknown-linux-gnu, runner: ubuntu-20.04 }
- { target: aarch64-unknown-linux-gnu, runner: ubuntu-20.04 }
- { target: aarch64-unknown-linux-musl, runner: ubuntu-latest }
- { target: x86_64-unknown-linux-musl, runner: ubuntu-latest }
- { target: x86_64-pc-windows-msvc, runner: windows-2019 }
- { target: x86_64-apple-darwin, runner: macos-11 }
- { target: aarch64-apple-darwin, runner: macos-11 }
steps:
- uses: actions/checkout@v4
- name: Setup Rust toolchain
uses: ./.github/actions/setup
with:
cache-key: bindings-nodejs
cache-key: bindings-nodejs-${{ matrix.target }}
target: ${{ matrix.target }}
- name: Setup node
uses: actions/setup-node@v4
Expand Down Expand Up @@ -99,13 +101,13 @@ jobs:
yarn build
fi
- name: strip for macos
if: matrix.os == 'macos'
if: endsWith(matrix.target, '-apple-darwin')
working-directory: bindings/nodejs
run: |
strip -x *.node
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: bindings-nodejs
name: bindings-nodejs-${{ matrix.target }}
path: bindings/nodejs/*.node

publish:
Expand All @@ -131,9 +133,11 @@ jobs:
working-directory: bindings/nodejs
run: yarn install --immutable
- name: Download all artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
path: bindings/nodejs/artifacts
pattern: bindings-nodejs-*
merge-multiple: true
- name: Move artifacts
shell: bash
working-directory: bindings/nodejs
Expand Down
30 changes: 23 additions & 7 deletions .github/workflows/bindings.python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Setup Rust toolchain
uses: ./.github/actions/setup
with:
cache-key: bindings-python
cache-key: bindings-python-integration
- name: Setup Python
uses: actions/setup-python@v4
with:
Expand All @@ -40,7 +40,7 @@ jobs:
run: pipenv install --dev
- name: Check format
working-directory: bindings/python
run: pipenv run black --check .
run: pipenv run ruff format --check .
- name: Setup develop
working-directory: bindings/python
run: pipenv run maturin develop
Expand All @@ -53,8 +53,8 @@ jobs:
strategy:
matrix:
include:
- { os: linux, arch: x86_64, target: x86_64-unknown-linux-gnu, runner: ubuntu-20.04 }
# - { os: linux, arch: aarch64, target: aarch64-unknown-linux-gnu, runner: ubuntu-20.04 }
- { os: linux, arch: x86_64, target: x86_64-unknown-linux-gnu, runner: ubuntu-latest }
- { os: linux, arch: aarch64, target: aarch64-unknown-linux-gnu, runner: ubuntu-latest }
- { os: windows, arch: x86_64, target: x86_64-pc-windows-msvc, runner: windows-2019 }
- { os: macos, arch: x86_64, target: x86_64-apple-darwin, runner: macos-11 }
- { os: macos, arch: aarch64, target: aarch64-apple-darwin, runner: macos-11 }
Expand All @@ -69,17 +69,28 @@ jobs:
else
echo "BUILD_ARGS=--release --strip --out dist" >> $GITHUB_OUTPUT
fi
if [[ "${{ matrix.target }}" == "aarch64-unknown-linux-gnu" ]]; then
echo "MANYLINUX=2_28" >> $GITHUB_OUTPUT
else
echo "MANYLINUX=auto" >> $GITHUB_OUTPUT
fi
- name: Setup Rust toolchain
uses: ./.github/actions/setup
with:
cache-key: bindings-python-${{ matrix.os }}-${{ matrix.arch }}
target: ${{ matrix.target }}
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
working-directory: bindings/python
target: ${{ matrix.target }}
manylinux: ${{ steps.opts.outputs.MANYLINUX }}
sccache: 'true'
args: ${{ steps.opts.outputs.BUILD_ARGS }}
- name: Upload artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: dist
name: bindings-python-${{ matrix.os }}-${{ matrix.arch }}
path: bindings/python/dist/*.whl

publish:
Expand All @@ -94,7 +105,12 @@ jobs:
url: https://pypi.org/p/databend-driver/
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
path: bindings/python/artifacts
pattern: bindings-python-*
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true
packages-dir: bindings/python/artifacts
13 changes: 8 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ members = [
resolver = "2"

[workspace.package]
version = "0.14.0"
version = "0.18.2"
edition = "2021"
license = "Apache-2.0"
authors = ["Databend Authors <[email protected]>"]
Expand All @@ -21,7 +21,10 @@ keywords = ["databend", "database"]
repository = "https://github.com/datafuselabs/bendsql"

[workspace.dependencies]
databend-client = { path = "core", version = "0.14.0" }
databend-driver = { path = "driver", version = "0.14.0" }
databend-driver-macros = { path = "macros", version = "0.14.0" }
databend-sql = { path = "sql", version = "0.14.0" }
databend-client = { path = "core", version = "0.18.2" }
databend-driver = { path = "driver", version = "0.18.2" }
databend-driver-macros = { path = "macros", version = "0.18.2" }
databend-sql = { path = "sql", version = "0.18.2" }

[patch.crates-io]
pyo3-asyncio = { git = "https://github.com/everpcpc/pyo3-asyncio", rev = "42af887" }
Loading

0 comments on commit 7bd7747

Please sign in to comment.