Skip to content
Draft
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
4 changes: 2 additions & 2 deletions .github/workflows/windows-cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,23 @@
ODBC_GOOGLE_DRIVER_VERSION: 99.99.99
VCPKG_TRIPLET: ${{ matrix.arch }}-windows
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

Check warning on line 35 in .github/workflows/windows-cmake.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

ref-version-mismatch

windows-cmake.yml:35: action's hash pin has mismatched or missing version comment: points to commit 11d5960a3267
with:
ref: ${{ inputs.checkout-ref }}
- uses: google-github-actions/auth@v2

Check failure on line 38 in .github/workflows/windows-cmake.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/unpinned-uses

unpinned action reference: action is not pinned to a hash (required by blanket policy)

Check failure on line 38 in .github/workflows/windows-cmake.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

unpinned-uses

windows-cmake.yml:38: unpinned action reference: action is not pinned to a hash (required by blanket policy)
with:
create_credentials_file: true
credentials_json: ${{ secrets.BUILD_CACHE_KEY }}
- uses: actions/setup-python@v5

Check failure on line 42 in .github/workflows/windows-cmake.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/unpinned-uses

unpinned action reference: action is not pinned to a hash (required by blanket policy)

Check failure on line 42 in .github/workflows/windows-cmake.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

unpinned-uses

windows-cmake.yml:42: unpinned action reference: action is not pinned to a hash (required by blanket policy)
id: py311
with:
python-version: '3.11'
- uses: google-github-actions/setup-gcloud@v2

Check failure on line 46 in .github/workflows/windows-cmake.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/unpinned-uses

unpinned action reference: action is not pinned to a hash (required by blanket policy)

Check failure on line 46 in .github/workflows/windows-cmake.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

unpinned-uses

windows-cmake.yml:46: unpinned action reference: action is not pinned to a hash (required by blanket policy)
env:
CLOUDSDK_PYTHON: ${{ steps.py311.outputs.python-path }}
# We are deliberately downgrading cmake here because v3.31.0 runs each integration test twice
- name: Install CMake
uses: lukka/get-cmake@latest

Check failure on line 51 in .github/workflows/windows-cmake.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/unpinned-uses

unpinned action reference: action is not pinned to a hash (required by blanket policy)

Check failure on line 51 in .github/workflows/windows-cmake.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

unpinned-uses

windows-cmake.yml:51: unpinned action reference: action is not pinned to a hash (required by blanket policy)
with:
cmakeVersion: "3.29.0"
- name: Dynamic Configuration
Expand Down Expand Up @@ -82,10 +82,10 @@
cd "${TEMP}"
mkdir .build
cd .build
git clone --branch ${{ steps.dynamic.outputs.vcpkg-version }} https://github.com/microsoft/vcpkg.git

Check failure on line 85 in .github/workflows/windows-cmake.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/template-injection

code injection via template expansion: may expand into attacker-controllable code
./vcpkg/bootstrap-vcpkg.sh -disableMetrics
- name: Restore vcpkg binaries cache
uses: actions/cache/restore@v4

Check failure on line 88 in .github/workflows/windows-cmake.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

unpinned-uses

windows-cmake.yml:88: unpinned action reference: action is not pinned to a hash (required by blanket policy)
id: cache-restore
with:
path: ${{ runner.temp }}/vcpkg-cache
Expand All @@ -105,14 +105,14 @@
- name: Build cpp-bigquery-odbc
shell: bash
run: |
export VCPKG_ROOT="${TEMP}/.build/vcpkg"
export VCPKG_ROOT=$(cygpath -w "${TEMP}/.build/vcpkg")
export CLOUDSDK_PYTHON="${{ steps.py311.outputs.python-path }}"

Check failure on line 109 in .github/workflows/windows-cmake.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/template-injection

code injection via template expansion: may expand into attacker-controllable code
export CMAKE_OUT="c:/b"



export MSVC_VERSION="${{ matrix.msvc }}"
export BRANCH_IDENTIFIER=$(echo "${{ github.ref_name }}" | tr '[:punct:]' '_')

Check failure on line 115 in .github/workflows/windows-cmake.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/template-injection

code injection via template expansion: may expand into attacker-controllable code

Check failure on line 115 in .github/workflows/windows-cmake.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

template-injection

windows-cmake.yml:115: code injection via template expansion: may expand into attacker-controllable code

# We don't want to install 'arrow' in x86 because it is not supported
if [ "${{ matrix.arch }}" == "x86" ]; then
Expand All @@ -122,7 +122,7 @@
ci/gha/builds/windows-cmake-integration.sh

- name: Save vcpkg binaries cache
uses: actions/cache/save@v4

Check failure on line 125 in .github/workflows/windows-cmake.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

unpinned-uses

windows-cmake.yml:125: unpinned action reference: action is not pinned to a hash (required by blanket policy)
if: always() && steps.cache-restore.outputs.cache-hit != 'true'
with:
path: ${{ runner.temp }}/vcpkg-cache
Expand Down Expand Up @@ -161,13 +161,13 @@
- name: Running testcases
shell: bash
run: |
export VCPKG_ROOT="${TEMP}/.build/vcpkg"
export VCPKG_ROOT=$(cygpath -w "${TEMP}/.build/vcpkg")
export CLOUDSDK_PYTHON="${{ steps.py311.outputs.python-path }}"

Check failure on line 165 in .github/workflows/windows-cmake.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/template-injection

code injection via template expansion: may expand into attacker-controllable code
# Put the CMake output in a directory with more space and keep it short
# to avoid running into the MSVC limits.
export CMAKE_OUT='c:\b'
export MSVC_VERSION="${{ matrix.msvc }}"
export BRANCH_IDENTIFIER=$(echo "${{ github.ref_name }}" | tr '[:punct:]' '_')

Check failure on line 170 in .github/workflows/windows-cmake.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/template-injection

code injection via template expansion: may expand into attacker-controllable code

Check failure on line 170 in .github/workflows/windows-cmake.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

template-injection

windows-cmake.yml:170: code injection via template expansion: may expand into attacker-controllable code
export CPP_BIGQUERY_ODBC_TEST_TABLE_PREFIX="windows_${BRANCH_IDENTIFIER}_${MSVC_VERSION//[-:;.,?\/]/_}_${{ matrix.arch}}_$BUILD_SHARD"

export GOOGLE_APPLICATION_CREDENTIALS="$GOOGLE_GHA_CREDS_PATH"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/windows-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,13 @@
- name: Build cpp-bigquery-odbc
shell: bash
run: |
export VCPKG_ROOT="${TEMP}/.build/vcpkg"
export VCPKG_ROOT=$(cygpath -w "${TEMP}/.build/vcpkg")
export CLOUDSDK_PYTHON="${{ steps.py311.outputs.python-path }}"
export CMAKE_OUT="c:/b"


export MSVC_VERSION="${{ matrix.msvc }}"
export BRANCH_IDENTIFIER=$(echo "${{ github.ref_name }}" | tr '[:punct:]' '_')

Check failure on line 115 in .github/workflows/windows-release.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

template-injection

windows-release.yml:115: code injection via template expansion: may expand into attacker-controllable code
export CPP_BIGQUERY_ODBC_TEST_TABLE_PREFIX="windows_${BRANCH_IDENTIFIER}_${MSVC_VERSION//[-:;.,?\/]/_}_${DRIVER_ARCH}_$BUILD_SHARD"

# choose correct triplet for architecture
Expand Down Expand Up @@ -198,7 +198,7 @@
./ci/installer/ODBCDriverForBigQuery/upgrade_code.ps1 -new_version "$wix_version"

- name: Build Windows Installer (WiX)
shell: cmd

Check warning on line 201 in .github/workflows/windows-release.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

misfeature

windows-release.yml:201: usage of GitHub Actions misfeatures: shell defined here
run: |
echo Locating MSBuild...
for /f "usebackq delims=" %%i in (`"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\MSBuild.exe`) do (
Expand Down Expand Up @@ -250,10 +250,10 @@
- name: Running testcases
shell: bash
run: |
export VCPKG_ROOT="${TEMP}/.build/vcpkg"
export VCPKG_ROOT=$(cygpath -w "${TEMP}/.build/vcpkg")
export CLOUDSDK_PYTHON="${{ steps.py311.outputs.python-path }}"
export MSVC_VERSION="${{ matrix.msvc }}"
export BRANCH_IDENTIFIER=$(echo "${{ github.ref_name }}" | tr '[:punct:]' '_')

Check failure on line 256 in .github/workflows/windows-release.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

template-injection

windows-release.yml:256: code injection via template expansion: may expand into attacker-controllable code
export CPP_BIGQUERY_ODBC_TEST_TABLE_PREFIX="windows_${BRANCH_IDENTIFIER}_${MSVC_VERSION//[-:;.,?\/]/_}_${DRIVER_ARCH}_$BUILD_SHARD"
export CPP_BIGQUERY_ODBC_TEST_SERVICE_ACCOUNT_AUTH_KEY="C:\\b\\service_account_auth_keys.json"
export GOOGLE_APPLICATION_CREDENTIALS="C:\\b\\service_account_auth_keys.json"
Expand All @@ -273,7 +273,7 @@
subject-path: ci/installer/ODBCDriverForBigQuery/bin/Release/en-us/ODBCDriverforBigQuery_windows_${{ matrix.arch }}_${{ steps.version.outputs.version }}.msi

- name: Release Driver
uses: softprops/action-gh-release@v2

Check notice on line 276 in .github/workflows/windows-release.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

superfluous-actions

windows-release.yml:276: action functionality is already included by the runner: use `gh release` in a script step
with:
files: ci/installer/ODBCDriverForBigQuery/bin/Release/en-us/*_${{ env.DRIVER_ARCH }}_${{ steps.version.outputs.version }}.msi
overwrite_files: true
Expand Down
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ cmake_minimum_required(VERSION 3.14)
if (NOT DEFINED PROJECT_VERSION)
set(PROJECT_VERSION "1.0.0")
endif ()
set(VCPKG_OVERLAY_TRIPLETS
"${CMAKE_CURRENT_LIST_DIR}/ci/etc/triplets"
CACHE PATH "Path to custom triplets")

project(
cpp-bigquery-odbc
Expand Down
5 changes: 5 additions & 0 deletions ci/etc/triplets/arm64-linux.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
set(VCPKG_TARGET_ARCHITECTURE arm64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE dynamic)
set(VCPKG_CMAKE_SYSTEM_NAME Linux)
set(VCPKG_BUILD_TYPE release)
4 changes: 4 additions & 0 deletions ci/etc/triplets/arm64-osx.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
set(VCPKG_TARGET_ARCHITECTURE arm64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE dynamic)
set(VCPKG_BUILD_TYPE release)
5 changes: 5 additions & 0 deletions ci/etc/triplets/x64-linux.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE dynamic)
set(VCPKG_CMAKE_SYSTEM_NAME Linux)
set(VCPKG_BUILD_TYPE release)
4 changes: 4 additions & 0 deletions ci/etc/triplets/x64-osx.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE dynamic)
set(VCPKG_BUILD_TYPE release)
4 changes: 4 additions & 0 deletions ci/etc/triplets/x64-windows-static.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE static)
set(VCPKG_LIBRARY_LINKAGE static)
set(VCPKG_BUILD_TYPE release)
4 changes: 4 additions & 0 deletions ci/etc/triplets/x86-windows-static.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
set(VCPKG_TARGET_ARCHITECTURE x86)
set(VCPKG_CRT_LINKAGE static)
set(VCPKG_LIBRARY_LINKAGE static)
set(VCPKG_BUILD_TYPE release)
Loading