|
| 1 | +name: Linux WebGPU CI |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [main, 'rel-*'] |
| 6 | + pull_request: |
| 7 | + branches: [main, 'rel-*'] |
| 8 | + workflow_dispatch: |
| 9 | + |
| 10 | +concurrency: |
| 11 | + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.sha }} |
| 12 | + cancel-in-progress: true |
| 13 | + |
| 14 | +permissions: |
| 15 | + contents: read |
| 16 | + packages: write |
| 17 | + attestations: write |
| 18 | + id-token: write |
| 19 | + |
| 20 | +jobs: |
| 21 | + build-linux-webgpu-x64-release: |
| 22 | + name: Build Linux WebGPU x64 Release |
| 23 | + # This job runs on a CPU node using the reusable build workflow |
| 24 | + uses: ./.github/workflows/reusable_linux_build.yml |
| 25 | + with: |
| 26 | + pool_name: "onnxruntime-github-Ubuntu2204-AMD-CPU" # Build pool |
| 27 | + build_config: Release |
| 28 | + architecture: x64 |
| 29 | + dockerfile_path: tools/ci_build/github/linux/docker/Dockerfile.manylinux2_28_webgpu |
| 30 | + docker_image_repo: onnxruntimecpubuildpythonx64 |
| 31 | + extra_build_flags: '--use_binskim_compliant_compile_flags --build_wheel --use_webgpu --build_java --cmake_extra_defines onnxruntime_BUILD_UNIT_TESTS=ON' |
| 32 | + python_path_prefix: 'PATH=/opt/python/cp310-cp310/bin:$PATH' |
| 33 | + run_tests: false |
| 34 | + upload_build_output: true |
| 35 | + execution_providers: 'webgpu' |
| 36 | + secrets: |
| 37 | + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Pass token for reusable workflow needs (e.g., docker build action) |
| 38 | + |
| 39 | + # TODO: the following test step is currently failing. Need to fix and re-enable it |
| 40 | + |
| 41 | + # test-linux-webgpu-x64-release: |
| 42 | + # name: Test Linux WebGPU x64 Release |
| 43 | + # needs: build-linux-webgpu-x64-release |
| 44 | + # runs-on: |
| 45 | + # - self-hosted |
| 46 | + # - "1ES.Pool=Onnxruntime-github-Linux-GPU-A100-WUS3" |
| 47 | + # permissions: |
| 48 | + # contents: read |
| 49 | + # packages: read |
| 50 | + # steps: |
| 51 | + # - name: Checkout code |
| 52 | + # uses: actions/checkout@v4 |
| 53 | + |
| 54 | + # - uses: microsoft/onnxruntime-github-actions/build-docker-image@v0.0.7 |
| 55 | + # id: build_docker_image_step |
| 56 | + # with: |
| 57 | + # dockerfile: ${{ github.workspace }}/tools/ci_build/github/linux/docker/Dockerfile.manylinux2_28_webgpu |
| 58 | + # image-name: ghcr.io/microsoft/onnxruntime/onnxruntimecpubuildcix64 |
| 59 | + # push: true |
| 60 | + # azure-container-registry-name: onnxruntimebuildcache |
| 61 | + # env: |
| 62 | + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Pass token to action |
| 63 | + |
| 64 | + # # --- Download Build Artifact to Runner Temp Directory --- |
| 65 | + # - name: Download Build Artifact |
| 66 | + # uses: actions/download-artifact@v4 |
| 67 | + # with: |
| 68 | + # name: build-output-x64-Release # Must match the upload name |
| 69 | + # path: ${{ runner.temp }}/Release # Download contents into temp dir structure |
| 70 | + |
| 71 | + # # --- Restore Permissions in the Temp Directory --- |
| 72 | + # - name: Restore Executable Permissions |
| 73 | + # if: success() # Only run if download succeeded |
| 74 | + # working-directory: ${{ runner.temp }}/Release |
| 75 | + # shell: bash |
| 76 | + # run: | |
| 77 | + # if [ -f perms.txt ]; then |
| 78 | + # echo "Restoring executable permissions in ${{ runner.temp }}/Release ..." |
| 79 | + # while IFS= read -r file; do |
| 80 | + # # Check relative path existence within the current directory |
| 81 | + # if [ -f "$file" ]; then |
| 82 | + # chmod +x "$file" |
| 83 | + # else |
| 84 | + # echo "Warning: File '$file' listed in perms.txt not found." |
| 85 | + # fi |
| 86 | + # done < perms.txt |
| 87 | + # echo "Permissions restored." |
| 88 | + # else |
| 89 | + # echo "Warning: perms.txt not found in artifact." |
| 90 | + # fi |
| 91 | + |
| 92 | + # - name: Test ONNX Runtime |
| 93 | + # id: test_step |
| 94 | + # uses: microsoft/onnxruntime-github-actions/run-build-script-in-docker@v0.0.7 |
| 95 | + # with: |
| 96 | + # docker_image: ${{ steps.build_docker_image_step.outputs.full-image-name }} |
| 97 | + # build_config: Release |
| 98 | + # mode: 'test' # Set mode to test |
| 99 | + # execution_providers: 'webgpu' |
| 100 | + # extra_build_flags: '--use_binskim_compliant_compile_flags --cmake_extra_defines onnxruntime_BUILD_UNIT_TESTS=ON' |
| 101 | + # python_path_prefix: 'PATH=/opt/python/cp310-cp310/bin:$PATH' |
0 commit comments