-
Notifications
You must be signed in to change notification settings - Fork 486
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create
_setup.yml
to wrap common setup steps.
- Loading branch information
1 parent
1cad403
commit 4812c58
Showing
2 changed files
with
39 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
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 |