Skip to content
Draft
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
15 changes: 13 additions & 2 deletions .github/actions/set-channel/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,23 @@ name: Set Channel for Build Matrix Generation/Binary Build Step

description: Add CHANNEL to GITHUB_ENV

inputs:
channel:
description: 'Channel to use (nightly or test). If not provided, will be auto-detected based on git ref'
required: false
default: ''

runs:
using: composite
steps:
- name: Set CHANNEL from input
if: ${{ inputs.channel != '' }}
shell: bash
run: |
set -euxo pipefail
echo "CHANNEL=${{ inputs.channel }}" >> "${GITHUB_ENV}"
- name: Set CHANNEL for tagged pushes
if: ${{ github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/') }}
if: ${{ inputs.channel == '' && github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/') }}
shell: bash
run: |
set -euxo pipefail
Expand All @@ -16,7 +27,7 @@ runs:
echo "CHANNEL=test" >> "${GITHUB_ENV}"
fi
- name: Set Release CHANNEL for release
if: ${{ (github.event_name == 'pull_request' && startsWith(github.base_ref, 'release')) || startsWith(github.ref, 'refs/heads/release') }}
if: ${{ inputs.channel == '' && ((github.event_name == 'pull_request' && startsWith(github.base_ref, 'release')) || startsWith(github.ref, 'refs/heads/release')) }}
shell: bash
run: |
set -euxo pipefail
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/build_wheels_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ on:
description: 'Timeout for the job (in minutes)'
default: 120
type: number
channel:
description: 'Channel to use for pytorch package. Defaults to nightly, can be set to test for release candidates'
default: 'nightly'
type: string
secrets:
PYPI_API_TOKEN:
description: An optional token to upload to pypi
Expand Down Expand Up @@ -195,6 +199,8 @@ jobs:
conda config --set ssl_verify False
echo "/opt/conda/bin" >> $GITHUB_PATH
- uses: ./test-infra/.github/actions/set-channel
with:
channel: ${{ inputs.channel }}
- name: Set PYTORCH_VERSION
if: ${{ env.CHANNEL == 'test' }}
run: |
Expand Down