From 5fbd4edd2334ec970a6ce2a820ae8f8d8eacc1a5 Mon Sep 17 00:00:00 2001 From: Huy Do Date: Thu, 27 Aug 2026 18:54:40 -0700 Subject: [PATCH] Move the remaining Linux workflows to linux_job_v3 build-presets, build-cadence-runner, build-cmsis-pack, test-pico2-build, test-webgpu-native, doc-build and android-release-artifacts. doc-build's upload-gh-pages drops run-with-docker: false, which v3 does not have. v2 needed it because the script ran through a docker exec that could not see the credentials checkout persisted on the host; v3 checks out and runs the script in the same container, so the git config the push relies on is there. This leaves only rocm.yml on v2, which has no OSDC hardware and maps to itself in arc.yaml. Authored with Claude Code. --- .../workflows/android-release-artifacts.yml | 10 ++++-- .github/workflows/build-cadence-runner.yml | 11 +++++-- .github/workflows/build-cmsis-pack.yml | 11 +++++-- .github/workflows/build-presets.yml | 32 +++++++++++++------ .github/workflows/doc-build.yml | 14 +++++--- .github/workflows/test-pico2-build.yml | 18 +++++++---- .github/workflows/test-webgpu-native.yml | 14 ++++++-- 7 files changed, 77 insertions(+), 33 deletions(-) diff --git a/.github/workflows/android-release-artifacts.yml b/.github/workflows/android-release-artifacts.yml index 0cf179109ed..58bcfa12b2f 100644 --- a/.github/workflows/android-release-artifacts.yml +++ b/.github/workflows/android-release-artifacts.yml @@ -40,6 +40,10 @@ on: - cron: 0 10 * * * jobs: + docker-image: + name: Resolve CI docker image + uses: ./.github/workflows/_docker-image.yml + check-if-aar-exists: name: check-if-aar-exists runs-on: ubuntu-22.04 @@ -71,16 +75,16 @@ jobs: build-aar: name: build-aar - needs: check-if-aar-exists + needs: [docker-image, check-if-aar-exists] if: ${{ !github.event.pull_request.head.repo.fork && needs.check-if-aar-exists.outputs.should-skip != 'true' }} - uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main + uses: pytorch/test-infra/.github/workflows/linux_job_v3.yml@main secrets: inherit permissions: id-token: write contents: read with: secrets-env: EXECUTORCH_MAVEN_SIGNING_KEYID EXECUTORCH_MAVEN_SIGNING_PASSWORD EXECUTORCH_MAVEN_CENTRAL_PASSWORD EXECUTORCH_MAVEN_CENTRAL_USERNAME EXECUTORCH_MAVEN_SIGNING_GPG_KEY_CONTENTS - docker-image: ci-image:executorch-ubuntu-22.04-clang12-android + docker-image: ${{ needs.docker-image.outputs.docker-registry }}/ci-image:executorch-ubuntu-22.04-clang12-android-${{ needs.docker-image.outputs.ci-docker-hash }} submodules: 'recursive' ref: ${{ github.sha }} timeout: 90 diff --git a/.github/workflows/build-cadence-runner.yml b/.github/workflows/build-cadence-runner.yml index c12343f48e3..6d1627c4279 100644 --- a/.github/workflows/build-cadence-runner.yml +++ b/.github/workflows/build-cadence-runner.yml @@ -19,6 +19,10 @@ concurrency: cancel-in-progress: true jobs: + docker-image: + name: Resolve CI docker image + uses: ./.github/workflows/_docker-image.yml + # Same-repo PRs run on pull_request, which reads the PR's own workflow AND code # -- so CI changes, new test jobs, code, and tests are all validated pre-merge. # Fork PRs can't get credentials (OIDC) on pull_request, so Meta-exported forks @@ -26,19 +30,20 @@ jobs: # run condition is inlined per job (GitHub Actions has no YAML anchors and env # is unavailable in job-level if), so keep the copies in sync. cpu-build: + needs: docker-image if: >- github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) || (github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository && contains(github.event.pull_request.labels.*.name, 'CLA Signed') && contains(github.event.pull_request.labels.*.name, 'meta-exported')) - uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main + uses: pytorch/test-infra/.github/workflows/linux_job_v3.yml@main permissions: id-token: write contents: read with: job-name: build - runner: linux.2xlarge - docker-image: ci-image:executorch-ubuntu-22.04-clang12 + runner: mt-l-x86iavx512-8-64 + docker-image: ${{ needs.docker-image.outputs.docker-registry }}/ci-image:executorch-ubuntu-22.04-clang12-${{ needs.docker-image.outputs.ci-docker-hash }} submodules: recursive ref: ${{ (github.event_name == 'pull_request' || github.event_name == 'pull_request_target') && github.event.pull_request.head.sha || github.sha }} timeout: 90 diff --git a/.github/workflows/build-cmsis-pack.yml b/.github/workflows/build-cmsis-pack.yml index c9c40d670f1..d0f952f9e0a 100644 --- a/.github/workflows/build-cmsis-pack.yml +++ b/.github/workflows/build-cmsis-pack.yml @@ -44,15 +44,20 @@ concurrency: cancel-in-progress: true jobs: + docker-image: + name: Resolve CI docker image + uses: ./.github/workflows/_docker-image.yml + build-cmsis-pack: + needs: docker-image name: build-cmsis-pack - uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main + uses: pytorch/test-infra/.github/workflows/linux_job_v3.yml@main permissions: id-token: write contents: read with: - runner: linux.2xlarge - docker-image: ci-image:executorch-ubuntu-22.04-arm-sdk + runner: mt-l-x86iavx512-8-64 + docker-image: ${{ needs.docker-image.outputs.docker-registry }}/ci-image:executorch-ubuntu-22.04-arm-sdk-${{ needs.docker-image.outputs.ci-docker-hash }} submodules: 'recursive' ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} timeout: 60 diff --git a/.github/workflows/build-presets.yml b/.github/workflows/build-presets.yml index 89d36cd6b0a..ed85ec1176c 100644 --- a/.github/workflows/build-presets.yml +++ b/.github/workflows/build-presets.yml @@ -13,6 +13,10 @@ concurrency: cancel-in-progress: true jobs: + docker-image: + name: Resolve CI docker image + uses: ./.github/workflows/_docker-image.yml + apple: uses: pytorch/test-infra/.github/workflows/macos_job.yml@main strategy: @@ -34,7 +38,11 @@ jobs: ${CONDA_RUN} cmake --build cmake-out -j$(( $(sysctl -n hw.ncpu) - 1 )) zephyr: - uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main + needs: docker-image + uses: pytorch/test-infra/.github/workflows/linux_job_v3.yml@main + permissions: + id-token: write + contents: read strategy: fail-fast: false matrix: @@ -42,8 +50,8 @@ jobs: with: job-name: build ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} - runner: linux.2xlarge - docker-image: ci-image:executorch-ubuntu-22.04-zephyr-sdk + runner: mt-l-x86iavx512-8-64 + docker-image: ${{ needs.docker-image.outputs.docker-registry }}/ci-image:executorch-ubuntu-22.04-zephyr-sdk-${{ needs.docker-image.outputs.ci-docker-hash }} submodules: recursive timeout: 90 script: | @@ -73,26 +81,30 @@ jobs: cmake --preset ${{ matrix.preset }} cmake --build cmake-out -j$(( $(nproc) - 1 )) linux: - uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main + needs: docker-image + uses: pytorch/test-infra/.github/workflows/linux_job_v3.yml@main + permissions: + id-token: write + contents: read strategy: fail-fast: false matrix: preset: [linux, pybind, llm] - runner: [linux.2xlarge, linux.arm64.2xlarge] + runner: [mt-l-x86iavx512-8-64, mt-l-arm64g4-16-62] docker-image: [executorch-ubuntu-22.04-clang12, executorch-ubuntu-22.04-gcc11-aarch64] # Excluding specific runner + docker image combinations that don't make sense: - # - Excluding the ARM64 gcc image on the x86 runner (linux.2xlarge) - # - Excluding the x86 clang image on the ARM64 runner (linux.arm64.2xlarge) + # - Excluding the ARM64 gcc image on the x86 runner + # - Excluding the x86 clang image on the ARM64 runner exclude: - - runner: linux.2xlarge + - runner: mt-l-x86iavx512-8-64 docker-image: executorch-ubuntu-22.04-gcc11-aarch64 - - runner: linux.arm64.2xlarge + - runner: mt-l-arm64g4-16-62 docker-image: executorch-ubuntu-22.04-clang12 with: job-name: build ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} runner: ${{ matrix.runner }} - docker-image: ci-image:${{ matrix.docker-image }} + docker-image: ${{ needs.docker-image.outputs.docker-registry }}/ci-image:${{ matrix.docker-image }}-${{ needs.docker-image.outputs.ci-docker-hash }} submodules: recursive timeout: 90 script: | diff --git a/.github/workflows/doc-build.yml b/.github/workflows/doc-build.yml index 0921d78f821..30fd424fe4b 100644 --- a/.github/workflows/doc-build.yml +++ b/.github/workflows/doc-build.yml @@ -18,8 +18,13 @@ concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: + docker-image: + name: Resolve CI docker image + uses: ./.github/workflows/_docker-image.yml + build: - uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main + needs: docker-image + uses: pytorch/test-infra/.github/workflows/linux_job_v3.yml@main permissions: id-token: write contents: read @@ -29,8 +34,8 @@ jobs: - build-tool: buck2 with: job-name: Build doc - runner: linux.2xlarge - docker-image: ci-image:executorch-ubuntu-22.04-clang12-android + runner: mt-l-x86iavx512-8-64 + docker-image: ${{ needs.docker-image.outputs.docker-registry }}/ci-image:executorch-ubuntu-22.04-clang12-android-${{ needs.docker-image.outputs.ci-docker-hash }} submodules: 'recursive' repository: pytorch/executorch upload-artifact: docs @@ -98,7 +103,7 @@ jobs: permissions: id-token: write contents: write - uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main + uses: pytorch/test-infra/.github/workflows/linux_job_v3.yml@main secrets: inherit with: repository: pytorch/executorch @@ -106,7 +111,6 @@ jobs: ref: gh-pages # Publish on the host so actions/checkout's persisted credentials are # available to git push. - run-with-docker: false timeout: 90 script: | set -euo pipefail diff --git a/.github/workflows/test-pico2-build.yml b/.github/workflows/test-pico2-build.yml index 860cf5381c6..01f6af9fa2e 100644 --- a/.github/workflows/test-pico2-build.yml +++ b/.github/workflows/test-pico2-build.yml @@ -18,15 +18,20 @@ concurrency: cancel-in-progress: true jobs: + docker-image: + name: Resolve CI docker image + uses: ./.github/workflows/_docker-image.yml + test-pico2-fp32-build: + needs: docker-image name: test-pico2-fp32-build - uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main + uses: pytorch/test-infra/.github/workflows/linux_job_v3.yml@main permissions: id-token: write contents: read with: - runner: linux.2xlarge.memory - docker-image: ci-image:executorch-ubuntu-22.04-arm-sdk + runner: mt-l-x86iavx512-8-64 + docker-image: ${{ needs.docker-image.outputs.docker-registry }}/ci-image:executorch-ubuntu-22.04-arm-sdk-${{ needs.docker-image.outputs.ci-docker-hash }} submodules: 'recursive' ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} timeout: 120 @@ -89,14 +94,15 @@ jobs: echo "PASS: FP32 firmware fits in Pico2 memory (SRAM: ${SRAM_USED}/532480, Flash: ${FLASH_USED}/4194304)" test-pico2-cmsis-build: + needs: docker-image name: test-pico2-cmsis-nn-build - uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main + uses: pytorch/test-infra/.github/workflows/linux_job_v3.yml@main permissions: id-token: write contents: read with: - runner: linux.2xlarge.memory - docker-image: ci-image:executorch-ubuntu-22.04-arm-sdk + runner: mt-l-x86iavx512-8-64 + docker-image: ${{ needs.docker-image.outputs.docker-registry }}/ci-image:executorch-ubuntu-22.04-arm-sdk-${{ needs.docker-image.outputs.ci-docker-hash }} submodules: 'recursive' ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} timeout: 120 diff --git a/.github/workflows/test-webgpu-native.yml b/.github/workflows/test-webgpu-native.yml index 123545ffd38..469c78606b4 100644 --- a/.github/workflows/test-webgpu-native.yml +++ b/.github/workflows/test-webgpu-native.yml @@ -29,12 +29,20 @@ concurrency: cancel-in-progress: true jobs: + docker-image: + name: Resolve CI docker image + uses: ./.github/workflows/_docker-image.yml + test-webgpu-native: - uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main + needs: docker-image + uses: pytorch/test-infra/.github/workflows/linux_job_v3.yml@main + permissions: + id-token: write + contents: read with: ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} - runner: linux.4xlarge.memory - docker-image: ci-image:executorch-ubuntu-22.04-clang12 + runner: mt-l-x86iavx512-16-128 + docker-image: ${{ needs.docker-image.outputs.docker-registry }}/ci-image:executorch-ubuntu-22.04-clang12-${{ needs.docker-image.outputs.ci-docker-hash }} submodules: recursive # The test script alone runs about 60 minutes, and the checkout plus the # Dawn and SwiftShader source builds in front of it have been measured