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: ...@@ -7,6 +7,7 @@ on:
branches: branches:
- nightly - nightly
- main - main
- release/*
tags: tags:
# NOTE: Binary build pipelines should only get triggered on release candidate builds # NOTE: Binary build pipelines should only get triggered on release candidate builds
# Release candidate tags look like: v1.11.0-rc1 # Release candidate tags look like: v1.11.0-rc1
...@@ -31,6 +32,10 @@ jobs: ...@@ -31,6 +32,10 @@ jobs:
if [[ ${GITHUB_REF_NAME} = *-rc[0-9]* ]]; then if [[ ${GITHUB_REF_NAME} = *-rc[0-9]* ]]; then
echo "CHANNEL=test" >> "$GITHUB_ENV" echo "CHANNEL=test" >> "$GITHUB_ENV"
fi 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 - name: Build TorchVision M1 wheel
shell: arch -arch arm64 bash {0} shell: arch -arch arm64 bash {0}
env: env:
...@@ -104,6 +109,10 @@ jobs: ...@@ -104,6 +109,10 @@ jobs:
if [[ ${GITHUB_REF_NAME} = *-rc[0-9]* ]]; then if [[ ${GITHUB_REF_NAME} = *-rc[0-9]* ]]; then
echo "CHANNEL=test" >> "$GITHUB_ENV" echo "CHANNEL=test" >> "$GITHUB_ENV"
fi 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 - name: Install conda-build and purge previous artifacts
shell: arch -arch arm64 bash {0} shell: arch -arch arm64 bash {0}
run: | run: |
......
...@@ -7,7 +7,10 @@ on: ...@@ -7,7 +7,10 @@ on:
branches: branches:
- nightly - nightly
- main - main
- release/*
workflow_dispatch: workflow_dispatch:
env:
CHANNEL: "nightly"
jobs: jobs:
tests: tests:
name: "Unit-tests on M1" name: "Unit-tests on M1"
...@@ -19,6 +22,10 @@ jobs: ...@@ -19,6 +22,10 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v2 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 - name: Install TorchVision
shell: arch -arch arm64 bash {0} shell: arch -arch arm64 bash {0}
env: env:
...@@ -30,7 +37,7 @@ jobs: ...@@ -30,7 +37,7 @@ jobs:
export PATH=~/miniconda3/bin:$PATH export PATH=~/miniconda3/bin:$PATH
set -ex set -ex
conda create -yp ${ENV_NAME} python=${PY_VERS} numpy libpng jpeg scipy 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 setup.py develop
conda run -p ${ENV_NAME} python3 -mpip install pytest pytest-mock av conda run -p ${ENV_NAME} python3 -mpip install pytest pytest-mock av
- name: Run tests - 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