File: linux_webgpu.yml

package info (click to toggle)
onnxruntime 1.23.2%2Bdfsg-6
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 340,756 kB
  • sloc: cpp: 3,222,136; python: 188,267; ansic: 114,318; asm: 37,927; cs: 36,849; java: 10,962; javascript: 6,811; pascal: 4,126; sh: 2,996; xml: 705; objc: 281; makefile: 67
file content (101 lines) | stat: -rw-r--r-- 4,010 bytes parent folder | download
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
name: Linux WebGPU CI

on:
  push:
    branches: [main, 'rel-*']
  pull_request:
    branches: [main, 'rel-*']
  workflow_dispatch:

concurrency:
  group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.sha }}
  cancel-in-progress: true

permissions:
  contents: read
  packages: write
  attestations: write
  id-token: write

jobs:
  build-linux-webgpu-x64-release:
    name: Build Linux WebGPU x64 Release
    # This job runs on a CPU node using the reusable build workflow
    uses: ./.github/workflows/reusable_linux_build.yml
    with:
      pool_name: "onnxruntime-github-Ubuntu2204-AMD-CPU" # Build pool
      build_config: Release
      architecture: x64
      dockerfile_path: tools/ci_build/github/linux/docker/Dockerfile.manylinux2_28_webgpu
      docker_image_repo: onnxruntimecpubuildpythonx64
      extra_build_flags: '--use_binskim_compliant_compile_flags --build_wheel --use_webgpu --build_java --cmake_extra_defines onnxruntime_BUILD_UNIT_TESTS=ON'
      python_path_prefix: 'PATH=/opt/python/cp310-cp310/bin:$PATH'
      run_tests: false
      upload_build_output: true
      execution_providers: 'webgpu'
    secrets:
      GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Pass token for reusable workflow needs (e.g., docker build action)

  # TODO: the following test step is currently failing. Need to fix and re-enable it

  # test-linux-webgpu-x64-release:
  #   name: Test Linux WebGPU x64 Release
  #   needs: build-linux-webgpu-x64-release
  #   runs-on:
  #     - self-hosted
  #     - "1ES.Pool=Onnxruntime-github-Linux-GPU-A100-WUS3"
  #   permissions:
  #     contents: read
  #     packages: read
  #   steps:
  #     - name: Checkout code
  #       uses: actions/checkout@v4

  #     - uses: microsoft/onnxruntime-github-actions/build-docker-image@v0.0.9
  #       id: build_docker_image_step
  #       with:
  #         dockerfile: ${{ github.workspace }}/tools/ci_build/github/linux/docker/Dockerfile.manylinux2_28_webgpu
  #         image-name: ghcr.io/microsoft/onnxruntime/onnxruntimecpubuildcix64
  #         push: true
  #         azure-container-registry-name: onnxruntimebuildcache
  #       env:
  #         GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Pass token to action

  #     # --- Download Build Artifact to Runner Temp Directory ---
  #     - name: Download Build Artifact
  #       uses: actions/download-artifact@v4
  #       with:
  #         name: build-output-x64-Release # Must match the upload name
  #         path: ${{ runner.temp }}/Release # Download contents into temp dir structure

  #     # --- Restore Permissions in the Temp Directory ---
  #     - name: Restore Executable Permissions
  #       if: success() # Only run if download succeeded
  #       working-directory: ${{ runner.temp }}/Release
  #       shell: bash
  #       run: |
  #         if [ -f perms.txt ]; then
  #           echo "Restoring executable permissions in ${{ runner.temp }}/Release ..."
  #           while IFS= read -r file; do
  #             # Check relative path existence within the current directory
  #             if [ -f "$file" ]; then
  #               chmod +x "$file"
  #             else
  #               echo "Warning: File '$file' listed in perms.txt not found."
  #             fi
  #           done < perms.txt
  #           echo "Permissions restored."
  #         else
  #           echo "Warning: perms.txt not found in artifact."
  #         fi

  #     - name: Test ONNX Runtime
  #       id: test_step
  #       uses: microsoft/onnxruntime-github-actions/run-build-script-in-docker@v0.0.9
  #       with:
  #         docker_image: ${{ steps.build_docker_image_step.outputs.full-image-name }}
  #         build_config: Release
  #         mode: 'test' # Set mode to test
  #         execution_providers: 'webgpu'
  #         extra_build_flags: '--use_binskim_compliant_compile_flags --cmake_extra_defines onnxruntime_BUILD_UNIT_TESTS=ON'
  #         python_path_prefix: 'PATH=/opt/python/cp310-cp310/bin:$PATH'