@@ -11,39 +11,39 @@ jobs:
1111 runs-on : ubuntu-latest
1212 strategy :
1313 matrix :
14- operating-system : [ubuntu-latest, windows-latest, macos-latest]
15- python-version : [3.7, 3.8, 3.9 ]
16- torch-version : [1.10.2, 1.11.0, 1.12.0 ]
14+ os : [ubuntu-latest, windows-latest, macos-latest]
15+ python-version : [3.9, "3.10" ]
16+ torch-version : [1.13.1, 2.5.1 ]
1717 fail-fast : false
1818
1919 steps :
2020 - name : Checkout
21- uses : actions/checkout@v2
21+ uses : actions/checkout@v4
2222
2323 - name : Set up Python
24- uses : actions/setup-python@v2
24+ uses : actions/setup-python@v5
2525 with :
2626 python-version : ${{ matrix.python-version }}
2727
2828 - name : Restore Ubuntu cache
29- uses : actions/cache@v1
30- if : matrix.operating-system == 'ubuntu-latest'
29+ uses : actions/cache@v4
30+ if : matrix.os == 'ubuntu-latest'
3131 with :
3232 path : ~/.cache/pip
3333 key : ${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/setup.py')}}
3434 restore-keys : ${{ matrix.os }}-${{ matrix.python-version }}-
3535
3636 - name : Restore MacOS cache
37- uses : actions/cache@v1
38- if : matrix.operating-system == 'macos-latest'
37+ uses : actions/cache@v4
38+ if : matrix.os == 'macos-latest'
3939 with :
4040 path : ~/Library/Caches/pip
4141 key : ${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/setup.py')}}
4242 restore-keys : ${{ matrix.os }}-${{ matrix.python-version }}-
4343
4444 - name : Restore Windows cache
45- uses : actions/cache@v1
46- if : matrix.operating-system == 'windows-latest'
45+ uses : actions/cache@v4
46+ if : matrix.os == 'windows-latest'
4747 with :
4848 path : ~\AppData\Local\pip\Cache
4949 key : ${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/setup.py')}}
5252 - name : Update pip
5353 run : python -m pip install --upgrade pip
5454
55+ - name : Install package in development mode
56+ run : pip install -e .[dev]
57+
58+ - name : Show installed packages
59+ run : pip list
60+
5561 - name : Lint with flake8, black and isort
5662 run : |
57- pip install -e .[dev]
5863 # stop the build if there are Python syntax errors or undefined names
5964 flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
6065 black . --check --config pyproject.toml
@@ -66,17 +71,23 @@ jobs:
6671 run : >
6772 pip install numpy
6873
69- - name : Install PyTorch on Linux and Windows
74+ - name : Install PyTorch==1.13.1 on Linux and Windows
7075 if : >
71- matrix.operating-system == 'ubuntu-latest' ||
72- matrix.operating-system == 'windows-latest'
76+ (matrix.os == 'ubuntu-latest' ||
77+ matrix.os == 'windows-latest') &&
78+ matrix.torch-version == '1.13.1'
7379 run : >
7480 pip install torch==${{ matrix.torch-version }}+cpu
7581 -f https://download.pytorch.org/whl/torch_stable.html
7682
77- - name : Install PyTorch on MacOS
78- if : matrix.operating-system == 'macos-latest'
79- run : pip install torch==${{ matrix.torch-version }}
83+ - name : Install PyTorch==2.5.1 on Linux and Windows
84+ if : >
85+ (matrix.os == 'ubuntu-latest' ||
86+ matrix.os == 'windows-latest') &&
87+ matrix.torch-version == '2.5.1'
88+ run : >
89+ pip install torch==${{ matrix.torch-version }}
90+ -f https://download.pytorch.org/whl/torch_stable.html
8091
8192 - name : Install balanced-loss package from local setup.py
8293 run : >
0 commit comments