Unverified Commit 369317f4 authored by Andrey Talman's avatar Andrey Talman Committed by GitHub
Browse files

Make sure we are building against test channel for release (#6168)

* Make sure we are building against test chanell for release

* Cleanup

* Cleanup

* Refactoring logic

* Remove tagged tests
parent 0e688ce0
......@@ -7,6 +7,7 @@ on:
branches:
- nightly
- main
- release/*
tags:
# NOTE: Binary build pipelines should only get triggered on release candidate builds
# Release candidate tags look like: v1.11.0-rc1
......@@ -31,6 +32,10 @@ jobs:
if [[ ${GITHUB_REF_NAME} = *-rc[0-9]* ]]; then
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, 'release') }}
run: |
echo "CHANNEL=test" >> "$GITHUB_ENV"
- name: Build TorchVision M1 wheel
shell: arch -arch arm64 bash {0}
env:
......@@ -104,6 +109,10 @@ jobs:
if [[ ${GITHUB_REF_NAME} = *-rc[0-9]* ]]; then
echo "CHANNEL=test" >> "$GITHUB_ENV"
fi
- name: Set CHANNEL Release (for release)
if: ${{ (github.event_name == 'pull_request' && startsWith(github.base_ref, 'release')) || startsWith(github.ref, 'release') }}
run: |
echo "CHANNEL=test" >> "$GITHUB_ENV"
- name: Install conda-build and purge previous artifacts
shell: arch -arch arm64 bash {0}
run: |
......
......@@ -7,7 +7,10 @@ on:
branches:
- nightly
- main
- release/*
workflow_dispatch:
env:
CHANNEL: "nightly"
jobs:
tests:
name: "Unit-tests on M1"
......@@ -19,6 +22,10 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set Release CHANNEL (for release)
if: ${{ (github.event_name == 'pull_request' && startsWith(github.base_ref, 'release')) || startsWith(github.ref, 'release') }}
run: |
echo "CHANNEL=test" >> "$GITHUB_ENV"
- name: Install TorchVision
shell: arch -arch arm64 bash {0}
env:
......@@ -30,7 +37,7 @@ jobs:
export PATH=~/miniconda3/bin:$PATH
set -ex
conda create -yp ${ENV_NAME} python=${PY_VERS} numpy libpng jpeg scipy
conda run -p ${ENV_NAME} python3 -mpip install --pre torch --extra-index-url=https://download.pytorch.org/whl/nightly
conda run -p ${ENV_NAME} python3 -mpip install --pre torch --extra-index-url=https://download.pytorch.org/whl/${CHANNEL}
conda run -p ${ENV_NAME} python3 setup.py develop
conda run -p ${ENV_NAME} python3 -mpip install pytest pytest-mock av
- name: Run tests
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment