Skip to content

Commit 2548c1b

Browse files
committed
use conda instead
1 parent 31af353 commit 2548c1b

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

.github/workflows/tests.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,33 @@ jobs:
1414
matrix:
1515
os: [ubuntu-20.04, macOS-10.15, windows-2019]
1616
python-version: [3.6, 3.7, 3.8, 3.9]
17-
pytorch-version: ["1.6", "1.7", "1.8", "1.9", "1.10", "1.11"]
17+
pytorch-version: ["1.7", "1.8", "1.9", "1.10", "1.11"]
1818

1919
steps:
2020
- name: Checkout
2121
uses: actions/checkout@v2
2222

23-
- name: Set up Python ${{ matrix.python-version }}
24-
uses: actions/setup-python@v2
23+
- name: Setup Miniconda using Python ${{ matrix.python-version }}
24+
uses: conda-incubator/setup-miniconda@v2
2525
with:
26+
miniforge-variant: Mambaforge
27+
miniforge-version: latest
28+
use-mamba: true
2629
python-version: ${{ matrix.python-version }}
30+
channels: pytorch,pytorch-test,pytorch-nightly,conda-forge
31+
channel-priority: true
32+
use-only-tar-bz2: true
33+
# prevent hanging Conda creations
34+
timeout-minutes: 10
2735

2836
- name: Install dependencies
2937
run: |
30-
python -m pip install --upgrade pip
31-
pip install torch==${{ matrix.pytorch-version }}
38+
conda info
39+
conda install cpuonly mkl pytorch=${{ matrix.pytorch-version }} packaging
3240
pip install -r requirements.txt
3341
pip install -r requirements_tests.txt
42+
pip list
43+
python -c "from torch import __version__ as ver; assert '.'.join(ver.split('.')[:2]) == '${{ matrix.pytorch-version }}', ver"
3444
3545
- name: Install package
3646
run: |

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
torch>=1.6
1+
torch>=1.7
22
numpy>=1.16.4
33
torchplot
44
networkx

0 commit comments

Comments
 (0)