refactor(go/adbc): new utility method StartSpanWithEndSpanHelper #42
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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: Native Libraries (vcpkg) | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| paths: | |
| - "c/**" | |
| - "ci/**" | |
| - "glib/**" | |
| - "go/**" | |
| - "python/**" | |
| - "ruby/**" | |
| - ".github/workflows/native-vcpkg.yml" | |
| push: | |
| branches-ignore: | |
| - 'dependabot/**' | |
| paths: | |
| - "c/**" | |
| - "ci/**" | |
| - "glib/**" | |
| - "go/**" | |
| - "python/**" | |
| - "ruby/**" | |
| - ".github/workflows/native-vcpkg.yml" | |
| workflow_call: | |
| concurrency: | |
| group: ${{ github.repository }}-${{ github.ref }}-${{ github.workflow }}-vcpkg | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| defaults: | |
| run: | |
| shell: pwsh | |
| jobs: | |
| drivers-vcpkg: | |
| name: "C/C++ (${{ matrix.os }}/${{ matrix.config }})" | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| include: | |
| - { os: windows-latest, arch: x64, config: debug, msystem: UCRT64, msysbin: mingw64, env: x86_64, triplet: x64-windows } | |
| - { os: windows-latest, arch: x64, config: release, msystem: UCRT64, msysbin: mingw64, env: x86_64, triplet: x64-windows-static-release } | |
| - { os: windows-11-arm, arch: arm64, config: release, msystem: CLANGARM64, msysbin: clangarm64, env: clang-aarch64, triplet: arm64-windows-static-release } | |
| env: | |
| VCPKG_DEFAULT_BINARY_CACHE: ${{ github.workspace }}/vcpkg-cache | |
| VCPKG_DEFAULT_TRIPLET: ${{ matrix.triplet }} | |
| VCPKG_ROOT: ${{ github.workspace }}/vcpkg | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - uses: msys2/setup-msys2@66cd2cce69caa17b53920067426061ca1de3a884 # v2.32.0 | |
| id: msys2 | |
| with: | |
| msystem: ${{ matrix.msystem }} | |
| update: true | |
| # Needed for gendef tool in GoUtils.cmake | |
| install: | | |
| mingw-w64-${{ matrix.env }}-tools | |
| - name: Add msys2 toolchain to PATH | |
| env: | |
| MSYS_LOCATION: ${{ steps.msys2.outputs.msys2-location }} | |
| run: | | |
| "$($env:MSYS_LOCATION)\${{ matrix.msysbin }}\bin" | | |
| Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
| - name: Setup MSYS2 tools | |
| if: matrix.arch == 'arm64' | |
| shell: msys2 {0} | |
| run: | | |
| # Needed for CGO | |
| pacman --noconfirm -S mingw-w64-${{ matrix.env }}-gcc-compat | |
| - name: Ensure vcpkg binary cache directory | |
| run: | | |
| New-Item -ItemType Directory -Force ` | |
| $env:VCPKG_DEFAULT_BINARY_CACHE | Out-Null | |
| - name: Cache vcpkg packages | |
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| path: ${{ env.VCPKG_DEFAULT_BINARY_CACHE }} | |
| key: vcpkg-${{ runner.os }}-${{ matrix.arch }}-${{ hashFiles('.env', 'ci/vcpkg/**', 'c/**/vcpkg.json', '.github/workflows/native-vcpkg.yml') }} | |
| - name: Install vcpkg | |
| shell: bash | |
| run: ci/scripts/install_vcpkg.sh "$VCPKG_ROOT" | |
| - name: Install vcpkg dependencies | |
| working-directory: c | |
| run: | | |
| & "$($env:VCPKG_ROOT)\vcpkg.exe" install libpq sqlite3 ` | |
| --overlay-triplets "$pwd\..\ci\vcpkg\triplets" | |
| - name: Build and Install (No ASan) | |
| env: | |
| CMAKE_BUILD_TYPE: ${{ matrix.config }} | |
| run: | | |
| cmake .\c\ --preset windows-${{ matrix.config }} ` | |
| -DCMAKE_VERBOSE_MAKEFILE=ON ` | |
| -DVCPKG_OVERLAY_TRIPLETS="$pwd\ci\vcpkg\triplets" ` | |
| "-DVCPKG_TARGET_TRIPLET=$($env:VCPKG_DEFAULT_TRIPLET)" | |
| if (-not $?) { throw "failed to configure CMake" } | |
| cmake --build .\build\${{ matrix.config }} --target install --config ${{ matrix.config }} --parallel | |
| - name: Test | |
| env: | |
| BUILD_ALL: "0" | |
| BUILD_DRIVER_MANAGER: "1" | |
| BUILD_DRIVER_MANAGER_USER_CONFIG_TEST: "1" | |
| BUILD_DRIVER_SQLITE: "1" | |
| run: .\ci\scripts\cpp_test.ps1 $pwd\build\${{ matrix.config }} $pwd\local\${{ matrix.config }} |