onnx

Форк
0
/
release_linux_x86_64.yml 
103 строки · 3.8 Кб
1
# Copyright (c) ONNX Project Contributors
2
#
3
# SPDX-License-Identifier: Apache-2.0
4

5
name: LinuxRelease_x86_64
6

7
on:  # Specifies the event triggering the workflow
8
  workflow_call:  # Indicates that this is a reusable workflow
9
    inputs:      
10
      os:
11
        required: true
12
        type: string  
13

14
permissions:  # set top-level default permissions as security best practice
15
  contents: read
16

17
jobs:
18
  build:
19
    if: github.event_name != 'pull_request' || startsWith( github.base_ref, 'rel-') || contains( github.event.pull_request.labels.*.name, 'run release CIs')
20
    runs-on: ubuntu-latest
21
    strategy:
22
      matrix:
23
        python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
24
        architecture: ['x64']
25

26
    steps:
27
    - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
28
    - name: Checkout submodules
29
      shell: bash
30
      run: |
31
        auth_header="$(git config --local --get http.https://github.com/.extraheader)"
32
        git submodule sync --recursive
33
        git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
34

35
    - name: Build manylinux2014_x86_64
36
      uses: docker://quay.io/pypa/manylinux2014_x86_64:latest
37
      with:
38
        entrypoint: bash
39
        args: .github/workflows/manylinux/entrypoint.sh ${{ matrix.python-version }} manylinux2014_x86_64 ${{ github.event_name }}
40

41
    - name: Set up Python ${{ matrix.python-version }}
42
      uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
43
      with:
44
        python-version: ${{ matrix.python-version }}
45
        architecture: ${{ matrix.architecture }}
46

47
    - name: Install python dependencies
48
      run: |
49
        python -m pip install -q --upgrade pip
50
        python -m pip install -q -r requirements-release.txt
51

52
    - name: Install protobuf in the GitHub Action environment for testing the wheel
53
      run: |
54
        source workflow_scripts/protobuf/build_protobuf_unix.sh $(nproc)
55

56
    - name: Test wheel with Python ${{ matrix.python-version }}
57
      run: |
58
        python -m pip install dist/*manylinux2014_x86_64.whl
59
        pytest
60

61
    - uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a
62
      with:
63
        name: wheels-${{ inputs.os }}-${{ matrix.python-version }}
64
        path: |
65
            ./dist/*.whl
66
        
67

68
    - name: Upload wheel to PyPI weekly
69
      if: (github.event_name == 'schedule') # Only triggered by weekly event
70
      run: |
71
        twine upload --verbose dist/*.whl --repository-url https://upload.pypi.org/legacy/ -u ${{ secrets.ONNXWEEKLY_USERNAME }} -p ${{ secrets.ONNXWEEKLY_TOKEN }}
72
        TEST_HUB=1 pytest
73

74
    - name: Verify ONNX with the latest numpy
75
      if: ${{ always() }}
76
      run: |
77
        python -m pip uninstall -y numpy onnx && python -m pip install numpy
78
        python -m pip install dist/*manylinux2014_x86_64.whl
79
        pytest
80

81
    - name: Verify ONNX with the latest protobuf
82
      if: ${{ always() }}
83
      run: |
84
        python -m pip uninstall -y protobuf onnx && python -m pip install protobuf
85
        python -m pip install dist/*manylinux2014_x86_64.whl
86
        pytest
87

88
    - name: Verify ONNX with the minimumly supported packages
89
      if: ${{ always() }}
90
      run: |
91
        python -m pip uninstall -y numpy protobuf onnx && python -m pip install -r requirements-min.txt
92
        python -m pip install dist/*manylinux2014_x86_64.whl
93
        pytest
94

95
    - name: Verify ONNX with ONNX Runtime PyPI package
96
      if: matrix.python-version != '3.12'
97
      run: |
98
        python -m pip uninstall -y protobuf numpy && python -m pip install -q -r requirements-release.txt
99
        python -m pip install -q onnxruntime==1.17.3
100
        export ORT_MAX_IR_SUPPORTED_VERSION=9
101
        export ORT_MAX_ML_OPSET_SUPPORTED_VERSION=3
102
        export ORT_MAX_ONNX_OPSET_SUPPORTED_VERSION=20
103
        pytest
104

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.