diff --git a/.github/actions/set-channel/action.yml b/.github/actions/set-channel/action.yml index 388d073720..608f2cb16d 100644 --- a/.github/actions/set-channel/action.yml +++ b/.github/actions/set-channel/action.yml @@ -6,11 +6,6 @@ description: Add CHANNEL to GITHUB_ENV runs: using: composite steps: - - name: Set default CHANNEL - shell: bash - run: | - set -euxo pipefail - echo "CHANNEL=nightly" >> "${GITHUB_ENV}" - name: Set CHANNEL for tagged pushes if: ${{ github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/') }} shell: bash @@ -26,3 +21,12 @@ runs: run: | set -euxo pipefail echo "CHANNEL=test" >> "$GITHUB_ENV" + - name: Set default CHANNEL + # Set this to nightly only when the CHANNEL hasn't been set yet. In GHA, once + # an env is set, it's fixed unless we can figure out a way to overwrite it in + # $GITHUB_ENV + if: ${{ env.CHANNEL == '' }} + shell: bash + run: | + set -euxo pipefail + echo "CHANNEL=nightly" >> "${GITHUB_ENV}" diff --git a/.github/workflows/build_conda_linux.yml b/.github/workflows/build_conda_linux.yml index 75879adcb3..ad126ac3a7 100644 --- a/.github/workflows/build_conda_linux.yml +++ b/.github/workflows/build_conda_linux.yml @@ -96,6 +96,12 @@ jobs: ref: ${{ inputs.test-infra-ref }} path: test-infra - uses: ./test-infra/.github/actions/set-channel + - name: Set PYTORCH_VERSION + if: ${{ env.CHANNEL == 'test' }} + run: | + # When building RC, set the version to be the current candidate version, + # otherwise, leave it alone so nightly will pick up the latest + echo "PYTORCH_VERSION=${{ matrix.stable_version }}" >> "${GITHUB_ENV}" - uses: ./test-infra/.github/actions/setup-binary-builds with: repository: ${{ inputs.repository }} diff --git a/.github/workflows/build_conda_macos.yml b/.github/workflows/build_conda_macos.yml index 022bbf4d1f..b136668446 100644 --- a/.github/workflows/build_conda_macos.yml +++ b/.github/workflows/build_conda_macos.yml @@ -106,6 +106,12 @@ jobs: - name: Set env variable for architecture name run: echo "ARCH_NAME=$(uname -m)" >> "${GITHUB_ENV}" - uses: ./test-infra/.github/actions/set-channel + - name: Set PYTORCH_VERSION + if: ${{ env.CHANNEL == 'test' }} + run: | + # When building RC, set the version to be the current candidate version, + # otherwise, leave it alone so nightly will pick up the latest + echo "PYTORCH_VERSION=${{ matrix.stable_version }}" >> "${GITHUB_ENV}" - uses: ./test-infra/.github/actions/setup-binary-builds with: repository: ${{ inputs.repository }} diff --git a/.github/workflows/build_conda_windows.yml b/.github/workflows/build_conda_windows.yml index dc760b1a16..e6a999549e 100644 --- a/.github/workflows/build_conda_windows.yml +++ b/.github/workflows/build_conda_windows.yml @@ -96,6 +96,12 @@ jobs: ref: ${{ inputs.test-infra-ref }} path: test-infra - uses: ./test-infra/.github/actions/set-channel + - name: Set PYTORCH_VERSION + if: ${{ env.CHANNEL == 'test' }} + run: | + # When building RC, set the version to be the current candidate version, + # otherwise, leave it alone so nightly will pick up the latest + echo "PYTORCH_VERSION=${{ matrix.stable_version }}" >> "${GITHUB_ENV}" - uses: ./test-infra/.github/actions/setup-ssh name: Setup SSH with: diff --git a/.github/workflows/build_wheels_linux.yml b/.github/workflows/build_wheels_linux.yml index 848bc18cbf..7498582e23 100644 --- a/.github/workflows/build_wheels_linux.yml +++ b/.github/workflows/build_wheels_linux.yml @@ -139,6 +139,12 @@ jobs: echo "/opt/conda/bin" >> $GITHUB_PATH set -e - uses: ./test-infra/.github/actions/set-channel + - name: Set PYTORCH_VERSION + if: ${{ env.CHANNEL == 'test' }} + run: | + # When building RC, set the version to be the current candidate version, + # otherwise, leave it alone so nightly will pick up the latest + echo "PYTORCH_VERSION=${{ matrix.stable_version }}" >> "${GITHUB_ENV}" - uses: ./test-infra/.github/actions/setup-binary-builds env: PLATFORM: ${{ inputs.architecture == 'aarch64' && 'linux-aarch64' || ''}} diff --git a/.github/workflows/build_wheels_macos.yml b/.github/workflows/build_wheels_macos.yml index 417f0954a3..bf8a0341fa 100644 --- a/.github/workflows/build_wheels_macos.yml +++ b/.github/workflows/build_wheels_macos.yml @@ -103,6 +103,12 @@ jobs: ref: ${{ inputs.test-infra-ref }} path: test-infra - uses: ./test-infra/.github/actions/set-channel + - name: Set PYTORCH_VERSION + if: ${{ env.CHANNEL == 'test' }} + run: | + # When building RC, set the version to be the current candidate version, + # otherwise, leave it alone so nightly will pick up the latest + echo "PYTORCH_VERSION=${{ matrix.stable_version }}" >> "${GITHUB_ENV}" - uses: ./test-infra/.github/actions/setup-binary-builds with: repository: ${{ inputs.repository }} diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index 7e5fe136d0..ebc6c1025b 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -110,6 +110,12 @@ jobs: run: | echo "C:/Jenkins/Miniconda3/Scripts" >> $GITHUB_PATH - uses: ./test-infra/.github/actions/set-channel + - name: Set PYTORCH_VERSION + if: ${{ env.CHANNEL == 'test' }} + run: | + # When building RC, set the version to be the current candidate version, + # otherwise, leave it alone so nightly will pick up the latest + echo "PYTORCH_VERSION=${{ matrix.stable_version }}" >> "${GITHUB_ENV}" - uses: ./test-infra/.github/actions/setup-binary-builds with: repository: ${{ inputs.repository }} diff --git a/.github/workflows/generate_binary_build_matrix.yml b/.github/workflows/generate_binary_build_matrix.yml index a9a19d4b16..96f7fa69d6 100644 --- a/.github/workflows/generate_binary_build_matrix.yml +++ b/.github/workflows/generate_binary_build_matrix.yml @@ -13,7 +13,7 @@ on: type: string channel: description: "Channel to use (nightly, test, release, all)" - default: "nightly" + default: "" type: string test-infra-repository: description: "Test infra repository to use" @@ -60,7 +60,7 @@ jobs: env: PACKAGE_TYPE: ${{ inputs.package-type }} OS: ${{ inputs.os }} - CHANNEL: ${{ inputs.channel }} + CHANNEL: ${{ inputs.channel != '' && inputs.channel || env.CHANNEL }} WITH_CUDA: ${{ inputs.with-cuda }} WITH_ROCM: ${{ inputs.with-rocm }} WITH_CPU: ${{ inputs.with-cpu }} diff --git a/tools/scripts/generate_binary_build_matrix.py b/tools/scripts/generate_binary_build_matrix.py index dbf09ac5f7..3e7b6b3be6 100644 --- a/tools/scripts/generate_binary_build_matrix.py +++ b/tools/scripts/generate_binary_build_matrix.py @@ -60,7 +60,7 @@ ROCM = "rocm" -CURRENT_CANDIDATE_VERSION = "2.1.2" +CURRENT_CANDIDATE_VERSION = "2.2.0" CURRENT_STABLE_VERSION = "2.1.1" mod.CURRENT_VERSION = CURRENT_STABLE_VERSION