| # Licensed to the Apache Software Foundation (ASF) under one |
| # or more contributor license agreements. See the NOTICE file |
| # distributed with this work for additional information |
| # regarding copyright ownership. The ASF licenses this file |
| # to you under the Apache License, Version 2.0 (the |
| # "License"); you may not use this file except in compliance |
| # with the License. You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, |
| # software distributed under the License is distributed on an |
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| # KIND, either express or implied. See the License for the |
| # specific language governing permissions and limitations |
| # under the License. |
| |
| name: Packaging |
| |
| on: |
| pull_request: |
| branches: |
| - main |
| paths: |
| - ".env" |
| - "c/**" |
| - "ci/**" |
| - "dev/release/verify-apt.sh" |
| - "dev/release/verify-yum.sh" |
| - "glib/**" |
| - "python/**" |
| - "ruby/**" |
| - ".github/workflows/packaging.yml" |
| |
| push: |
| # Automatically build on RC tags |
| branches-ignore: |
| - "**" |
| tags: |
| - "apache-arrow-adbc-*-rc*" |
| schedule: |
| - cron: "0 0 * * *" |
| workflow_dispatch: |
| inputs: |
| upload_artifacts: |
| description: "Upload artifacts to Gemfury" |
| required: true |
| type: boolean |
| default: false |
| concurrency: |
| group: ${{ github.repository }}-${{ github.ref }}-${{ github.workflow }} |
| cancel-in-progress: true |
| |
| defaults: |
| run: |
| shell: bash |
| |
| permissions: |
| contents: read |
| |
| jobs: |
| source: |
| name: Source |
| runs-on: ubuntu-latest |
| # For cron: only run on the main repo, not forks |
| if: github.event_name != 'schedule' || github.repository == 'apache/arrow-adbc' |
| steps: |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| with: |
| fetch-depth: 0 |
| persist-credentials: false |
| submodules: recursive |
| |
| # https://github.com/actions/checkout/issues/882 |
| - name: Update tags |
| run: | |
| git fetch --tags --force origin |
| |
| - name: Prepare version |
| run: | |
| source dev/release/versions.env |
| echo "VERSION=${RELEASE}" | tee -a $GITHUB_ENV |
| |
| - name: Create archive |
| run: | |
| ci/scripts/source_build.sh \ |
| apache-arrow-adbc-${VERSION} \ |
| $(git log -n 1 --format=%h) |
| |
| - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 |
| with: |
| name: source |
| retention-days: 7 |
| path: | |
| apache-arrow-adbc-*.tar.gz |
| |
| go-binaries: |
| name: "Go ${{ matrix.os }}" |
| runs-on: ${{ matrix.os }} |
| needs: |
| - source |
| |
| strategy: |
| matrix: |
| os: ["ubuntu-latest", "windows-latest", "macos-15-intel"] |
| |
| steps: |
| - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 |
| with: |
| name: source |
| |
| - name: Extract source archive |
| run: | |
| source_archive=$(echo apache-arrow-adbc-*.tar.gz) |
| VERSION=${source_archive#apache-arrow-adbc-} |
| VERSION=${VERSION%.tar.gz} |
| echo "VERSION=${VERSION}" >> $GITHUB_ENV |
| |
| tar xf apache-arrow-adbc-${VERSION}.tar.gz |
| mv apache-arrow-adbc-${VERSION} adbc |
| |
| - name: Get required Go version |
| run: | |
| (. adbc/.env && echo "GO_VERSION=${GO}") >> $GITHUB_ENV |
| - name: Setup Go |
| uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 |
| with: |
| go-version: "${{ env.GO_VERSION }}" |
| check-latest: true |
| cache: false |
| cache-dependency-path: adbc/go/adbc/go.sum |
| |
| # run `make -i` because the Windows runs claim they can't delete the .h files, but they are still generated |
| - name: Build Go binaries |
| run: | |
| pushd adbc/go/adbc/pkg |
| make -i |
| popd |
| |
| - name: Upload Go binaries |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 |
| with: |
| name: go-${{ matrix.os }} |
| retention-days: 7 |
| path: | |
| adbc/go/adbc/pkg/libadbc_driver_flightsql.* |
| |
| csharp: |
| name: "C#/.NET" |
| runs-on: ubuntu-latest |
| needs: |
| - source |
| - go-binaries |
| |
| steps: |
| - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 |
| with: |
| name: source |
| |
| - name: Extract source archive |
| run: | |
| source_archive=$(echo apache-arrow-adbc-*.tar.gz) |
| VERSION=${source_archive#apache-arrow-adbc-} |
| VERSION=${VERSION%.tar.gz} |
| echo "VERSION=${VERSION}" >> $GITHUB_ENV |
| |
| tar xf apache-arrow-adbc-${VERSION}.tar.gz |
| mv apache-arrow-adbc-${VERSION} adbc |
| |
| - name: Show inputs |
| run: | |
| echo "upload_artifacts: ${{ inputs.upload_artifacts }}" >> $GITHUB_STEP_SUMMARY |
| echo "schedule: ${GITHUB_EVENT_SCHEDULE}" >> $GITHUB_STEP_SUMMARY |
| echo "ref: ${GITHUB_REF}" >> $GITHUB_STEP_SUMMARY |
| env: |
| GITHUB_EVENT_SCHEDULE: ${{ github.event.schedule }} |
| |
| - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 |
| with: |
| pattern: go-* |
| path: adbc/go/adbc/pkg |
| merge-multiple: true |
| |
| - name: Copy Go binaries |
| run: | |
| pushd adbc/go/adbc/pkg/ |
| cp *.dll ../ |
| cp *.so ../ |
| cp *.dylib ../ |
| popd |
| |
| - name: Package |
| run: | |
| pushd adbc/ |
| docker compose run -e IsPackagingPipeline=true csharp-dist |
| popd |
| |
| - name: Archive nupkg |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 |
| with: |
| name: csharp |
| retention-days: 7 |
| path: | |
| adbc/csharp/artifacts/**/*.nupkg |
| adbc/csharp/artifacts/**/*.snupkg |
| |
| docs: |
| name: Documentation |
| runs-on: ubuntu-latest |
| needs: |
| - source |
| steps: |
| - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 |
| with: |
| name: source |
| |
| - name: Extract source archive |
| run: | |
| source_archive=$(echo apache-arrow-adbc-*.tar.gz) |
| VERSION=${source_archive#apache-arrow-adbc-} |
| VERSION=${VERSION%.tar.gz} |
| echo "VERSION=${VERSION}" | tee -a $GITHUB_ENV |
| |
| tar xf apache-arrow-adbc-${VERSION}.tar.gz |
| mv apache-arrow-adbc-${VERSION} adbc |
| |
| - name: Show inputs |
| run: | |
| echo "upload_artifacts: ${{ inputs.upload_artifacts }}" >> $GITHUB_STEP_SUMMARY |
| echo "schedule: ${GITHUB_EVENT_SCHEDULE}" >> $GITHUB_STEP_SUMMARY |
| echo "ref: ${GITHUB_REF}" >> $GITHUB_STEP_SUMMARY |
| env: |
| GITHUB_EVENT_SCHEDULE: ${{ github.event.schedule }} |
| |
| - name: Build and test |
| run: | |
| pushd adbc |
| docker compose run \ |
| -e SETUPTOOLS_SCM_PRETEND_VERSION=$VERSION \ |
| docs |
| popd |
| |
| - name: Compress docs |
| run: | |
| pushd adbc |
| tar --transform "s|docs/build/html|adbc-docs|" -czf ../docs.tgz docs/build/html |
| popd |
| |
| - name: Archive docs |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 |
| with: |
| name: docs |
| retention-days: 2 |
| path: | |
| docs.tgz |
| |
| java-jni: |
| name: "JNI Libraries/${{ matrix.os }} ${{ matrix.arch }}" |
| needs: |
| - source |
| runs-on: ${{ matrix.runner }} |
| strategy: |
| matrix: |
| include: |
| - { os: Linux, arch: amd64, runner: ubuntu-latest } |
| - { os: Linux, arch: arm64, runner: ubuntu-24.04-arm } |
| - { os: macOS, arch: arm64v8, runner: macos-latest } |
| - { os: Windows, arch: amd64, runner: windows-latest } |
| |
| steps: |
| - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 |
| with: |
| name: source |
| - name: Extract source archive |
| run: | |
| source_archive=$(echo apache-arrow-adbc-*.tar.gz) |
| VERSION=${source_archive#apache-arrow-adbc-} |
| VERSION=${VERSION%.tar.gz} |
| echo "VERSION=${VERSION}" >> $GITHUB_ENV |
| |
| tar xf apache-arrow-adbc-${VERSION}.tar.gz |
| mv apache-arrow-adbc-${VERSION} adbc |
| - name: Build JNI artifacts |
| working-directory: adbc |
| env: |
| ADBC_BUILD_STATIC: ON |
| ADBC_BUILD_SHARED: OFF |
| ADBC_BUILD_TESTS: OFF |
| ADBC_USE_ASAN: OFF |
| ADBC_USE_UBSAN: OFF |
| BUILD_ALL: 0 |
| BUILD_DRIVER_MANAGER: 1 |
| CMAKE_BUILD_TYPE: Release |
| run: | |
| ./ci/scripts/cpp_build.sh $(pwd) $(pwd)/build_driver_manager |
| ./ci/scripts/java_build.sh $(pwd) |
| ./ci/scripts/java_jni_build.sh $(pwd) $(pwd)/build_jni $(pwd)/build_driver_manager/local |
| - name: Assemble artifacts |
| run: | |
| mkdir artifacts |
| cp -r adbc/java/driver/jni/src/main/resources/ artifacts/jni |
| ls -laR artifacts |
| mv artifacts artifacts-${{ matrix.os }}-${{ matrix.arch }} |
| tar czf artifacts-${{ matrix.os }}-${{ matrix.arch }}.tgz artifacts-${{ matrix.os }}-${{ matrix.arch }} |
| - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 |
| with: |
| name: jni-artifacts-${{ matrix.os }}-${{ matrix.arch }} |
| retention-days: 7 |
| path: | |
| artifacts-${{ matrix.os }}-${{ matrix.arch }}.tgz |
| |
| java: |
| name: "Java 11" |
| runs-on: ubuntu-latest |
| needs: |
| - source |
| - java-jni |
| steps: |
| - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 |
| with: |
| name: source |
| |
| - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 |
| with: |
| path: artifacts |
| pattern: jni-artifacts-* |
| merge-multiple: true |
| |
| - name: Extract source archive |
| run: | |
| source_archive=$(echo apache-arrow-adbc-*.tar.gz) |
| VERSION=${source_archive#apache-arrow-adbc-} |
| VERSION=${VERSION%.tar.gz} |
| echo "VERSION=${VERSION}" >> $GITHUB_ENV |
| |
| tar xf apache-arrow-adbc-${VERSION}.tar.gz |
| mv apache-arrow-adbc-${VERSION} adbc |
| |
| - name: Show inputs |
| run: | |
| echo "upload_artifacts: ${{ inputs.upload_artifacts }}" >> $GITHUB_STEP_SUMMARY |
| echo "schedule: ${GITHUB_EVENT_SCHEDULE}" >> $GITHUB_STEP_SUMMARY |
| echo "ref: ${GITHUB_REF}" >> $GITHUB_STEP_SUMMARY |
| env: |
| GITHUB_EVENT_SCHEDULE: ${{ github.event.schedule }} |
| |
| - name: Build and test |
| run: | |
| set -x |
| pushd artifacts |
| for archive in artifacts*.tgz; do |
| tar xvf $archive |
| done |
| popd |
| cp -r artifacts/*/jni/adbc_driver_jni adbc/java/driver/jni/src/main/resources |
| |
| pushd adbc/ |
| docker compose run -e BUILD_JNI=ON java-dist |
| popd |
| cp -a adbc/dist/ ./ |
| |
| # Basic sanity check; also don't ship binaries in sources JAR to avoid bloat |
| - name: Verify JNI JAR contents |
| run: | |
| sources_jar=$(find dist -maxdepth 1 -name 'adbc-driver-jni-*-sources.jar' -print -quit) |
| runtime_jar=${sources_jar%-sources.jar}.jar |
| |
| jar tf "${sources_jar}" > temp_jni_sources_contents.txt |
| if grep -q '^adbc_driver_jni/' temp_jni_sources_contents.txt; then |
| echo "JNI source JAR contains native binaries: ${sources_jar}" |
| exit 1 |
| fi |
| |
| jar tf "${runtime_jar}" > temp_jni_runtime_contents.txt |
| if ! grep -q '^adbc_driver_jni/' temp_jni_runtime_contents.txt; then |
| echo "JNI runtime JAR does not contain native binaries: ${runtime_jar}" |
| exit 1 |
| fi |
| |
| - name: Archive JARs |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 |
| with: |
| name: java |
| retention-days: 7 |
| path: | |
| dist/*.jar |
| dist/*.pom |
| |
| linux: |
| name: Linux ${{ matrix.target }} |
| runs-on: ubuntu-latest |
| needs: |
| - source |
| strategy: |
| fail-fast: false |
| matrix: |
| target: |
| - almalinux-8 |
| - almalinux-9 |
| - almalinux-10 |
| - debian-trixie |
| - ubuntu-jammy |
| - ubuntu-noble |
| steps: |
| - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 |
| with: |
| name: source |
| |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| with: |
| repository: apache/arrow |
| path: arrow |
| persist-credentials: false |
| |
| - name: Set output variables |
| run: | |
| echo "ARROW_SOURCE=$(pwd)/arrow" >> $GITHUB_ENV |
| case ${{ matrix.target }} in |
| almalinux-*) |
| echo "TASK_NAMESPACE=yum" >> $GITHUB_ENV |
| echo "YUM_TARGETS=${{ matrix.target }}" >> $GITHUB_ENV |
| ;; |
| debian-*|ubuntu-*) |
| echo "TASK_NAMESPACE=apt" >> $GITHUB_ENV |
| echo "APT_TARGETS=${{ matrix.target }}" >> $GITHUB_ENV |
| ;; |
| esac |
| distribution=$(echo ${{ matrix.target }} | cut -d- -f1) |
| echo "DISTRIBUTION=${distribution}" >> $GITHUB_ENV |
| |
| source_archive=$(echo apache-arrow-adbc-*.tar.gz) |
| VERSION=${source_archive#apache-arrow-adbc-} |
| VERSION=${VERSION%.tar.gz} |
| echo "VERSION=${VERSION}" | tee -a $GITHUB_ENV |
| |
| - name: Extract source archive |
| run: | |
| tar xf apache-arrow-adbc-$VERSION.tar.gz |
| |
| source ./apache-arrow-adbc-$VERSION/dev/release/versions.env |
| |
| mv apache-arrow-adbc-$VERSION adbc |
| mv apache-arrow-adbc-$VERSION.tar.gz adbc/ci/linux-packages/ |
| |
| - name: Set up Ruby |
| uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0 |
| with: |
| ruby-version: ruby |
| |
| - name: Cache ccache |
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 |
| with: |
| path: adbc/ci/linux-packages/${{ env.TASK_NAMESPACE }}/build/${{ matrix.target }}/ccache |
| key: linux-${{ env.TASK_NAMESPACE }}-ccache-${{ matrix.target }}-{{ "${{ hashFiles('adbc.h', 'c/**', 'glib/**') }}" }} |
| restore-keys: linux-${{ env.TASK_NAMESPACE }}-ccache-${{ matrix.target }}- |
| lookup-only: true |
| |
| - name: Login to GitHub Container registry |
| uses: docker/login-action@371161bbe7024a29a25c5e19bfcbc0804fe9ad2c # v4.5.2 |
| with: |
| registry: ghcr.io |
| username: ${{ github.actor }} |
| password: ${{ github.token }} |
| |
| - name: Build |
| run: | |
| pushd adbc/ci/linux-packages |
| if [ "${GITHUB_REF_TYPE}" != "tag" ]; then |
| rake version:update |
| fi |
| rake docker:pull || : |
| rake --trace ${TASK_NAMESPACE}:build BUILD_DIR=build |
| popd |
| |
| - name: Prepare artifacts |
| run: | |
| cp -a \ |
| adbc/ci/linux-packages/${TASK_NAMESPACE}/repositories/${DISTRIBUTION} \ |
| ./ |
| tar czf ${{ matrix.target }}.tar.gz ${DISTRIBUTION} |
| |
| - name: Upload artifacts |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 |
| with: |
| name: ${{ matrix.target }} |
| retention-days: 7 |
| path: | |
| ${{ matrix.target }}.tar.gz |
| |
| - name: Push Docker image |
| run: | |
| pushd adbc/ci/linux-packages |
| rake docker:push || : |
| popd |
| |
| - name: Set up test |
| run: | |
| sudo apt update |
| sudo apt install -y \ |
| apt-utils \ |
| createrepo-c \ |
| devscripts \ |
| gpg \ |
| rpm |
| (echo "Key-Type: RSA"; \ |
| echo "Key-Length: 4096"; \ |
| echo "Name-Real: Test"; \ |
| echo "Name-Email: test@example.com"; \ |
| echo "%no-protection") | \ |
| gpg --full-generate-key --batch |
| GPG_KEY_ID=$(gpg --list-keys --with-colon test@example.com | grep fpr | cut -d: -f10) |
| echo "GPG_KEY_ID=${GPG_KEY_ID}" >> ${GITHUB_ENV} |
| gpg --export --armor test@example.com > adbc/ci/linux-packages/KEYS |
| |
| - name: Test |
| run: | |
| pushd adbc/ci/linux-packages |
| bundle install |
| rake --trace ${TASK_NAMESPACE}:test |
| popd |
| |
| python-conda-linux: |
| name: "Python ${{ matrix.arch }} Conda" |
| runs-on: ubuntu-latest |
| # No need for Conda packages during release |
| # if: "!startsWith(github.ref, 'refs/tags/')" |
| # TODO(apache/arrow-adbc#468): disable for now |
| if: false |
| needs: |
| - source |
| strategy: |
| fail-fast: false |
| matrix: |
| # TODO: "linux_aarch64_" |
| arch: ["linux_64_"] |
| steps: |
| - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 |
| with: |
| name: source |
| |
| - name: Extract source archive |
| id: version |
| run: | |
| source_archive=$(echo apache-arrow-adbc-*.tar.gz) |
| VERSION=${source_archive#apache-arrow-adbc-} |
| VERSION=${VERSION%.tar.gz} |
| echo "VERSION=${VERSION}" | tee -a $GITHUB_ENV |
| |
| tar xf apache-arrow-adbc-${VERSION}.tar.gz |
| mv apache-arrow-adbc-${VERSION} adbc |
| |
| - name: Show inputs |
| run: | |
| echo "upload_artifacts: ${GITHUB_EVENT_INPUTS_UPLOAD_ARTIFACTS}" >> $GITHUB_STEP_SUMMARY |
| echo "schedule: ${GITHUB_EVENT_SCHEDULE}" >> GITHUB_STEP_SUMMARY |
| echo "ref: ${GITHUB_REF}" >> GITHUB_STEP_SUMMARY |
| env: |
| GITHUB_EVENT_INPUTS_UPLOAD_ARTIFACTS: ${{ github.event.inputs.upload_artifacts }} |
| GITHUB_EVENT_SCHEDULE: ${{ github.event.schedule }} |
| |
| - name: Build Conda package |
| env: |
| ARCH_CONDA_FORGE: ${{ matrix.arch }} |
| run: | |
| pushd adbc |
| docker compose run \ |
| -e HOST_USER_ID=$(id -u) \ |
| python-conda |
| popd |
| |
| - name: Archive Conda packages |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 |
| with: |
| name: python-${{ matrix.arch }}-conda |
| retention-days: 7 |
| path: | |
| adbc/build/conda/*/*.tar.bz2 |
| |
| - name: Test Conda packages |
| if: matrix.arch == 'linux_64_' |
| env: |
| ARCH_CONDA_FORGE: ${{ matrix.arch }} |
| run: | |
| pushd adbc |
| docker compose run \ |
| python-conda-test |
| popd |
| |
| python-conda-macos: |
| name: "Python ${{ matrix.arch }} Conda" |
| runs-on: macos-15-intel |
| # No need for Conda packages during release |
| # TODO(apache/arrow-adbc#468): re-enable |
| if: false |
| needs: |
| - source |
| strategy: |
| fail-fast: false |
| matrix: |
| # TODO: "osx_arm64_" |
| arch: ["osx_64_"] |
| defaults: |
| run: |
| shell: bash -l -eo pipefail {0} |
| steps: |
| - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 |
| with: |
| name: source |
| |
| - name: Extract source archive |
| id: version |
| run: | |
| source_archive=$(echo apache-arrow-adbc-*.tar.gz) |
| VERSION=${source_archive#apache-arrow-adbc-} |
| VERSION=${VERSION%.tar.gz} |
| echo "VERSION=${VERSION}" | tee -a $GITHUB_ENV |
| |
| tar xf apache-arrow-adbc-$VERSION.tar.gz |
| mv apache-arrow-adbc-$VERSION adbc |
| |
| - name: Show inputs |
| run: | |
| echo "upload_artifacts: ${GITHUB_EVENT_INPUTS_UPLOAD_ARTIFACTS}" >> $GITHUB_STEP_SUMMARY |
| echo "schedule: ${GITHUB_EVENT_SCHEDULE}" >> $GITHUB_STEP_SUMMARY |
| echo "ref: ${GITHUB_REF}" >> $GITHUB_STEP_SUMMARY |
| env: |
| GITHUB_EVENT_INPUTS_UPLOAD_ARTIFACTS: ${{ github.event.inputs.upload_artifacts }} |
| GITHUB_EVENT_SCHEDULE: ${{ github.event.schedule }} |
| |
| - uses: conda-incubator/setup-miniconda@8ee1f361103df19b6f8c8655fd3967a8ecb162d5 # v4.0.1 |
| with: |
| miniforge-version: latest |
| use-only-tar-bz2: false |
| use-mamba: true |
| |
| - name: Install Dependencies |
| run: | |
| mamba install -c conda-forge boa conda-smithy conda-verify |
| conda config --remove channels defaults |
| conda config --add channels conda-forge |
| |
| - name: Build Conda package |
| env: |
| ARCH_CONDA_FORGE: ${{ matrix.arch }} |
| run: | |
| ./adbc/ci/scripts/python_conda_build.sh $(pwd)/adbc ${ARCH_CONDA_FORGE}.yaml $(pwd)/adbc/build |
| |
| - name: Archive Conda packages |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 |
| with: |
| name: python-${{ matrix.arch }}-conda |
| retention-days: 7 |
| path: | |
| adbc/build/conda/*/*.tar.bz2 |
| |
| - name: Test Conda packages |
| if: matrix.arch == 'osx_64_' |
| env: |
| ARCH_CONDA_FORGE: ${{ matrix.arch }} |
| run: | |
| ./adbc/ci/scripts/python_conda_test.sh $(pwd)/adbc $(pwd)/adbc/build |
| |
| python-manylinux: |
| name: "Python ${{ matrix.arch }} manylinux" |
| runs-on: ${{ matrix.runs_on }} |
| needs: |
| - source |
| strategy: |
| fail-fast: false |
| matrix: |
| arch: ["amd64", "arm64v8"] |
| include: |
| - arch: amd64 |
| platform: "linux/amd64" |
| runs_on: "ubuntu-latest" |
| - arch: arm64v8 |
| platform: "linux/arm64/v8" |
| runs_on: "ubuntu-24.04-arm" |
| steps: |
| - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 |
| with: |
| name: source |
| |
| - name: Extract source archive |
| id: version |
| run: | |
| source_archive=$(echo apache-arrow-adbc-*.tar.gz) |
| VERSION=${source_archive#apache-arrow-adbc-} |
| VERSION=${VERSION%.tar.gz} |
| |
| tar xf apache-arrow-adbc-${VERSION}.tar.gz |
| mv apache-arrow-adbc-${VERSION} adbc |
| |
| source adbc/dev/release/versions.env |
| echo "VERSION=${VERSION_NATIVE}" | tee -a $GITHUB_ENV |
| |
| - name: Show inputs |
| run: | |
| echo "upload_artifacts: ${GITHUB_EVENT_INPUTS_UPLOAD_ARTIFACTS}" >> $GITHUB_STEP_SUMMARY |
| echo "schedule: ${GITHUB_EVENT_SCHEDULE}" >> $GITHUB_STEP_SUMMARY |
| echo "ref: ${GITHUB_REF}" >> $GITHUB_STEP_SUMMARY |
| env: |
| GITHUB_EVENT_INPUTS_UPLOAD_ARTIFACTS: ${{ github.event.inputs.upload_artifacts }} |
| GITHUB_EVENT_SCHEDULE: ${{ github.event.schedule }} |
| |
| - name: Build wheel |
| env: |
| ARCH: ${{ matrix.arch }} |
| PLATFORM: ${{ matrix.platform }} |
| run: | |
| pushd adbc |
| docker compose run \ |
| -e SETUPTOOLS_SCM_PRETEND_VERSION=$VERSION \ |
| python-wheel-manylinux-build |
| |
| docker compose run \ |
| -e SETUPTOOLS_SCM_PRETEND_VERSION=$VERSION \ |
| -e CIBW_ENVIRONMENT_PASS_LINUX=SETUPTOOLS_SCM_PRETEND_VERSION \ |
| python-wheel-manylinux-relocate |
| popd |
| |
| - name: Archive wheels |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 |
| with: |
| name: python-${{ matrix.arch }}-manylinux${{ matrix.manylinux_version }} |
| retention-days: 7 |
| path: | |
| adbc/python/adbc_driver_flightsql/repaired_wheels/*.whl |
| adbc/python/adbc_driver_manager/repaired_wheels/*.whl |
| adbc/python/adbc_driver_postgresql/repaired_wheels/*.whl |
| adbc/python/adbc_driver_sqlite/repaired_wheels/*.whl |
| |
| - name: Test wheel 3.10 |
| env: |
| ARCH: ${{ matrix.arch }} |
| PLATFORM: ${{ matrix.platform }} |
| run: | |
| pushd adbc |
| env PYTHON=3.10 docker compose run python-wheel-manylinux-test |
| |
| - name: Test wheel 3.11 |
| env: |
| ARCH: ${{ matrix.arch }} |
| PLATFORM: ${{ matrix.platform }} |
| run: | |
| pushd adbc |
| env PYTHON=3.11 docker compose run python-wheel-manylinux-test |
| |
| - name: Test wheel 3.12 |
| env: |
| ARCH: ${{ matrix.arch }} |
| PLATFORM: ${{ matrix.platform }} |
| run: | |
| pushd adbc |
| env PYTHON=3.12 docker compose run python-wheel-manylinux-test |
| |
| - name: Test wheel 3.13 |
| env: |
| ARCH: ${{ matrix.arch }} |
| PLATFORM: ${{ matrix.platform }} |
| run: | |
| pushd adbc |
| env PYTHON=3.13 docker compose run python-wheel-manylinux-test |
| |
| - name: Test wheel 3.14 |
| env: |
| ARCH: ${{ matrix.arch }} |
| PLATFORM: ${{ matrix.platform }} |
| run: | |
| pushd adbc |
| env PYTHON=3.14 docker compose run python-wheel-manylinux-test |
| |
| - name: Test wheel 3.14t |
| env: |
| ARCH: ${{ matrix.arch }} |
| PLATFORM: ${{ matrix.platform }} |
| run: | |
| pushd adbc |
| env PYTHON=3.14t docker compose run python-wheel-manylinux-freethreaded-test |
| |
| python-macos: |
| name: "Python ${{ matrix.arch }} macOS" |
| runs-on: ${{ matrix.os }} |
| needs: |
| - source |
| strategy: |
| fail-fast: false |
| matrix: |
| os: ["macos-15-intel", "macos-latest"] |
| include: |
| - os: macos-15-intel |
| arch: amd64 |
| - os: macos-latest |
| arch: arm64v8 |
| env: |
| MACOSX_DEPLOYMENT_TARGET: "10.15" |
| PYTHON: "/Library/Frameworks/Python.framework/Versions/3.14/bin/python3.14" |
| # Where to install vcpkg |
| VCPKG_ROOT: "${{ github.workspace }}/vcpkg" |
| steps: |
| - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 |
| with: |
| name: source |
| |
| - name: Extract source archive |
| id: version |
| run: | |
| source_archive=$(echo apache-arrow-adbc-*.tar.gz) |
| VERSION=${source_archive#apache-arrow-adbc-} |
| VERSION=${VERSION%.tar.gz} |
| |
| tar xf apache-arrow-adbc-${VERSION}.tar.gz |
| mv apache-arrow-adbc-${VERSION} adbc |
| |
| source adbc/dev/release/versions.env |
| echo "VERSION=${VERSION_NATIVE}" | tee -a $GITHUB_ENV |
| echo "SETUPTOOLS_SCM_PRETEND_VERSION=${VERSION_NATIVE}" | tee -a $GITHUB_ENV |
| |
| - name: Show inputs |
| run: | |
| echo "upload_artifacts: ${GITHUB_EVENT_INPUTS_UPLOAD_ARTIFACTS}" >> $GITHUB_STEP_SUMMARY |
| echo "schedule: ${GITHUB_EVENT_SCHEDULE}" >> $GITHUB_STEP_SUMMARY |
| echo "ref: ${GITHUB_REF}" >> $GITHUB_STEP_SUMMARY |
| env: |
| GITHUB_EVENT_INPUTS_UPLOAD_ARTIFACTS: ${{ github.event.inputs.upload_artifacts }} |
| GITHUB_EVENT_SCHEDULE: ${{ github.event.schedule }} |
| |
| - name: Install Homebrew dependencies |
| run: brew install autoconf bash pkg-config ninja |
| |
| - name: Install vcpkg |
| run: | |
| pushd adbc |
| ci/scripts/install_vcpkg.sh "$VCPKG_ROOT" |
| popd |
| |
| - name: Get required Go version |
| run: | |
| (. adbc/.env && echo "GO_VERSION=${GO}") >> $GITHUB_ENV |
| |
| - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 |
| with: |
| go-version: "${{ env.GO_VERSION }}" |
| check-latest: true |
| cache: false |
| cache-dependency-path: adbc/go/adbc/go.sum |
| |
| - name: Build wheel |
| env: |
| ARCH: ${{ matrix.arch }} |
| run: | |
| pushd adbc |
| $PYTHON -m venv build-env |
| source build-env/bin/activate |
| ./ci/scripts/python_wheel_unix_build.sh $ARCH $(pwd) $(pwd)/build |
| ./ci/scripts/python_wheel_unix_relocate.sh $ARCH $(pwd) $(pwd)/build |
| popd |
| |
| - name: Archive wheels |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 |
| with: |
| name: python-${{ matrix.arch }}-macos |
| retention-days: 7 |
| path: | |
| adbc/python/adbc_driver_flightsql/repaired_wheels/*.whl |
| adbc/python/adbc_driver_manager/repaired_wheels/*.whl |
| adbc/python/adbc_driver_postgresql/repaired_wheels/*.whl |
| adbc/python/adbc_driver_sqlite/repaired_wheels/*.whl |
| |
| # N.B. delocate (called above) will install these Python versions for |
| # us. You can get the interpreter path by inspecting CI output (search |
| # for "Building cp314-macos"...) |
| |
| - name: Test wheel 3.10 |
| run: | |
| pushd adbc |
| |
| /Library/Frameworks/Python.framework/Versions/3.10/bin/python3.10 -m venv test-env-310 |
| source test-env-310/bin/activate |
| export PYTHON_VERSION=3.10 |
| ./ci/scripts/python_wheel_unix_test.sh $(pwd) |
| deactivate |
| |
| - name: Test wheel 3.11 |
| run: | |
| pushd adbc |
| |
| /Library/Frameworks/Python.framework/Versions/3.11/bin/python3.11 -m venv test-env-311 |
| source test-env-311/bin/activate |
| export PYTHON_VERSION=3.11 |
| ./ci/scripts/python_wheel_unix_test.sh $(pwd) |
| deactivate |
| |
| - name: Test wheel 3.12 |
| run: | |
| pushd adbc |
| |
| /Library/Frameworks/Python.framework/Versions/3.12/bin/python3.12 -m venv test-env-312 |
| source test-env-312/bin/activate |
| export PYTHON_VERSION=3.12 |
| ./ci/scripts/python_wheel_unix_test.sh $(pwd) |
| deactivate |
| |
| - name: Test wheel 3.13 |
| run: | |
| pushd adbc |
| |
| /Library/Frameworks/Python.framework/Versions/3.13/bin/python3.13 -m venv test-env-313 |
| source test-env-313/bin/activate |
| export PYTHON_VERSION=3.13 |
| ./ci/scripts/python_wheel_unix_test.sh $(pwd) |
| deactivate |
| |
| - name: Test wheel 3.14 |
| run: | |
| pushd adbc |
| |
| /Library/Frameworks/Python.framework/Versions/3.14/bin/python3.14 -m venv test-env-314 |
| source test-env-314/bin/activate |
| export PYTHON_VERSION=3.14 |
| ./ci/scripts/python_wheel_unix_test.sh $(pwd) |
| deactivate |
| |
| - name: Test wheel 3.14t |
| run: | |
| pushd adbc |
| |
| /Library/Frameworks/PythonT.framework/Versions/3.14/bin/python3.14t -m venv test-env-314t |
| source test-env-314t/bin/activate |
| export PYTHON_GIL=0 |
| export PYTHON_VERSION=3.14t |
| ./ci/scripts/python_wheel_unix_test.sh $(pwd) |
| deactivate |
| |
| - name: Assemble logs |
| if: failure() |
| run: | |
| mkdir ~/logs |
| counter=0 |
| for log in $(find "$VCPKG_ROOT" -name 'build-*.log' -or -name 'config-*.log'); do |
| echo cp "$log" ~/logs/$counter-$(basename "$log") |
| cp "$log" ~/logs/$counter-$(basename "$log") |
| counter=$((counter+1)) |
| done |
| |
| - name: Upload failure logs |
| if: failure() |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 |
| with: |
| name: vcpkg-logs-${{ matrix.os }}-${{ matrix.arch }} |
| retention-days: 7 |
| path: ~/logs |
| |
| python-windows: |
| name: "Python ${{ matrix.python_version }} Windows" |
| runs-on: windows-latest |
| needs: |
| - source |
| strategy: |
| fail-fast: false |
| matrix: |
| python_version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.14t"] |
| env: |
| PYTHON_VERSION: "${{ matrix.python_version }}" |
| VCPKG_ROOT: "${{ github.workspace }}/vcpkg" |
| steps: |
| - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 |
| with: |
| name: source |
| |
| - name: Extract source archive |
| shell: bash |
| id: version |
| run: | |
| source_archive=$(echo apache-arrow-adbc-*.tar.gz) |
| VERSION=${source_archive#apache-arrow-adbc-} |
| VERSION=${VERSION%.tar.gz} |
| |
| tar xf apache-arrow-adbc-${VERSION}.tar.gz |
| mv apache-arrow-adbc-${VERSION} adbc |
| |
| source adbc/dev/release/versions.env |
| echo "VERSION=${VERSION_NATIVE}" | tee -a $GITHUB_ENV |
| |
| (. adbc/.env && echo "GO_VERSION=${GO}") >> $GITHUB_ENV |
| |
| - name: Show inputs |
| shell: pwsh |
| run: | |
| echo "upload_artifacts: ${{ inputs.upload_artifacts }}" >> $GITHUB_STEP_SUMMARY |
| echo "schedule: $env:GITHUB_EVENT_SCHEDULE" >> $GITHUB_STEP_SUMMARY |
| echo "ref: $env:GITHUB_REF" >> $GITHUB_STEP_SUMMARY |
| env: |
| GITHUB_EVENT_SCHEDULE: ${{ github.event.schedule }} |
| |
| - name: Install Chocolatey Dependencies |
| shell: pwsh |
| run: | |
| choco install --no-progress -y cmake --installargs 'ADD_CMAKE_TO_PATH=System' |
| choco install --no-progress -y visualcpp-build-tools |
| |
| - name: Install vcpkg |
| shell: bash |
| run: | |
| cd adbc |
| ./ci/scripts/install_vcpkg.sh "$VCPKG_ROOT" |
| |
| - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 |
| with: |
| go-version: "${{ env.GO_VERSION }}" |
| check-latest: true |
| cache: false |
| cache-dependency-path: adbc/go/adbc/go.sum |
| |
| - name: Install Python ${{ matrix.python_version }} |
| uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 |
| with: |
| check-latest: true |
| python-version: ${{ matrix.python_version }} |
| |
| - name: Build wheel |
| # TODO(https://github.com/apache/arrow-adbc/issues/4269): remove cmd.exe usage |
| shell: cmd # zizmor: ignore[misfeature] |
| run: | |
| pushd adbc |
| set SETUPTOOLS_SCM_PRETEND_VERSION=%VERSION% |
| .\ci\scripts\python_wheel_windows_build.bat %cd% %cd%\build |
| popd |
| |
| - name: Archive wheels |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 |
| with: |
| name: python${{ matrix.python_version }}-windows |
| retention-days: 7 |
| path: | |
| adbc/python/adbc_driver_flightsql/repaired_wheels/*.whl |
| adbc/python/adbc_driver_manager/repaired_wheels/*.whl |
| adbc/python/adbc_driver_postgresql/repaired_wheels/*.whl |
| adbc/python/adbc_driver_sqlite/repaired_wheels/*.whl |
| adbc/build/**/*.pdb |
| |
| - name: Test wheel |
| # TODO(https://github.com/apache/arrow-adbc/issues/4269): remove cmd.exe usage |
| shell: cmd # zizmor: ignore[misfeature] |
| env: |
| PYTHON_VERSION: ${{ matrix.python_version }} |
| run: | |
| pushd adbc |
| where python.exe |
| python -m venv venv |
| CALL venv\Scripts\activate.bat |
| .\ci\scripts\python_wheel_windows_test.bat %cd% |
| popd |
| |
| python-sdist: |
| name: "Python sdist" |
| runs-on: ubuntu-latest |
| needs: |
| - source |
| steps: |
| - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 |
| with: |
| name: source |
| |
| - name: Extract source archive |
| run: | |
| source_archive=$(echo apache-arrow-adbc-*.tar.gz) |
| VERSION=${source_archive#apache-arrow-adbc-} |
| VERSION=${VERSION%.tar.gz} |
| |
| tar xf apache-arrow-adbc-${VERSION}.tar.gz |
| mv apache-arrow-adbc-${VERSION} adbc |
| |
| source adbc/dev/release/versions.env |
| echo "VERSION=${VERSION_NATIVE}" | tee -a $GITHUB_ENV |
| |
| - name: Show inputs |
| run: | |
| echo "upload_artifacts: ${GITHUB_EVENT_INPUTS_UPLOAD_ARTIFACTS}" |
| echo "schedule: ${GITHUB_EVENT_SCHEDULE}" |
| echo "ref: ${GITHUB_REF}" |
| env: |
| GITHUB_EVENT_INPUTS_UPLOAD_ARTIFACTS: ${{ github.event.inputs.upload_artifacts }} |
| GITHUB_EVENT_SCHEDULE: ${{ github.event.schedule }} |
| |
| - name: Build sdist |
| run: | |
| pushd adbc |
| docker compose run \ |
| -e SETUPTOOLS_SCM_PRETEND_VERSION=$VERSION \ |
| python-sdist |
| popd |
| |
| - name: Archive sdist |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 |
| with: |
| name: python-sdist |
| retention-days: 7 |
| path: | |
| adbc/python/adbc_driver_flightsql/dist/*.tar.gz |
| adbc/python/adbc_driver_manager/dist/*.tar.gz |
| adbc/python/adbc_driver_postgresql/dist/*.tar.gz |
| adbc/python/adbc_driver_sqlite/dist/*.tar.gz |
| |
| - name: Test sdist |
| run: | |
| pushd adbc |
| docker compose run python-sdist-test |
| popd |
| |
| node-binaries: |
| name: "Node.js ${{ matrix.settings.target }}" |
| runs-on: ${{ matrix.settings.host }} |
| needs: |
| - source |
| strategy: |
| fail-fast: false |
| matrix: |
| settings: |
| - host: macos-15-intel |
| target: x86_64-apple-darwin |
| - host: macos-latest |
| target: aarch64-apple-darwin |
| - host: windows-latest |
| target: x86_64-pc-windows-msvc |
| - host: ubuntu-latest |
| target: x86_64-unknown-linux-gnu |
| - host: ubuntu-24.04-arm |
| target: aarch64-unknown-linux-gnu |
| steps: |
| - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 |
| with: |
| name: source |
| |
| - name: Extract source archive |
| run: | |
| source_archive=$(echo apache-arrow-adbc-*.tar.gz) |
| VERSION=${source_archive#apache-arrow-adbc-} |
| VERSION=${VERSION%.tar.gz} |
| |
| tar xf apache-arrow-adbc-${VERSION}.tar.gz |
| mv apache-arrow-adbc-${VERSION} adbc |
| |
| - name: Setup Node |
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 |
| with: |
| node-version: 22 |
| package-manager-cache: false |
| |
| - name: Setup Rust |
| run: | |
| rustup toolchain install stable --no-self-update |
| rustup default stable |
| rustup target add ${{ matrix.settings.target }} |
| |
| - name: Install Node dependencies |
| working-directory: adbc/javascript |
| run: npm ci |
| |
| - name: Build Node.js binaries |
| working-directory: adbc/javascript |
| run: npx napi build --platform --release --target ${{ matrix.settings.target }} |
| shell: bash |
| |
| - name: Sign binary (macOS) |
| if: runner.os == 'macOS' |
| working-directory: adbc/javascript |
| run: codesign --sign - *.node |
| |
| - name: Upload Node.js binaries |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 |
| with: |
| name: bindings-${{ matrix.settings.target }} |
| path: adbc/javascript/*.node |
| if-no-files-found: error |
| |
| node-dist: |
| name: "Node.js Package" |
| runs-on: ubuntu-latest |
| needs: |
| - source |
| - node-binaries |
| steps: |
| - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 |
| with: |
| name: source |
| |
| - name: Extract source archive |
| run: | |
| source_archive=$(echo apache-arrow-adbc-*.tar.gz) |
| VERSION=${source_archive#apache-arrow-adbc-} |
| VERSION=${VERSION%.tar.gz} |
| |
| tar xf apache-arrow-adbc-${VERSION}.tar.gz |
| mv apache-arrow-adbc-${VERSION} adbc |
| |
| - name: Setup Node |
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 |
| with: |
| node-version: 22 |
| package-manager-cache: false |
| |
| - name: Setup Rust |
| run: | |
| rustup toolchain install stable --no-self-update |
| rustup default stable |
| |
| - name: Install Node dependencies |
| working-directory: adbc/javascript |
| run: npm ci |
| |
| - name: Build Node.js |
| working-directory: adbc/javascript |
| run: npm run build:ci && npm run build:ts |
| |
| - name: Download Node.js binaries |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 |
| with: |
| pattern: bindings-* |
| path: adbc/javascript/artifacts |
| merge-multiple: true |
| |
| - name: Package Node.js artifacts |
| working-directory: adbc/javascript |
| env: |
| HUSKY: "0" |
| run: | |
| npx napi artifacts |
| # Pack the main package |
| npm pack |
| # Pack the platform-specific packages |
| for dir in npm/*; do |
| npm pack "./$dir" |
| done |
| |
| - name: Upload Node.js packages |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 |
| with: |
| name: node-packages |
| retention-days: 7 |
| path: | |
| adbc/javascript/*.tgz |
| |
| |
| release: |
| name: "Create release" |
| runs-on: ubuntu-latest |
| if: startsWith(github.ref, 'refs/tags/') |
| needs: |
| - csharp |
| - docs |
| - source |
| - java |
| - linux |
| - node-dist |
| - python-manylinux |
| - python-macos |
| - python-windows |
| - python-sdist |
| permissions: |
| contents: write |
| steps: |
| - name: Get All Artifacts |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 |
| with: |
| path: release-artifacts |
| - name: Release |
| run: | |
| RELEASE_TAG=${GITHUB_REF#refs/*/} |
| |
| # Deduplicate wheels built in different jobs with same tag |
| # Include .pdb files since those are debug symbols for Windows |
| # wheels |
| mkdir -p upload-staging |
| find ./release-artifacts/ \ |
| '(' \ |
| -name docs.tgz -or \ |
| -name '*.jar' -or \ |
| -name '*.nupkg' -or \ |
| -name '*.snupkg' -or \ |
| -name '*.pdb' -or \ |
| -name '*.pom' -or \ |
| -name '*.whl' -or \ |
| -name 'adbc_*.tar.gz' -or \ |
| -name 'almalinux-*.tar.gz' -or \ |
| -name 'apache-arrow-adbc-*.tar.gz' -or \ |
| -name 'debian-*.tar.gz' -or \ |
| -name 'ubuntu-*.tar.gz' \ |
| ')' \ |
| -exec mv '{}' upload-staging \; |
| |
| # Handle Node.js packages (in tarball form) |
| find ./release-artifacts/ -name 'apache-arrow-adbc-driver-manager-*.tgz' -exec mv '{}' upload-staging \; |
| |
| UPLOAD=$(find upload-staging -type f | sort | uniq) |
| |
| echo "Uploading files:" >> $GITHUB_STEP_SUMMARY |
| echo "${UPLOAD}" >> $GITHUB_STEP_SUMMARY |
| |
| gh release create "${RELEASE_TAG}" \ |
| --repo ${{ github.repository }} \ |
| --prerelease \ |
| --title "ADBC Libraries ${RELEASE_TAG}" \ |
| ${UPLOAD} |
| env: |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| |
| upload-anaconda: |
| name: "Upload packages to Anaconda.org" |
| runs-on: ubuntu-latest |
| if: github.ref == 'refs/heads/main' && (github.event.schedule || inputs.upload_artifacts) |
| needs: |
| - python-conda-linux |
| # TODO(apache/arrow-adbc#468): re-enable |
| # - python-conda-macos |
| defaults: |
| run: |
| shell: bash -l -eo pipefail {0} |
| steps: |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| with: |
| fetch-depth: 0 |
| persist-credentials: true |
| submodules: recursive |
| - name: Get All Artifacts |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 |
| with: |
| path: conda-packages |
| - uses: conda-incubator/setup-miniconda@8ee1f361103df19b6f8c8655fd3967a8ecb162d5 # v4.0.1 |
| with: |
| miniforge-version: latest |
| use-only-tar-bz2: false |
| use-mamba: true |
| - name: Install Dependencies |
| run: | |
| mamba install -c conda-forge anaconda-client |
| - name: Clean |
| continue-on-error: true |
| run: | |
| # Clean all existing packages, OK if we fail |
| ./ci/scripts/python_conda_clean.sh |
| env: |
| ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} # zizmor: ignore[secrets-outside-env] |
| - name: Upload |
| run: | |
| ls -laR conda-packages |
| # Upload fresh packages |
| ./ci/scripts/python_conda_upload.sh conda-packages/python-*-conda/*/*.tar.bz2 |
| env: |
| ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} # zizmor: ignore[secrets-outside-env] |
| |
| # This takes a while due to sleeping to avoid rate limits, so run it first |
| # and in parallel with the builds |
| clean-gemfury: |
| name: "Remove old Gemfury packages" |
| runs-on: ubuntu-latest |
| if: github.ref_name == 'main' && (github.event.schedule || inputs.upload_artifacts) |
| steps: |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| with: |
| persist-credentials: false |
| - name: Install Python |
| uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 |
| with: |
| python-version: '3.13' |
| - name: Clean |
| run: | |
| pip install requests |
| ./ci/scripts/gemfury_clean.py |
| env: |
| GEMFURY_API_TOKEN: ${{ secrets.GEMFURY_API_TOKEN }} # zizmor: ignore[secrets-outside-env] |
| |
| upload-gemfury: |
| name: "Upload packages to Gemfury" |
| runs-on: ubuntu-latest |
| if: github.ref == 'refs/heads/main' && (github.event.schedule || inputs.upload_artifacts) |
| needs: |
| - clean-gemfury |
| - java |
| - node-dist |
| - python-manylinux |
| - python-macos |
| - python-windows |
| - python-sdist |
| steps: |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| with: |
| fetch-depth: 0 |
| persist-credentials: true |
| submodules: recursive |
| - name: Get All Artifacts |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 |
| with: |
| path: nightly-artifacts |
| - name: Upload |
| run: | |
| # Deduplicate wheels built in different jobs with same tag |
| mkdir -p upload-staging |
| find ./nightly-artifacts/ \ |
| '(' \ |
| -name '*.jar' -or \ |
| -name '*.pom' -or \ |
| -name '*.whl' -or \ |
| -name 'adbc_*.tar.gz' -or \ |
| -name 'apache-arrow-adbc-driver-manager-*.tgz' \ |
| ')' \ |
| -exec mv '{}' upload-staging \; |
| |
| # Java |
| ./ci/scripts/java_jar_upload.sh upload-staging/*.pom |
| # Python |
| ./ci/scripts/python_wheel_upload.sh upload-staging/adbc_*.tar.gz upload-staging/*.whl |
| # Node.js |
| ./ci/scripts/node_npm_upload.sh upload-staging |
| env: |
| GEMFURY_PUSH_TOKEN: ${{ secrets.GEMFURY_PUSH_TOKEN }} # zizmor: ignore[secrets-outside-env] |
| NPM_REGISTRY: https://npm.fury.io/arrow-adbc-nightlies/ |
| NPM_TOKEN: ${{ secrets.GEMFURY_PUSH_TOKEN }} # zizmor: ignore[secrets-outside-env] |