diff --git a/.github/workflows/cpp_extra.yml b/.github/workflows/cpp_extra.yml index 49995752fab..ecef5558163 100644 --- a/.github/workflows/cpp_extra.yml +++ b/.github/workflows/cpp_extra.yml @@ -457,6 +457,25 @@ jobs: name: flight-sql-odbc-msi-installer path: build/cpp/Apache Arrow Flight SQL ODBC-*-win64.msi if-no-files-found: error + - name: Install ODBC MSI + shell: cmd + run: | + cd build/cpp + for %%f in ("Apache Arrow Flight SQL ODBC-*-win64.msi") do ( + echo Installing %%f silently with logs + msiexec /i "%%f" /qn /l*v "odbc-install.log" & type "odbc-install.log" + ) + - name: Check ODBC DLL installation + shell: cmd + run: | + for /d %%D in ("C:\Program Files\Apache Arrow Flight SQL ODBC *") do ( + if exist "%%D\bin" ( + tree "%%D\bin" /f + if exist "%%D\bin\arrow_flight_sql_odbc.dll" exit 0 + ) + ) + echo ODBC DLL not found + exit 1 odbc-nightly: needs: odbc @@ -494,6 +513,59 @@ jobs: remote_key: ${{ secrets.NIGHTLIES_RSYNC_KEY }} remote_host_key: ${{ secrets.NIGHTLIES_RSYNC_HOST_KEY }} + odbc-check-tags: + needs: odbc + name: ODBC Check RC Tag + runs-on: ubuntu-latest + outputs: + rc-tag: ${{ steps.check-rc.outputs.rc-tag }} + if: github.ref_type == 'tag' && github.repository == 'apache/arrow' + steps: + - name: Check Arrow RC Tag + id: check-rc + run: | + if [[ "${GITHUB_REF_NAME}" =~ ^apache-arrow-.*-rc.*$ ]]; then + echo "RC tag found" + echo "rc-tag=true" >> "${GITHUB_OUTPUT}" + else + echo "RC tag not found" + echo "rc-tag=false" >> "${GITHUB_OUTPUT}" + fi + + odbc-release: + needs: odbc-check-tags + name: ODBC release + runs-on: ubuntu-latest + if: needs.odbc-check-tags.outputs.rc-tag == 'true' + permissions: + # Upload to GitHub Release + contents: write + steps: + - name: Checkout Arrow + uses: actions/checkout@v6 + with: + fetch-depth: 0 + submodules: recursive + - name: Download the artifacts + uses: actions/download-artifact@v7 + with: + name: flight-sql-odbc-msi-installer + # Upload ODBC as GitHub release if release candidate tag is used + - name: Wait for creating GitHub Release + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + dev/release/utils-watch-gh-workflow.sh \ + ${GITHUB_REF_NAME} \ + release_candidate.yml + - name: Upload the artifacts to GitHub Release + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh release upload ${GITHUB_REF_NAME} \ + --clobber \ + "Apache Arrow Flight SQL ODBC"-*-win64.msi + report-extra-cpp: if: github.event_name == 'schedule' && always() needs: diff --git a/dev/release/04-binary-download.sh b/dev/release/04-binary-download.sh index 68e1664b599..0d26c6952e5 100755 --- a/dev/release/04-binary-download.sh +++ b/dev/release/04-binary-download.sh @@ -46,7 +46,7 @@ tag="apache-arrow-${version_with_rc}" archery crossbow download-artifacts --no-fetch ${CROSSBOW_JOB_ID} "$@" -# Download Linux packages. +# Download Linux packages and ODBC MSI. gh release download "${tag}" \ --dir "packages/${CROSSBOW_JOB_ID}" \ --pattern "almalinux-*.tar.gz" \ @@ -54,5 +54,6 @@ gh release download "${tag}" \ --pattern "centos-*.tar.gz" \ --pattern "debian-*.tar.gz" \ --pattern "ubuntu-*.tar.gz" \ + --pattern "Apache.Arrow.Flight.SQL.ODBC-*-win64.msi" \ --repo "${REPOSITORY:-apache/arrow}" \ --skip-existing diff --git a/dev/release/05-binary-upload.sh b/dev/release/05-binary-upload.sh index f628cce0e0b..055cd714e6c 100755 --- a/dev/release/05-binary-upload.sh +++ b/dev/release/05-binary-upload.sh @@ -67,6 +67,7 @@ cd "${SOURCE_DIR}" : "${UPLOAD_CENTOS:=${UPLOAD_DEFAULT}}" : "${UPLOAD_DEBIAN:=${UPLOAD_DEFAULT}}" : "${UPLOAD_DOCS:=${UPLOAD_DEFAULT}}" +: "${UPLOAD_ODBC:=${UPLOAD_DEFAULT}}" : "${UPLOAD_PYTHON:=${UPLOAD_DEFAULT}}" : "${UPLOAD_R:=${UPLOAD_DEFAULT}}" : "${UPLOAD_UBUNTU:=${UPLOAD_DEFAULT}}" @@ -108,6 +109,10 @@ upload_to_github_release() { if [ "${UPLOAD_DOCS}" -gt 0 ]; then upload_to_github_release docs "${ARROW_ARTIFACTS_DIR}"/*-docs/* fi +if [ "${UPLOAD_ODBC}" -gt 0 ]; then + upload_to_github_release odbc \ + "${ARROW_ARTIFACTS_DIR}"/"Apache.Arrow.Flight.SQL.ODBC"-*-win64.msi +fi if [ "${UPLOAD_PYTHON}" -gt 0 ]; then upload_to_github_release python \ "${ARROW_ARTIFACTS_DIR}"/{python-sdist,wheel-*}/*