Исходный код СУБД RuDB — свободной СУБД с открытым исходным кодом на базе PostgreSQL
rudb
3 days ago bd039d1e92813358c5c5a1e346b49074baf513f2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
name: "macOS CI Reusable Workflow for build and test"
description: "This is a reusable workflow for macOS CI pipelines to build and test"
 
on:
  workflow_call:
    inputs:
      use_webgpu:
        required: false
        type: boolean
        default: false
      use_xnnpack:
        required: false
        type: boolean
        default: false
      use_coreml:
        required: false
        type: boolean
        default: false
      python_version:
        required: false
        type: string
        default: "3.14"
      matrix_include:
        required: false
        type: string
        description: "JSON string specifying combinations to include in the matrix"
        # we do not have enough resources to run all combinations
        # Include arm64 + Debug combination by default
        default: >-
          [
            {"machine": "arm64", "target": "arm64", "build_config": "Debug"}
          ]
 
jobs:
  build-and-test:
    strategy:
      matrix:
        # To avoid creating too many jobs, we explicitly specify the combinations to run.
        #
        # # Specify the machine architecture to run the build on.
        # machine: ["x86_64", "arm64"]
        #
        # # Specify the target architecture for the build.
        # target: ["x86_64", "arm64"]
        #
        # # Specify the build configuration for the build.
        # build_config: ["Debug", "Release"]
        #
        include: ${{ fromJSON(inputs.matrix_include) }}
 
    # "macos-15" is an arm64 image.
    # see also: https://github.com/actions/runner-images/blob/main/README.md
    runs-on: ${{ matrix.machine == 'x86_64' && 'macos-15-intel' || 'macos-15' }}
    timeout-minutes: 120
    env:
      build_flags: >
        --build_dir ./build
        --skip_submodule_sync
        --parallel
        --use_binskim_compliant_compile_flags
        --build_shared_lib
        --build_nodejs
        --build_objc
        --build_java
        --build_wheel
        ${{ matrix.target == 'arm64' && '--enable_arm_neon_nchwc' || '' }}
        ${{ inputs.use_webgpu && '--use_webgpu' || '' }}
        ${{ inputs.use_xnnpack && '--use_xnnpack' || '' }}
        ${{ inputs.use_coreml && '--use_coreml --skip_onnx_tests' || '' }}
        --use_vcpkg --use_vcpkg_ms_internal_asset_cache
        --config ${{ matrix.build_config }}
        --osx_arch ${{ matrix.target }}
 
      # A matrix entry may override the Xcode version via "xcode_version"; otherwise fall back to the default.
      # The Xcode version needs to be present on the image specified in the "runs-on" configuration.
      xcode_version: ${{ matrix.xcode_version || '26.3' }}
 
    steps:
      - name: Checkout code
        uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
 
      - name: Setup VCPKG Cache
        uses: ./.github/actions/setup-vcpkg-cache
        with:
          key: >-
            ${{
              format(
                'macos-{0}-{1}-{2}-xcode-{3}-coreml-{4}-xnnpack-{5}-webgpu-{6}',
                matrix.machine,
                matrix.target,
                matrix.build_config,
                env.xcode_version,
                inputs.use_coreml,
                inputs.use_xnnpack,
                inputs.use_webgpu
              )
            }}
 
      - name: Get vcpkg tool info
        id: vcpkg-tool-info
        uses: ./.github/actions/get-vcpkg-tool-info
      - uses: microsoft/onnxruntime-github-actions/setup-build-tools@d19341fb036c43a947a2c0e4a53ad4d15e10bc5c # v0.0.9
        with:
          vcpkg-version: ${{ steps.vcpkg-tool-info.outputs.release_tag }}
          vcpkg-hash: ${{ steps.vcpkg-tool-info.outputs.sha512 }}
          cmake-version: '3.31.8'
          cmake-hash: 99cc9c63ae49f21253efb5921de2ba84ce136018abf08632c92c060ba91d552e0f6acc214e9ba8123dee0cf6d1cf089ca389e321879fd9d719a60d975bcffcc8
          add-cmake-to-path: 'true'
          disable-terrapin: 'true'
 
      - name: macOS CI pipeline prepare steps
        uses: ./.github/actions/macos-ci-setup
        with:
          platform_machine: ${{ matrix.machine }}
          python_version: ${{ inputs.python_version }}
          xcode_version: ${{ env.xcode_version }}
          use_cache: true
 
      - uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 # v5.1.0
        id: onnx-node-tests-cache
        with:
          path: ${{ github.workspace }}/js/test/
          key: onnxnodetests-${{ hashFiles('js/scripts/prepare-onnx-node-tests.ts') }}
 
      - name: Setup environment variables
        shell: bash
        run: |
          set -e -x
          export PATH=${{ github.workspace }}/build/installed/bin:$PATH
          export ONNX_ML=1
          export CMAKE_ARGS="-DONNX_GEN_PB_TYPE_STUBS=ON -DONNX_WERROR=OFF"
          python -m pip install -r '${{ github.workspace }}/tools/ci_build/github/linux/docker/scripts/requirements.txt'
 
      - name: Configure Build (build.py --update)
        shell: bash
        working-directory: ${{ github.workspace }}
        run: |
          rm -rf ${{ github.workspace }}/build/${{ matrix.build_config }}
          python ./tools/ci_build/build.py --update ${{ env.build_flags }}
 
      - name: Build (build.py --build)
        shell: bash
        working-directory: ${{ github.workspace }}
        run: |
          python ./tools/ci_build/build.py --build ${{ env.build_flags }}
 
      - name: Install
        shell: bash
        run: |
          set -e -x
          rm -rf ${{ github.workspace }}/build/installed
          cd ${{ github.workspace }}/build/${{ matrix.build_config }}
          make install DESTDIR=${{ github.workspace }}/build/installed
 
      - name: Running Tests (build.py --test)
        # Skip tests when cross-compiling
        if: ${{ matrix.machine == matrix.target }}
        shell: bash
        working-directory: ${{ github.workspace }}
        run: |
          python ./tools/ci_build/build.py --test ${{ env.build_flags }}
 
      - name: WebGPU GEMV correctness (Metal)
        if: ${{ inputs.use_webgpu && matrix.machine == matrix.target }}
        shell: bash
        working-directory: ${{ github.workspace }}/build/${{ matrix.build_config }}
        env:
          PYTHONPATH: ${{ github.workspace }}/build/${{ matrix.build_config }}
        run: |
          python - <<'PY'
          import onnxruntime as ort
          assert any(device.ep_name == "WebGpuExecutionProvider" for device in ort.get_ep_devices()), \
              "A WebGPU device is required for GEMV CI; skipping is not allowed."
          PY
          python -m pytest -v transformers/test_webgpu_matmul.py