Skip to content

Commit

Permalink
Use git directly instead of actions/checkout on Windows (#13186)
Browse files Browse the repository at this point in the history
The GitHub-provided `actions/checkout` action is for some reason
unusably slow on the large managed Windows runners. We assumed this was
because of some tricky IO issue or something, but I decide to just try
directly using `git` commands to see and lo the checkout time goes from
10 minutes to 1.5 🚀 

With the caching improvements from
#13183, this gets the Windows build
down under 10 minutes, which means we can run it on presubmit (left for
a future PR).

Part of #11009

Tested:
Enabled this workflow on push to my branch:
https://github.com/openxla/iree/actions/runs/4750681034/jobs/8439091687

skip-ci: this only affects the Windows job, which isn't run on presubmit
  • Loading branch information
GMNGeoffrey authored Apr 20, 2023
1 parent 0ab01b6 commit 0d82968
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,21 @@ jobs:
token_format: "access_token"
credentials_json: "${{ secrets.IREE_OSS_GITHUB_RUNNER_BASIC_TRUST_SERVICE_ACCOUNT_KEY }}"
create_credentials_file: false
# actions/cache is for some reason unusably slow on the large managed
# Windows GitHub runners so we roll our own. See
# https://github.com/actions/checkout/issues/1186
# TODO(gcmn): Factor this out into something reusable across jobs. Can't
# be a script because we haven't done the checkout yet :-)
- name: "Checking out repository"
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: "Updating git submodules"
run: git submodule update --init --jobs 8 --depth 1
env:
REMOTE_URL: ${{ github.server_url }}/${{ github.repository }}
run: |
mkdir -p ${GITHUB_WORKSPACE}
cd ${GITHUB_WORKSPACE}
git init
git fetch --depth 1 "${REMOTE_URL}" "${GITHUB_SHA}"
git checkout "${GITHUB_SHA}"
git submodule update --init --jobs 8 --depth 1
- name: "Setting up Python"
uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4.5.0
with:
Expand Down

0 comments on commit 0d82968

Please sign in to comment.