From ade876800f01a3ffb54431e0e4e9f21315798ad4 Mon Sep 17 00:00:00 2001 From: David Li Date: Wed, 12 Aug 2026 14:22:36 +0900 Subject: [PATCH] chore(go): use modernized build config --- .github/workflows/dev.yaml | 2 +- .github/workflows/go_release.yaml | 35 ++++++++++++++++++------------- .github/workflows/go_test.yaml | 35 ++++++++++++++++++------------- go/adbc-make.toml | 18 ++++++++++++++++ go/pixi.lock | 11 +++++----- go/pixi.toml | 2 +- 6 files changed, 66 insertions(+), 37 deletions(-) create mode 100644 go/adbc-make.toml diff --git a/.github/workflows/dev.yaml b/.github/workflows/dev.yaml index 42a2786..3e0f65f 100644 --- a/.github/workflows/dev.yaml +++ b/.github/workflows/dev.yaml @@ -69,6 +69,6 @@ jobs: pre-commit run --all-files --color=always --show-diff-on-failure --verbose - name: Analyze workflows with zizmor - uses: zizmorcore/zizmor-action@6fc4b006235f201fdab3722e17240ab420d580e5 # v0.6.1 + uses: zizmorcore/zizmor-action@3dc1ecc9bcb9e94e9b2c709687979e1298497054 # v0.6.2 with: advanced-security: false diff --git a/.github/workflows/go_release.yaml b/.github/workflows/go_release.yaml index ba45446..47cfddd 100644 --- a/.github/workflows/go_release.yaml +++ b/.github/workflows/go_release.yaml @@ -78,7 +78,7 @@ jobs: check-latest: true go-version-file: go/go.mod - - uses: prefix-dev/setup-pixi@a09b6247153796b190642a2b53fac4241043cf6f # v0.10.0 + - uses: prefix-dev/setup-pixi@f00437f565399d418b0acc85936d12c1fb668347 # v0.10.1 with: pixi-version: v0.72.0 run-install: false @@ -154,9 +154,6 @@ jobs: go test -tags assert -v ./... - if [[ -f ci/scripts/post-test.sh ]]; then - ./ci/scripts/post-test.sh - fi - name: go mod tidy if: runner.os == 'Linux' @@ -201,7 +198,7 @@ jobs: check-latest: true go-version-file: go/go.mod - - uses: prefix-dev/setup-pixi@a09b6247153796b190642a2b53fac4241043cf6f # v0.10.0 + - uses: prefix-dev/setup-pixi@f00437f565399d418b0acc85936d12c1fb668347 # v0.10.1 with: pixi-version: v0.72.0 run-install: false @@ -235,7 +232,7 @@ jobs: source .env.test fi set +a - pixi run adbc-make build DEBUG=true VERBOSE=true DRIVER=bigquery IMPL_LANG=go + pixi run adbc-make build DEBUG=true VERBOSE=true - name: Start Test Dependencies # Can't use Docker on macOS AArch64 runners, and Windows containers # work but often the container doesn't support Windows @@ -290,12 +287,9 @@ jobs: pixi run validate fi - if [[ -f ci/scripts/post-test.sh ]]; then - ./ci/scripts/post-test.sh - fi - cp validation-report.xml validation-report-${{ matrix.vendor_version }}.xml + - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: validation-report-${{ matrix.vendor_version }} @@ -343,7 +337,7 @@ jobs: check-latest: true go-version-file: go/go.mod - - uses: prefix-dev/setup-pixi@a09b6247153796b190642a2b53fac4241043cf6f # v0.10.0 + - uses: prefix-dev/setup-pixi@f00437f565399d418b0acc85936d12c1fb668347 # v0.10.1 with: pixi-version: v0.72.0 run-install: false @@ -360,6 +354,17 @@ jobs: run: | echo "$GHCR_TOKEN" | docker login ghcr.io -u "${GITHUB_ACTOR}" --password-stdin + - name: Add dumpbin to PATH + if: runner.os == 'Windows' + shell: pwsh + run: | + $vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" + $dumpbin = & $vswhere -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -find 'VC\Tools\MSVC\**\bin\Hostx64\x64\dumpbin.exe' | Select-Object -First 1 + if (-not $dumpbin) { + throw "Could not find dumpbin.exe using vswhere" + } + Split-Path $dumpbin -Parent | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + - name: Build Library working-directory: go run: | @@ -375,7 +380,7 @@ jobs: source .env.release fi set +a - pixi run adbc-make check CI=true VERBOSE=true DRIVER=bigquery IMPL_LANG=go RELEASE=true + pixi run adbc-make check CI=true VERBOSE=true RELEASE=true if [[ -f ci/scripts/post-build.sh ]]; then ./ci/scripts/post-build.sh release ${{ matrix.platform }} ${{ matrix.arch }} fi @@ -408,7 +413,7 @@ jobs: check-latest: true go-version: "stable" - - uses: prefix-dev/setup-pixi@a09b6247153796b190642a2b53fac4241043cf6f # v0.10.0 + - uses: prefix-dev/setup-pixi@f00437f565399d418b0acc85936d12c1fb668347 # v0.10.1 with: pixi-version: v0.72.0 run-install: false @@ -486,7 +491,7 @@ jobs: with: cache: false go-version: 'stable' - - uses: prefix-dev/setup-pixi@a09b6247153796b190642a2b53fac4241043cf6f # v0.10.0 + - uses: prefix-dev/setup-pixi@f00437f565399d418b0acc85936d12c1fb668347 # v0.10.1 with: pixi-version: v0.72.0 run-install: false @@ -547,7 +552,7 @@ jobs: persist-credentials: false submodules: 'recursive' - - uses: prefix-dev/setup-pixi@a09b6247153796b190642a2b53fac4241043cf6f # v0.10.0 + - uses: prefix-dev/setup-pixi@f00437f565399d418b0acc85936d12c1fb668347 # v0.10.1 with: pixi-version: v0.72.0 run-install: false diff --git a/.github/workflows/go_test.yaml b/.github/workflows/go_test.yaml index f428aeb..4319394 100644 --- a/.github/workflows/go_test.yaml +++ b/.github/workflows/go_test.yaml @@ -118,7 +118,7 @@ jobs: check-latest: true go-version-file: go/go.mod - - uses: prefix-dev/setup-pixi@a09b6247153796b190642a2b53fac4241043cf6f # v0.10.0 + - uses: prefix-dev/setup-pixi@f00437f565399d418b0acc85936d12c1fb668347 # v0.10.1 with: pixi-version: v0.72.0 run-install: false @@ -194,9 +194,6 @@ jobs: go test -tags assert -v ./... - if [[ -f ci/scripts/post-test.sh ]]; then - ./ci/scripts/post-test.sh - fi - name: go mod tidy if: runner.os == 'Linux' @@ -252,7 +249,7 @@ jobs: check-latest: true go-version-file: go/go.mod - - uses: prefix-dev/setup-pixi@a09b6247153796b190642a2b53fac4241043cf6f # v0.10.0 + - uses: prefix-dev/setup-pixi@f00437f565399d418b0acc85936d12c1fb668347 # v0.10.1 with: pixi-version: v0.72.0 run-install: false @@ -286,7 +283,7 @@ jobs: source .env.test fi set +a - pixi run adbc-make build DEBUG=true VERBOSE=true DRIVER=bigquery IMPL_LANG=go + pixi run adbc-make build DEBUG=true VERBOSE=true - name: Start Test Dependencies # Can't use Docker on macOS AArch64 runners, and Windows containers # work but often the container doesn't support Windows @@ -341,12 +338,9 @@ jobs: pixi run validate fi - if [[ -f ci/scripts/post-test.sh ]]; then - ./ci/scripts/post-test.sh - fi - cp validation-report.xml validation-report-${{ matrix.vendor_version }}.xml + - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: validation-report-${{ matrix.vendor_version }} @@ -405,7 +399,7 @@ jobs: check-latest: true go-version-file: go/go.mod - - uses: prefix-dev/setup-pixi@a09b6247153796b190642a2b53fac4241043cf6f # v0.10.0 + - uses: prefix-dev/setup-pixi@f00437f565399d418b0acc85936d12c1fb668347 # v0.10.1 with: pixi-version: v0.72.0 run-install: false @@ -422,6 +416,17 @@ jobs: run: | echo "$GHCR_TOKEN" | docker login ghcr.io -u "${GITHUB_ACTOR}" --password-stdin + - name: Add dumpbin to PATH + if: runner.os == 'Windows' + shell: pwsh + run: | + $vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" + $dumpbin = & $vswhere -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -find 'VC\Tools\MSVC\**\bin\Hostx64\x64\dumpbin.exe' | Select-Object -First 1 + if (-not $dumpbin) { + throw "Could not find dumpbin.exe using vswhere" + } + Split-Path $dumpbin -Parent | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + - name: Build Library working-directory: go run: | @@ -437,7 +442,7 @@ jobs: source .env.release fi set +a - pixi run adbc-make check CI=true VERBOSE=true DRIVER=bigquery IMPL_LANG=go + pixi run adbc-make check CI=true VERBOSE=true if [[ -f ci/scripts/post-build.sh ]]; then ./ci/scripts/post-build.sh release ${{ matrix.platform }} ${{ matrix.arch }} fi @@ -481,7 +486,7 @@ jobs: check-latest: true go-version: "stable" - - uses: prefix-dev/setup-pixi@a09b6247153796b190642a2b53fac4241043cf6f # v0.10.0 + - uses: prefix-dev/setup-pixi@f00437f565399d418b0acc85936d12c1fb668347 # v0.10.1 with: pixi-version: v0.72.0 run-install: false @@ -559,7 +564,7 @@ jobs: with: cache: true go-version: 'stable' - - uses: prefix-dev/setup-pixi@a09b6247153796b190642a2b53fac4241043cf6f # v0.10.0 + - uses: prefix-dev/setup-pixi@f00437f565399d418b0acc85936d12c1fb668347 # v0.10.1 with: pixi-version: v0.72.0 run-install: false @@ -641,7 +646,7 @@ jobs: persist-credentials: false submodules: 'recursive' - - uses: prefix-dev/setup-pixi@a09b6247153796b190642a2b53fac4241043cf6f # v0.10.0 + - uses: prefix-dev/setup-pixi@f00437f565399d418b0acc85936d12c1fb668347 # v0.10.1 with: pixi-version: v0.72.0 run-install: false diff --git a/go/adbc-make.toml b/go/adbc-make.toml new file mode 100644 index 0000000..897a8df --- /dev/null +++ b/go/adbc-make.toml @@ -0,0 +1,18 @@ +# Copyright (c) 2026 ADBC Drivers Contributors +# +# Licensed 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. + +driver = "bigquery" + +[lang] +lang = "go" diff --git a/go/pixi.lock b/go/pixi.lock index 4c3ac99..5f63fdf 100644 --- a/go/pixi.lock +++ b/go/pixi.lock @@ -50,7 +50,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/ca-certificates-2026.6.17-hbd8a1cb_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/python_abi-3.14-8_cp314.conda - conda: https://conda.anaconda.org/conda-forge/noarch/tzdata-2025c-hc9c84f9_1.conda - - pypi: git+https://github.com/adbc-drivers/dev#cf1690c570c0b54f3d0f48d185d8b4ec51748592 + - pypi: git+https://github.com/adbc-drivers/dev#0cbb5bd09379a0016368b2c544fcfeeb817d0aed - pypi: git+https://github.com/adbc-drivers/validation#ebe1360f3a7814588b9754fbae143b749e39243f - pypi: https://files.pythonhosted.org/packages/0c/c3/44f3fbbfa403ea2a7c779186dc20772604442dde72947e7d01069cbe98e3/pycparser-3.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/1e/5e/d4e9f1a599fb8e573b7b87160658329fbf28d19eac2718f51fc3def3aa5a/idna-3.18-py3-none-any.whl @@ -108,7 +108,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/ca-certificates-2026.6.17-hbd8a1cb_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/python_abi-3.14-8_cp314.conda - conda: https://conda.anaconda.org/conda-forge/noarch/tzdata-2025c-hc9c84f9_1.conda - - pypi: git+https://github.com/adbc-drivers/dev#cf1690c570c0b54f3d0f48d185d8b4ec51748592 + - pypi: git+https://github.com/adbc-drivers/dev#0cbb5bd09379a0016368b2c544fcfeeb817d0aed - pypi: git+https://github.com/adbc-drivers/validation#ebe1360f3a7814588b9754fbae143b749e39243f - pypi: https://files.pythonhosted.org/packages/0c/c3/44f3fbbfa403ea2a7c779186dc20772604442dde72947e7d01069cbe98e3/pycparser-3.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/19/6c/4aabac7ed4d5944f544b7cf7881d50fe4b34eac908605291b633a53be875/adbc_driver_manager-1.11.0-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl @@ -159,7 +159,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/osx-arm64/readline-8.3-h46df422_0.conda - conda: https://conda.anaconda.org/conda-forge/osx-arm64/tk-8.6.13-h010d191_3.conda - conda: https://conda.anaconda.org/conda-forge/osx-arm64/zstd-1.5.7-hbf9d68e_6.conda - - pypi: git+https://github.com/adbc-drivers/dev#cf1690c570c0b54f3d0f48d185d8b4ec51748592 + - pypi: git+https://github.com/adbc-drivers/dev#0cbb5bd09379a0016368b2c544fcfeeb817d0aed - pypi: git+https://github.com/adbc-drivers/validation#ebe1360f3a7814588b9754fbae143b749e39243f - pypi: https://files.pythonhosted.org/packages/0c/c3/44f3fbbfa403ea2a7c779186dc20772604442dde72947e7d01069cbe98e3/pycparser-3.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/1e/5e/d4e9f1a599fb8e573b7b87160658329fbf28d19eac2718f51fc3def3aa5a/idna-3.18-py3-none-any.whl @@ -212,7 +212,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/win-64/vc14_runtime-14.51.36231-h1b9f54f_39.conda - conda: https://conda.anaconda.org/conda-forge/win-64/vcomp14-14.51.36231-h1b9f54f_39.conda - conda: https://conda.anaconda.org/conda-forge/win-64/zstd-1.5.7-h534d264_6.conda - - pypi: git+https://github.com/adbc-drivers/dev#cf1690c570c0b54f3d0f48d185d8b4ec51748592 + - pypi: git+https://github.com/adbc-drivers/dev#0cbb5bd09379a0016368b2c544fcfeeb817d0aed - pypi: git+https://github.com/adbc-drivers/validation#ebe1360f3a7814588b9754fbae143b749e39243f - pypi: https://files.pythonhosted.org/packages/0c/c3/44f3fbbfa403ea2a7c779186dc20772604442dde72947e7d01069cbe98e3/pycparser-3.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/1e/5e/d4e9f1a599fb8e573b7b87160658329fbf28d19eac2718f51fc3def3aa5a/idna-3.18-py3-none-any.whl @@ -1279,7 +1279,7 @@ packages: - zstd >=1.5.7,<1.6.0a0 size: 388453 timestamp: 1764777142545 -- pypi: git+https://github.com/adbc-drivers/dev#cf1690c570c0b54f3d0f48d185d8b4ec51748592 +- pypi: git+https://github.com/adbc-drivers/dev#0cbb5bd09379a0016368b2c544fcfeeb817d0aed name: adbc-drivers-dev version: '0.1' requires_dist: @@ -1292,6 +1292,7 @@ packages: - requests - ruamel-yaml>=0.18.11,<0.19 - tomlkit>=0.13.2,<0.14 + requires_python: '>=3.14' - pypi: git+https://github.com/adbc-drivers/validation#ebe1360f3a7814588b9754fbae143b749e39243f name: adbc-drivers-validation version: '0.1' diff --git a/go/pixi.toml b/go/pixi.toml index a5c8ac3..6f5632d 100644 --- a/go/pixi.toml +++ b/go/pixi.toml @@ -23,7 +23,7 @@ platforms = ["linux-64", "osx-arm64", "win-64", "linux-aarch64"] version = "0.1.0" [tasks] -make = "adbc-make run build DRIVER=bigquery VERBOSE=true" +make = "adbc-make run build VERBOSE=true" test = "go test -tags assert -v ./..." release = "adbc-release" validate = "pytest -vvs --junit-xml=validation-report.xml -rfEsxX validation/tests/"