Skip to content

Create _setup.yml to wrap common setup steps. #1

Create _setup.yml to wrap common setup steps.

Create _setup.yml to wrap common setup steps. #1

Workflow file for this run

name: Set up PyTorch/XLA
inputs:
torch-commit:
required: true
type: string
remote-cache:
required: true
type: string
description: Whether to set up Google Cloud credentials for Bazel cache.
runs:
using: "composite"
steps:
# See https://github.com/actions/checkout/issues/1014#issuecomment-1906802802
- name: Clean up workspace
run: |
ls -la
rm -rvf ${GITHUB_WORKSPACE}/*
- name: Setup gcloud
shell: bash
run: |
echo "${GCLOUD_SERVICE_KEY}" > /tmp/default_credentials.json
echo "GOOGLE_APPLICATION_CREDENTIALS=/tmp/default_credentials.json" >> $GITHUB_ENV
if: ${{ inputs.remote-cache }}
- name: Checkout PyTorch Repo
uses: actions/checkout@v4
with:
repository: pytorch/pytorch
path: pytorch
ref: c
submodules: recursive
- name: Checkout PyTorch/XLA Repo
uses: actions/checkout@v4
with:
path: pytorch/xla