Skip to content

Commit 043b6d8

Browse files
committed
cleanup
1 parent 97ea408 commit 043b6d8

File tree

1 file changed

+9
-54
lines changed

1 file changed

+9
-54
lines changed

.github/workflows/test-linux-cpu.yml

Lines changed: 9 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ jobs:
1818
steps:
1919
- name: Checkout repository
2020
uses: actions/checkout@v2
21-
- name: Set Channel
22-
if: ${{ (github.event_name == 'pull_request' && startsWith(github.base_ref, 'release')) || startsWith(github.ref, 'refs/heads/release') }}
23-
run: |
24-
echo "CHANNEL=test" >> "$GITHUB_ENV"
2521
tests:
2622
strategy:
2723
matrix:
@@ -31,23 +27,27 @@ jobs:
3127
with:
3228
runner: linux.12xlarge
3329
script: |
30+
# Mark Build Directory Safe
31+
git config --global --add safe.directory /__w/vision/vision
32+
33+
# Set up Environment Variables
3434
export ENV_NAME=conda-env-"${{ github.run_id }}"
3535
export PYTHON_VERSION="${{ matrix.py_vers }}"
3636
export VERSION="cpu"
3737
export CUDATOOLKIT="cpuonly"
38+
39+
# Set CHANNEL
3840
if [[${{ (github.event_name == 'pull_request' && startsWith(github.base_ref, 'release')) || startsWith(github.ref, 'refs/heads/release') }} ]]; then
3941
export CHANNEL=test
4042
else
4143
export CHANNEL=nightly
4244
fi
4345
44-
git config --global --add safe.directory /__w/vision/vision
45-
# . ~/miniconda3/etc/profile.d/conda.sh
46+
# Create Conda Env
4647
conda create -yp "${ENV_NAME}" python="${PYTHON_VERSION}" numpy libpng jpeg scipy
47-
# echo "CONDA_RUN=conda run -p ${ENV_NAME}" >> "$GITHUB_ENV"
4848
export CONDA_RUN="conda run -p ${ENV_NAME}"
4949
50-
# export PATH=~/miniconda3/bin:$PATH
50+
# Install PyTorch, Torchvision, and testing libraries
5151
set -ex
5252
${CONDA_RUN} conda install \
5353
--yes \
@@ -57,51 +57,6 @@ jobs:
5757
${CONDA_RUN} python3 setup.py develop
5858
${CONDA_RUN} python3 -m pip install pytest pytest-mock 'av<10'
5959
60+
# Run Tests
6061
${CONDA_RUN} python3 -m torch.utils.collect_env
6162
${CONDA_RUN} python3 -m pytest --junitxml=test-results/junit.xml -v --durations 20
62-
63-
# steps:
64-
# - name: Checkout repository
65-
# uses: actions/checkout@v2
66-
# - name: Set Release CHANNEL (for release)
67-
# if: ${{ (github.event_name == 'pull_request' && startsWith(github.base_ref, 'release')) || startsWith(github.ref, 'refs/heads/release') }}
68-
# run: |
69-
# echo "CHANNEL=test" >> "$GITHUB_ENV"
70-
# - name: Setup Conda
71-
# shell: bash -l {0}
72-
# env:
73-
# ENV_NAME: conda-env-${{ github.run_id }}
74-
# PY_VERS: ${{ matrix.py_vers }}
75-
# run: |
76-
# git config --global --add safe.directory /__w/vision/vision
77-
# . ~/miniconda3/etc/profile.d/conda.sh
78-
# conda create -yp ${ENV_NAME} python=${PY_VERS} numpy libpng jpeg scipy
79-
# echo "CONDA_RUN=conda run -p ${ENV_NAME}" >> "$GITHUB_ENV"
80-
# - name: Install TorchVision
81-
# shell: bash -l {0}
82-
# env:
83-
# VERSION: cpu
84-
# CUDATOOLKIT: cpuonly
85-
# run: |
86-
# # Needed for JPEG library detection as setup.py detects conda presence
87-
# # by running `shutil.which('conda')`
88-
# export PATH=~/miniconda3/bin:$PATH
89-
# set -ex
90-
# ${CONDA_RUN} conda install \
91-
# --yes \
92-
# -c "pytorch-${CHANNEL}" \
93-
# -c nvidia "pytorch-${CHANNEL}"::pytorch[build="*${VERSION}*"] \
94-
# "${CUDATOOLKIT}"
95-
# ${CONDA_RUN} python3 setup.py develop
96-
# ${CONDA_RUN} python3 -m pip install pytest pytest-mock 'av<10'
97-
# - name: Run tests
98-
# shell: bash -l {0}
99-
# env:
100-
# ENV_NAME: conda-env-${{ github.run_id }}
101-
# PY_VERS: ${{ matrix.py_vers }}
102-
# run: |
103-
# . ~/miniconda3/etc/profile.d/conda.sh
104-
# set -ex
105-
# ${CONDA_RUN} python3 -m torch.utils.collect_env
106-
# ${CONDA_RUN} python3 -m pytest --junitxml=test-results/junit.xml -v --durations 20
107-
# conda env remove -p ${ENV_NAME}

0 commit comments

Comments
 (0)