1616 strategy :
1717 fail-fast : false
1818 matrix :
19- os : [ubuntu-latest, macOS-latest, windows-latest]
20- python-version : [3.9]
21- requires : ["oldest", "latest"]
19+ os : ["ubuntu-latest", "macOS-latest", "windows-latest"]
20+ python-version : ["3.9", "3.12"]
21+ requires : ["latest"]
22+ include :
23+ - { os: "ubuntu-20.04", python-version: "3.9", requires: "oldest" }
2224
2325 # Timeout: https://stackoverflow.com/a/59076067/4521646
2426 timeout-minutes : 35
@@ -31,31 +33,13 @@ jobs:
3133 uses : actions/setup-python@v5
3234 with :
3335 python-version : ${{ matrix.python-version }}
34-
35- # Github Actions: Run step on specific OS: https://stackoverflow.com/a/57948488/4521646
36- # - name: Setup macOS
37- # if: runner.os == 'macOS'
38- # run: |
39- # brew install libomp # https://github.com/pytorch/pytorch/issues/20030
36+ cache : " pip"
4037
4138 - name : Set min. dependencies
4239 if : matrix.requires == 'oldest'
4340 run : |
44- for fpath in ('requirements.txt', '_requirements/test.txt'):
45- req = open(fpath).read().replace('>=', '==')
46- open(fpath, 'w').write(req)
47- shell : python
48-
49- - name : Get pip cache dir
50- id : pip-cache
51- run : echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
52-
53- - name : Cache pip
54- uses : actions/cache@v4
55- with :
56- path : ${{ steps.pip-cache.outputs.dir }}
57- key : ${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}-pip-${{ hashFiles('requirements.txt') }}
58- restore-keys : ${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}-pip-
41+ pip install 'lightning-utilities[cli]'
42+ python -m lightning_utilities.cli requirements set-oldest --req_files='["requirements.txt"]'
5943
6044 - name : Install package & dependencies
6145 run : |
0 commit comments