diff --git a/.github/workflows/_docker-image.yml b/.github/workflows/_docker-image.yml index 701f9432fc0..a328a8fc3ca 100644 --- a/.github/workflows/_docker-image.yml +++ b/.github/workflows/_docker-image.yml @@ -3,7 +3,7 @@ name: Resolve CI docker image # linux_job_v3 passes `docker-image` straight to the runner pod's container, which # is pulled before any step runs, so nothing inside the job can derive it. Callers # depend on this workflow and name the image as -# 308535385114.dkr.ecr.us-east-1.amazonaws.com/executorch/ci-image:-. +# ${docker-registry}/ci-image:-${ci-docker-hash}. # # Nothing here waits for docker-builds. A commit that changes .ci/docker needs the # ciflow/docker label to build the images it asks for; without them the pod fails @@ -15,6 +15,12 @@ on: ci-docker-hash: description: Tag suffix shared by every executorch CI image for this commit. value: ${{ jobs.resolve.outputs.ci-docker-hash }} + docker-registry: + description: | + Registry and namespace the CI images live in. An output rather than a + literal at each call site, and not an `env`, which GitHub does not + allow in a reusable workflow's `with`. + value: 308535385114.dkr.ecr.us-east-1.amazonaws.com/executorch permissions: contents: read diff --git a/.github/workflows/_unittest.yml b/.github/workflows/_unittest.yml index 4216d3aaa27..2b702b1ac1f 100644 --- a/.github/workflows/_unittest.yml +++ b/.github/workflows/_unittest.yml @@ -30,14 +30,19 @@ on: default: 90 jobs: + docker-image: + name: Resolve CI docker image + uses: ./.github/workflows/_docker-image.yml + 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 with: - runner: linux.2xlarge.memory - docker-image: ${{ inputs.docker-image }} + runner: mt-l-x86iavx512-8-64 + docker-image: ${{ needs.docker-image.outputs.docker-registry }}/${{ inputs.docker-image }}-${{ needs.docker-image.outputs.ci-docker-hash }} submodules: 'recursive' ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} timeout: ${{ inputs.linux-timeout }}