Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion .github/workflows/linux_job_v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ on:
description: 'Number of commits to fetch, defaults to 1 similar to actions/checkout'
default: 1
type: number
single-branch:
description: 'Whether to fetch only a single branch, defaults to true'
default: true
type: boolean
checkout-mode:
description: 'Mode of checkout; one of "normal", "blobless", "treeless".'
default: "normal"
type: string
submodules:
description:
Same as actions/checkout, set to `true` to checkout submodules or `recursive` to
Expand Down Expand Up @@ -124,6 +132,7 @@ jobs:
# Will be blank outside of this
PR_NUMBER: ${{ github.event.pull_request.number }}
SCRIPT: ${{ inputs.script }}
filter: ${{ inputs.checkout-mode == 'blobless' && 'blob:none' || inputs.checkout-mode == 'treeless' && 'tree:0' || null }}
runs-on: ${{ inputs.runner }}
# TODO: Eventually this should run in a container, we need to make a container that matches up
# with the users for our self hosted runner infra since using actions/checkout with a root
Expand Down Expand Up @@ -177,14 +186,17 @@ jobs:
docker exec -it $(docker container ps --format '{{.ID}}') bash

- name: Checkout repository (${{ inputs.repository || github.repository }}@${{ inputs.ref }})
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
uses: ./test-infra/.github/actions/checkout
with:
# Support the use case where we need to checkout someone's fork
repository: ${{ inputs.repository || github.repository }}
ref: ${{ inputs.ref || github.ref }}
single-branch: ${{ inputs.single-branch }}
path: ${{ inputs.repository || github.repository }}
fetch-depth: ${{ inputs.fetch-depth }}
submodules: ${{ inputs.submodules }}
filter: ${{ env.filter }}
submodules-filter: ${{ env.filter }}

- name: Calculate docker image
id: calculate-docker-image
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test_linux_job_v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
runner: linux.2xlarge
test-infra-repository: ${{ github.repository }}
test-infra-ref: ${{ github.ref }}
checkout-mode: "treeless"
submodules: "recursive"
gpu-arch-type: cpu
gpu-arch-version: ""
Expand Down
Loading