fix(bq_driver): Update windows pipeline#1530
Conversation
| env: | ||
| DRIVER_ARCH: ${{ matrix.arch }} | ||
| BUILD_SHARD: ${{ matrix.shard }} | ||
| ODBC_GOOGLE_DRIVER_VERSION: 1.1.3 |
There was a problem hiding this comment.
no need to specify this version itself, can give any default version
| } | ||
| if($env:BUILD_SHARD -eq 'Core'){ | ||
| $env:ODBC_DRIVER_MSI_NAME = "SimbaODBCDriverforGoogleBigQuery${arch}_${env:ODBC_DRIVER_VERSION}.msi" | ||
| }else{ |
There was a problem hiding this comment.
instead of separate install step for our driver and existing driver, can build the driver upload to GCS and download and install from path here itself
| echo "Building version: $version" | ||
| cmake -S . -B build \ | ||
| -G Ninja \ | ||
| -DCMAKE_BUILD_TYPE=debug \ |
There was a problem hiding this comment.
why do we need to specify, debug build type, it will anyway build in debug
d39454d to
616eb46
Compare
e8a624a to
51e8325
Compare
| @@ -27,7 +27,6 @@ if ($CI_CLOUDBUILD_BUILDS_LIB_ODBC_DRIVER_INSTALL_SH__ -ne $null -and ++$CI_CLOU | |||
| # Set Environment Variables | |||
There was a problem hiding this comment.
Let's modify this script to read the driver version for both the existing and our driver. Don't rely on ODBC_DRIVER_VERSION env.
| if [ $? -eq 0 ]; then | ||
| echo "Copied $f successfully." | ||
| else | ||
| echo "Failed to copy $f." |
There was a problem hiding this comment.
This step should fail in case of any error.
| echo "Failed to copy $f." | ||
| fi | ||
| else | ||
| echo "$f not found in source directory: $SOURCE_DIR" |
There was a problem hiding this comment.
This step should fail in case of any error.
|
|
||
| for f in "${FILES[@]}"; do | ||
| if [ -f "$SOURCE_DIR/$f" ]; then | ||
| cp -v "$SOURCE_DIR/$f" "$DEST_DIR/" |
| sed -i '/"arrow",/d' vcpkg.json | ||
| fi | ||
|
|
||
| ci/gha/builds/windows-cmake-integration.sh |
There was a problem hiding this comment.
We can directly run the tests built previously.
| export CLOUDSDK_PYTHON="${{ steps.py311.outputs.python-path }}" | ||
| export CMAKE_OUT="c:/b" | ||
| export SCCACHE_IGNORE_SERVER_IO_ERROR=1 | ||
| unset SCCACHE_GCS_BUCKET SCCACHE_GCS_KEY_PREFIX SCCACHE_GCS_RW_MODE |
There was a problem hiding this comment.
Add a TODO here to justify this. We shouldn't be disabling sccache.
|
|
||
| export MSVC_VERSION="${{ matrix.msvc }}" | ||
| export BRANCH_IDENTIFIER=$(echo "${{ github.ref_name }}" | tr '[:punct:]' '_') | ||
| export CPP_BIGQUERY_ODBC_TEST_TABLE_PREFIX="windows_${BRANCH_IDENTIFIER}_${MSVC_VERSION//[-:;.,?\/]/_}_${DRIVER_ARCH}_$BUILD_SHARD" |
There was a problem hiding this comment.
This is not needed for building the driver.
| -DVCPKG_TARGET_TRIPLET="${VCPKG_TRIPLET}" \ | ||
| -DODBC_EXAMPLES=OFF \ | ||
| -DODBC_UNIT_TESTING=OFF \ | ||
| -DODBC_INTEGRATION_TESTING=OFF \ |
There was a problem hiding this comment.
ODBC_INTEGRATION_TESTING=ON so we can run the tests later.
| -DODBC_UNIT_TESTING=OFF \ | ||
| -DODBC_INTEGRATION_TESTING=OFF \ | ||
| -DCLIENT_LIBRARY_INTEGRATION_TESTING=OFF \ | ||
| -DBQ_DRIVER_INTEGRATION_TESTS=OFF \ |
There was a problem hiding this comment.
BQ_DRIVER_INTEGRATION_TESTS=ON so we can run the tests later.
| if: env.BUILD_SHARD == 'BqDriver' | ||
| shell: pwsh | ||
| env: | ||
| GCS_BUCKET: bq-dev-tools-testing-drivers |
There was a problem hiding this comment.
Use odbc-integration-builds bucket to push the artifacts.
| $MSI_DIR = "ci/installer/ODBCDriverForBigQuery/bin/Release/en-us" | ||
| $MSI_FILE = "ODBCDriverforBigQuery_windows_$($env:DRIVER_ARCH)_${{ env.ODBC_GOOGLE_DRIVER_VERSION }}.msi" | ||
|
|
||
| Write-Output "Uploading $MSI_FILE to gs://$env:GCS_BUCKET/odbc-windows/$arch/ ..." |
There was a problem hiding this comment.
The folder inside the GCS_BUCKET should be the branch name. Create the folder if it doesn't exist. x64 and x32 installers for a branch will be pushed to the same folder.
51e8325 to
329d2af
Compare
| sed -i '/"arrow",/d' vcpkg.json | ||
| fi | ||
| ci/gha/builds/windows-cmake-integration.sh | ||
| if [ "$BUILD_SHARD" == "BqDriver" ]; then |
There was a problem hiding this comment.
why do we need a check here? we can remove the file windows-cmake-integration.sh as that is not needed anymore
329d2af to
afef2a8
Compare
afef2a8 to
47add82
Compare
47add82 to
159c903
Compare
In this PR, we update the Windows GHA pipeline. Previously, the pipeline relied on a pre-uploaded installer, which was downloaded and used for integration testing. With this change, we now build the installer within the pipeline itself and use the generated artifact for running the integration test cases.
Gha & macos pipe check here.