kou commented on code in PR #49603: URL: https://github.com/apache/arrow/pull/49603#discussion_r3330348715
########## .github/workflows/package_odbc.yml: ########## @@ -0,0 +1,190 @@ +# 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: Package Apache Arrow Flight SQL ODBC Driver + +on: + push: + paths: + - '.github/actions/odbc-windows/action.yml' + - '.github/workflows/check_labels.yml' + - '.github/workflows/cpp_extra.yml' + - '.github/workflows/package_odbc.yml' + - '.github/workflows/report_ci.yml' + - 'ci/scripts/ccache_setup.sh' + - 'ci/scripts/cpp_*' + - 'ci/scripts/download_tz_database.sh' + - 'ci/scripts/install_ccache.sh' + - 'cpp/**' + - 'format/Flight.proto' + - 'testing' + tags: + - "apache-arrow-*-rc*" + workflow_dispatch: + inputs: + odbc_release_step: + description: 'ODBC MSI release step' + required: false + default: false + type: boolean + +concurrency: + group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }} + cancel-in-progress: true + +permissions: + actions: read + contents: read + pull-requests: read + +jobs: + # GH-49537 CPack only packages from a single build directory, so the build + # cannot be reused and we need to rebuild the MSI in a separate workflow. This + # means both the odbc-msvc-upload-dll and odbc-msvc-upload-msi jobs do a full build. + odbc-msvc-upload-dll: + name: ODBC Windows Upload Unsigned DLL + runs-on: windows-2022 + timeout-minutes: 240 + permissions: + packages: write + env: &odbc_msvc_env + ARROW_BUILD_SHARED: ON + ARROW_BUILD_STATIC: OFF + ARROW_BUILD_TESTS: OFF + ARROW_BUILD_TYPE: release + # Turn Arrow CSV off to disable `find_package(Arrow)` check on MSVC CI. + # GH-49050 TODO: enable `find_package(Arrow)` check on MSVC CI. + ARROW_CSV: OFF + ARROW_DEPENDENCY_SOURCE: VCPKG + ARROW_FLIGHT_SQL_ODBC: ON + ARROW_FLIGHT_SQL_ODBC_INSTALLER: ON + ARROW_HOME: /usr + CMAKE_GENERATOR: Ninja + CMAKE_INSTALL_PREFIX: /usr + VCPKG_BINARY_SOURCES: 'clear;nugettimeout,600;nuget,GitHub,readwrite' + VCPKG_DEFAULT_TRIPLET: x64-windows + steps: + - name: Checkout Arrow + uses: actions/checkout@v6 + with: + persist-credentials: false + fetch-depth: 0 + submodules: recursive + - name: Build ODBC Windows + uses: ./.github/actions/odbc-windows + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + - name: Rename Unsigned ODBC DLL + run: | + Rename-Item ` + -Path build/cpp/${{ env.ARROW_BUILD_TYPE }}/arrow_flight_sql_odbc.dll ` + -NewName arrow_flight_sql_odbc_unsigned.dll + - name: Upload ODBC DLL to the job + uses: actions/upload-artifact@v7 + with: + name: flight-sql-odbc-dll + path: build/cpp/${{ env.ARROW_BUILD_TYPE }}/arrow_flight_sql_odbc_unsigned.dll + if-no-files-found: error + + odbc-dll-release: + needs: odbc-msvc-upload-dll + name: Upload Unsigned ODBC DLL to Release + runs-on: ubuntu-latest + permissions: + # Upload to GitHub Release + contents: write + steps: + - name: Checkout Arrow + uses: actions/checkout@v6 + with: + persist-credentials: false + fetch-depth: 0 + submodules: recursive + - name: Download the artifacts + uses: actions/download-artifact@v8 + with: + name: flight-sql-odbc-dll + - 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 \ + arrow_flight_sql_odbc_unsigned.dll + + odbc-msvc-upload-msi: + name: ODBC Windows Build & Upload Unsigned MSI + runs-on: windows-2022 + if: inputs.odbc_release_step Review Comment: We may be able to remove all `inputs` for `workflow_dispatch` and just check whether this workflow is triggered by `workflow_dispatch` or not. ########## .github/workflows/package_odbc.yml: ########## @@ -0,0 +1,190 @@ +# 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: Package Apache Arrow Flight SQL ODBC Driver + +on: + push: + paths: + - '.github/actions/odbc-windows/action.yml' + - '.github/workflows/check_labels.yml' + - '.github/workflows/cpp_extra.yml' + - '.github/workflows/package_odbc.yml' + - '.github/workflows/report_ci.yml' Review Comment: ```suggestion ``` ########## .github/workflows/package_odbc.yml: ########## @@ -0,0 +1,190 @@ +# 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: Package Apache Arrow Flight SQL ODBC Driver + +on: + push: + paths: + - '.github/actions/odbc-windows/action.yml' + - '.github/workflows/check_labels.yml' + - '.github/workflows/cpp_extra.yml' + - '.github/workflows/package_odbc.yml' + - '.github/workflows/report_ci.yml' + - 'ci/scripts/ccache_setup.sh' + - 'ci/scripts/cpp_*' + - 'ci/scripts/download_tz_database.sh' + - 'ci/scripts/install_ccache.sh' + - 'cpp/**' + - 'format/Flight.proto' + - 'testing' + tags: + - "apache-arrow-*-rc*" + workflow_dispatch: + inputs: + odbc_release_step: + description: 'ODBC MSI release step' + required: false + default: false + type: boolean + +concurrency: + group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }} + cancel-in-progress: true + +permissions: + actions: read + contents: read + pull-requests: read + +jobs: + # GH-49537 CPack only packages from a single build directory, so the build + # cannot be reused and we need to rebuild the MSI in a separate workflow. This + # means both the odbc-msvc-upload-dll and odbc-msvc-upload-msi jobs do a full build. + odbc-msvc-upload-dll: + name: ODBC Windows Upload Unsigned DLL + runs-on: windows-2022 + timeout-minutes: 240 + permissions: + packages: write + env: &odbc_msvc_env + ARROW_BUILD_SHARED: ON + ARROW_BUILD_STATIC: OFF + ARROW_BUILD_TESTS: OFF + ARROW_BUILD_TYPE: release + # Turn Arrow CSV off to disable `find_package(Arrow)` check on MSVC CI. + # GH-49050 TODO: enable `find_package(Arrow)` check on MSVC CI. + ARROW_CSV: OFF + ARROW_DEPENDENCY_SOURCE: VCPKG + ARROW_FLIGHT_SQL_ODBC: ON + ARROW_FLIGHT_SQL_ODBC_INSTALLER: ON + ARROW_HOME: /usr + CMAKE_GENERATOR: Ninja + CMAKE_INSTALL_PREFIX: /usr + VCPKG_BINARY_SOURCES: 'clear;nugettimeout,600;nuget,GitHub,readwrite' + VCPKG_DEFAULT_TRIPLET: x64-windows + steps: + - name: Checkout Arrow + uses: actions/checkout@v6 + with: + persist-credentials: false + fetch-depth: 0 + submodules: recursive + - name: Build ODBC Windows + uses: ./.github/actions/odbc-windows + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + - name: Rename Unsigned ODBC DLL + run: | + Rename-Item ` + -Path build/cpp/${{ env.ARROW_BUILD_TYPE }}/arrow_flight_sql_odbc.dll ` + -NewName arrow_flight_sql_odbc_unsigned.dll + - name: Upload ODBC DLL to the job + uses: actions/upload-artifact@v7 + with: + name: flight-sql-odbc-dll + path: build/cpp/${{ env.ARROW_BUILD_TYPE }}/arrow_flight_sql_odbc_unsigned.dll + if-no-files-found: error + + odbc-dll-release: Review Comment: Could you run this only for `apache-arrow-*-rc*` tag? ########## .github/workflows/cpp_extra.yml: ########## @@ -95,9 +95,10 @@ jobs: name: ${{ matrix.title }} runs-on: ${{ matrix.runs-on }} if: >- + github.event_name != 'workflow_dispatch' && ( needs.check-labels.outputs.force == 'true' || contains(fromJSON(needs.check-labels.outputs.ci-extra-labels || '[]'), 'CI: Extra') || - contains(fromJSON(needs.check-labels.outputs.ci-extra-labels || '[]'), 'CI: Extra: C++') + contains(fromJSON(needs.check-labels.outputs.ci-extra-labels || '[]'), 'CI: Extra: C++')) Review Comment: Can we revert this change? We don't need to use `workflow_dispatch` for `cpp_extra.yml` now, right? ########## .github/workflows/package_odbc.yml: ########## @@ -0,0 +1,190 @@ +# 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: Package Apache Arrow Flight SQL ODBC Driver + +on: + push: + paths: + - '.github/actions/odbc-windows/action.yml' + - '.github/workflows/check_labels.yml' + - '.github/workflows/cpp_extra.yml' Review Comment: ```suggestion ``` ########## dev/release/07-flightsqlodbc-upload.sh: ########## @@ -136,15 +136,15 @@ if [ "${PHASE_SIGN_DLL}" -gt 0 ]; then fi if [ "${PHASE_BUILD_MSI}" -gt 0 ]; then - echo "[4/8 Triggering odbc_release_step in cpp_extra.yml workflow..." - gh workflow run cpp_extra.yml \ + echo "[4/8] Triggering odbc_release_step in package_odbc.yml workflow..." + gh workflow run package_odbc.yml \ --repo "${GITHUB_REPOSITORY}" \ --ref "${tag}" \ --field odbc_release_step=true echo "[5/8 Waiting for workflow to complete. This can take a very long time..." Review Comment: ```suggestion echo "[5/8] Waiting for workflow to complete. This can take a very long time..." ``` ########## .github/workflows/package_odbc.yml: ########## Review Comment: Could you run this only when * `workflow_dispatch`, * `apache-arrow-*-rc*` tag or * `Extra: Package: ODBC` label ? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
