Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 96 additions & 0 deletions .github/actions/odbc-windows/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# 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: ODBC Windows Reusable
inputs:
github-token:
description: 'GITHUB_TOKEN for vcpkg caching'
required: true
runs:
using: "composite"
steps:
- name: Disable Crash Dialogs
shell: pwsh
run: |
reg add `
"HKCU\SOFTWARE\Microsoft\Windows\Windows Error Reporting" `
/v DontShowUI `
/t REG_DWORD `
/d 1 `
/f
- name: Download Timezone Database
shell: bash
run: ci/scripts/download_tz_database.sh
- name: Install ccache
shell: bash
run: |
ci/scripts/install_ccache.sh 4.12.1 /usr
- name: Setup ccache
shell: bash
run: |
ci/scripts/ccache_setup.sh
- name: ccache info
id: ccache-info
shell: bash
run: |
echo "cache-dir=$(ccache --get-config cache_dir)" >> $GITHUB_OUTPUT
- name: Cache ccache
uses: actions/cache@v5
with:
path: ${{ steps.ccache-info.outputs.cache-dir }}
key: cpp-odbc-ccache-windows-x64-${{ hashFiles('cpp/**') }}
restore-keys: cpp-odbc-ccache-windows-x64-
- name: Checkout vcpkg
uses: actions/checkout@v6
with:
persist-credentials: false
fetch-depth: 0
path: vcpkg
repository: microsoft/vcpkg
Comment thread
alinaliBQ marked this conversation as resolved.
- name: Bootstrap vcpkg
shell: pwsh
run: |
vcpkg\bootstrap-vcpkg.bat
$VCPKG_ROOT = $(Resolve-Path -LiteralPath "vcpkg").ToString()
Write-Output ${VCPKG_ROOT} | `
Out-File -FilePath ${Env:GITHUB_PATH} -Encoding utf8 -Append
Write-Output "VCPKG_ROOT=${VCPKG_ROOT}" | `
Out-File -FilePath ${Env:GITHUB_ENV} -Encoding utf8 -Append
- name: Setup NuGet credentials for vcpkg caching
shell: bash
run: |
$(vcpkg fetch nuget | tail -n 1) \
sources add \
-source "https://nuget.pkg.github.com/$GITHUB_REPOSITORY_OWNER/index.json" \
-storepasswordincleartext \
-name "GitHub" \
-username "$GITHUB_REPOSITORY_OWNER" \
-password "${{ inputs.github-token }}"
$(vcpkg fetch nuget | tail -n 1) \
setapikey "${{ inputs.github-token }}" \
-source "https://nuget.pkg.github.com/$GITHUB_REPOSITORY_OWNER/index.json"
- name: Build
shell: cmd
run: |
set VCPKG_ROOT_KEEP=%VCPKG_ROOT%
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
set VCPKG_ROOT=%VCPKG_ROOT_KEEP%
bash -c "ci/scripts/cpp_build.sh $(pwd) $(pwd)/build"
- name: Register Flight SQL ODBC Driver
shell: cmd
run: |
call "cpp\src\arrow\flight\sql\odbc\tests\install_odbc.cmd" ${{ github.workspace }}\build\cpp\%ARROW_BUILD_TYPE%\arrow_flight_sql_odbc.dll
127 changes: 17 additions & 110 deletions .github/workflows/cpp_extra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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++'))
timeout-minutes: 75
strategy:
fail-fast: false
Expand Down Expand Up @@ -184,9 +185,10 @@ jobs:
msvc-arm64:
needs: check-labels
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++'))
name: ARM64 Windows 11 MSVC
uses: ./.github/workflows/cpp_windows.yml
with:
Expand All @@ -199,9 +201,10 @@ jobs:
name: JNI ${{ matrix.platform.runs-on }} ${{ matrix.platform.arch }}
runs-on: ${{ matrix.platform.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++'))
timeout-minutes: 240
permissions:
# This is for using GitHub Packages for vcpkg cache
Expand Down Expand Up @@ -264,9 +267,10 @@ jobs:
name: JNI macOS
runs-on: macos-14
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++'))
timeout-minutes: 45
env:
MACOSX_DEPLOYMENT_TARGET: "14.0"
Expand Down Expand Up @@ -410,9 +414,10 @@ jobs:
name: ODBC ${{ matrix.build-type }} ${{ matrix.architecture }} macOS ${{ matrix.macos-version }}
runs-on: macos-${{ matrix.macos-version }}
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++'))
timeout-minutes: 120
strategy:
fail-fast: false
Expand Down Expand Up @@ -536,13 +541,14 @@ jobs:
name: ODBC Windows
runs-on: windows-2022
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++'))
timeout-minutes: 240
permissions:
packages: write
env:
env: &odbc_msvc_env
ARROW_BUILD_SHARED: ON
ARROW_BUILD_STATIC: OFF
ARROW_BUILD_TESTS: ON
Expand All @@ -559,81 +565,16 @@ jobs:
VCPKG_BINARY_SOURCES: 'clear;nugettimeout,600;nuget,GitHub,readwrite'
VCPKG_DEFAULT_TRIPLET: x64-windows
steps:
- name: Disable Crash Dialogs
run: |
reg add `
"HKCU\SOFTWARE\Microsoft\Windows\Windows Error Reporting" `
/v DontShowUI `
/t REG_DWORD `
/d 1 `
/f
- name: Checkout Arrow
uses: actions/checkout@v6
with:
persist-credentials: false
fetch-depth: 0
submodules: recursive
- name: Download Timezone Database
shell: bash
run: ci/scripts/download_tz_database.sh
- name: Install ccache
shell: bash
run: |
ci/scripts/install_ccache.sh 4.12.1 /usr
- name: Setup ccache
shell: bash
run: |
ci/scripts/ccache_setup.sh
- name: ccache info
id: ccache-info
shell: bash
run: |
echo "cache-dir=$(ccache --get-config cache_dir)" >> $GITHUB_OUTPUT
- name: Cache ccache
uses: actions/cache@v5
- name: Build ODBC Windows
uses: ./.github/actions/odbc-windows
with:
path: ${{ steps.ccache-info.outputs.cache-dir }}
key: cpp-odbc-ccache-windows-x64-${{ hashFiles('cpp/**') }}
restore-keys: cpp-odbc-ccache-windows-x64-
- name: Checkout vcpkg
uses: actions/checkout@v6
with:
persist-credentials: false
fetch-depth: 0
path: vcpkg
repository: microsoft/vcpkg
- name: Bootstrap vcpkg
run: |
vcpkg\bootstrap-vcpkg.bat
$VCPKG_ROOT = $(Resolve-Path -LiteralPath "vcpkg").ToString()
Write-Output ${VCPKG_ROOT} | `
Out-File -FilePath ${Env:GITHUB_PATH} -Encoding utf8 -Append
Write-Output "VCPKG_ROOT=${VCPKG_ROOT}" | `
Out-File -FilePath ${Env:GITHUB_ENV} -Encoding utf8 -Append
- name: Setup NuGet credentials for vcpkg caching
shell: bash
run: |
$(vcpkg fetch nuget | tail -n 1) \
sources add \
-source "https://nuget.pkg.github.com/$GITHUB_REPOSITORY_OWNER/index.json" \
-storepasswordincleartext \
-name "GitHub" \
-username "$GITHUB_REPOSITORY_OWNER" \
-password "${{ secrets.GITHUB_TOKEN }}"
$(vcpkg fetch nuget | tail -n 1) \
setapikey "${{ secrets.GITHUB_TOKEN }}" \
-source "https://nuget.pkg.github.com/$GITHUB_REPOSITORY_OWNER/index.json"
- name: Build
shell: cmd
run: |
set VCPKG_ROOT_KEEP=%VCPKG_ROOT%
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
set VCPKG_ROOT=%VCPKG_ROOT_KEEP%
bash -c "ci/scripts/cpp_build.sh $(pwd) $(pwd)/build"
- name: Register Flight SQL ODBC Driver
shell: cmd
run: |
call "cpp\src\arrow\flight\sql\odbc\tests\install_odbc.cmd" ${{ github.workspace }}\build\cpp\%ARROW_BUILD_TYPE%\arrow_flight_sql_odbc.dll
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Test
shell: cmd
run: |
Expand All @@ -656,7 +597,7 @@ jobs:
wix --version
cd build/cpp
cpack
- name: Upload the artifacts to the job
- name: Upload ODBC MSI to the job
uses: actions/upload-artifact@v7
with:
name: flight-sql-odbc-msi-installer
Expand Down Expand Up @@ -745,40 +686,6 @@ jobs:
remote_key: ${{ secrets.NIGHTLIES_RSYNC_KEY }}
remote_host_key: ${{ secrets.NIGHTLIES_RSYNC_HOST_KEY }}

odbc-release:
Comment thread
amoeba marked this conversation as resolved.
needs: odbc-msvc
name: ODBC release
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref_name, 'apache-arrow-') && contains(github.ref_name, '-rc') }}
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-msi-installer
- 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:
Expand Down
Loading
Loading