diff --git a/.github/workflows/bindings.nodejs.yml b/.github/workflows/bindings.nodejs.yml index 0e4ef1b0..e81abc56 100644 --- a/.github/workflows/bindings.nodejs.yml +++ b/.github/workflows/bindings.nodejs.yml @@ -56,11 +56,10 @@ jobs: include: - { 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 } - # FIXME: tmp disable for build issue - # - { target: x86_64-pc-windows-msvc, runner: windows-latest } - # - { target: aarch64-pc-windows-msvc, runner: windows-latest } + - { target: aarch64-unknown-linux-musl, runner: ubuntu-latest } + - { target: x86_64-pc-windows-msvc, runner: windows-latest } + - { target: aarch64-pc-windows-msvc, runner: windows-latest } - { target: x86_64-apple-darwin, runner: macos-latest } - { target: aarch64-apple-darwin, runner: macos-latest } steps: @@ -92,10 +91,11 @@ jobs: NAPI_TARGET: ${{ matrix.target }} run: | if [[ "${{ github.event_name }}" == "pull_request" ]]; then - pnpm run build:debug + pnpm napi build --platform --target=$NAPI_TARGET --js generated.js else - pnpm run build + pnpm napi build --platform --target=$NAPI_TARGET --release --js generated.js fi + pnpm node ./scripts/header.js - name: strip for macos if: endsWith(matrix.target, '-apple-darwin') working-directory: bindings/nodejs @@ -111,7 +111,6 @@ jobs: needs: build runs-on: ubuntu-latest permissions: - contents: read id-token: write environment: name: npmjs.com @@ -145,9 +144,9 @@ jobs: run: cp LICENSE ./bindings/nodejs - name: Publish working-directory: bindings/nodejs - run: | - echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc - npm publish --access public --provenance env: GITHUB_TOKEN: ${{ github.token }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + run: | + echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc + npm publish --access public --provenance diff --git a/.github/workflows/bindings.python.yml b/.github/workflows/bindings.python.yml index f5944e5f..cc375f12 100644 --- a/.github/workflows/bindings.python.yml +++ b/.github/workflows/bindings.python.yml @@ -30,7 +30,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v5 with: - python-version: "3.11" + python-version: "3.12" - name: Install dependencies working-directory: bindings/python run: pip install ruff @@ -106,7 +106,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - pyver: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] + pyver: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] steps: - uses: actions/checkout@v4 - name: Setup Python @@ -135,7 +135,6 @@ jobs: needs: [check, build, integration] runs-on: ubuntu-latest permissions: - contents: read id-token: write environment: name: pypi.org @@ -147,7 +146,8 @@ jobs: path: bindings/python/artifacts pattern: bindings-python-* merge-multiple: true - - uses: pypa/gh-action-pypi-publish@release/v1 + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 with: skip-existing: true packages-dir: bindings/python/artifacts diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 872c8e00..8ec8c45a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -50,10 +50,14 @@ jobs: strategy: matrix: include: - - { os: macos, target: aarch64-apple-darwin } - - { os: macos, target: x86_64-apple-darwin } - - { os: windows, target: aarch64-pc-windows-msvc } - - { os: windows, target: x86_64-pc-windows-msvc } + - os: macos + target: aarch64-apple-darwin + - os: macos + target: x86_64-apple-darwin + - os: windows + target: aarch64-pc-windows-msvc + - os: windows + target: x86_64-pc-windows-msvc runs-on: ${{ matrix.os }}-latest steps: - uses: actions/checkout@v4 @@ -103,32 +107,38 @@ jobs: strategy: matrix: include: - - { packager: apk, arch: amd64, target: x86_64-unknown-linux-musl } - - { packager: apk, arch: arm64, target: aarch64-unknown-linux-musl } - - { packager: deb, arch: amd64, target: x86_64-unknown-linux-musl } - - { packager: deb, arch: arm64, target: aarch64-unknown-linux-musl } - - { packager: rpm, arch: amd64, target: x86_64-unknown-linux-musl } - - { packager: rpm, arch: arm64, target: aarch64-unknown-linux-musl } - - { - packager: archlinux, - arch: amd64, - target: x86_64-unknown-linux-gnu, - } - - { - packager: archlinux, - arch: arm64, - target: aarch64-unknown-linux-gnu, - } + - packager: apk + arch: amd64 + target: x86_64-unknown-linux-musl + - packager: apk + arch: arm64 + target: aarch64-unknown-linux-musl + - packager: deb + arch: amd64 + target: x86_64-unknown-linux-musl + - packager: deb + arch: arm64 + target: aarch64-unknown-linux-musl + - packager: rpm + arch: amd64 + target: x86_64-unknown-linux-musl + - packager: rpm + arch: arm64 + target: aarch64-unknown-linux-musl + - packager: archlinux + arch: amd64 + target: x86_64-unknown-linux-gnu + - packager: archlinux + arch: arm64 + target: aarch64-unknown-linux-gnu steps: - uses: actions/checkout@v4 - - name: Setup nfpm shell: bash run: | curl -sSfLo /tmp/nfpm.tar.gz https://github.com/goreleaser/nfpm/releases/download/v2.28.0/nfpm_2.28.0_Linux_x86_64.tar.gz tar -xzf /tmp/nfpm.tar.gz -C /tmp sudo mv /tmp/nfpm /usr/local/bin/nfpm - - name: Download shell: bash env: @@ -137,14 +147,12 @@ jobs: mkdir -p dist/pkg gh release download ${{ github.ref_name }} --pattern "bendsql-${{ matrix.target }}.tar.gz" --dir dist/ tar -xzf dist/bendsql-${{ matrix.target }}.tar.gz -C dist/ - - name: Package shell: bash run: | arch=${{ matrix.arch }} version=${{ github.ref_name }} nfpm package --packager ${{ matrix.packager }} --target dist/pkg/ -f <(envsubst '${arch} ${version}' < nfpm.yaml) - - name: Publish shell: bash env: diff --git a/bindings/python/Pipfile b/bindings/python/Pipfile index 549b6439..85f12315 100644 --- a/bindings/python/Pipfile +++ b/bindings/python/Pipfile @@ -12,4 +12,4 @@ behave = "*" ruff = "*" [requires] -python_version = "3.11" +python_version = "3.12" diff --git a/bindings/python/pyproject.toml b/bindings/python/pyproject.toml index 9c35c3a6..34259953 100644 --- a/bindings/python/pyproject.toml +++ b/bindings/python/pyproject.toml @@ -12,14 +12,12 @@ description = "Databend Driver Python Binding" license = { text = "Apache-2.0" } name = "databend-driver" readme = "README.md" -# PyO3 doesn't support python 3.13 yet. -# ref: https://github.com/apache/opendal/issues/4268 -requires-python = ">=3.7, < 3.13" +requires-python = ">=3.7, < 3.14" [project.optional-dependencies] docs = ["pdoc"] test = ["behave"] -lint = ["black", "flake8"] +lint = ["ruff"] [project.urls] Repository = "https://github.com/databendlabs/bendsql" diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 3fd4f2da..73cb934d 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "stable-2024-11-28" +channel = "stable" components = ["rustfmt", "clippy"]