|
44 | 44 | - name: Update pip |
45 | 45 | run: | |
46 | 46 | # needed for `pip cache` command |
47 | | - pip install --quiet "pip>=20.1" --upgrade --user |
| 47 | + pip install --quiet "pip==20.2" --upgrade --user |
48 | 48 |
|
49 | 49 | # Github Actions: Run step on specific OS: https://stackoverflow.com/a/57948488/4521646 |
50 | 50 | - name: Setup macOS |
|
56 | 56 | - name: Setup Windows |
57 | 57 | if: runner.os == 'windows' |
58 | 58 | run: | |
59 | | - # remove Horovod from requirements |
60 | | - fname = 'requirements/extra.txt' |
61 | | - lines = [line for line in open(fname).readlines() if not line.startswith('horovod')] |
62 | | - open(fname, 'w').writelines(lines) |
63 | | - shell: python |
| 59 | + python .github/prune-packages.py requirements/extra.txt "horovod" |
64 | 60 |
|
65 | 61 | # todo: re-enable when allow testing py 3.9 with min config, atm some Hydra issues |
66 | 62 | #- name: Adjust minimal for Python 3.9 |
|
78 | 74 | - name: Set min. dependencies |
79 | 75 | if: matrix.requires == 'minimal' |
80 | 76 | run: | |
81 | | - files = ( |
82 | | - 'requirements.txt', |
83 | | - 'requirements/extra.txt', |
84 | | - 'requirements/loggers.txt', |
85 | | - 'requirements/test.txt', |
86 | | - 'requirements/examples.txt', |
87 | | - ) |
88 | | - for fname in files: |
89 | | - req = open(fname).read().replace('>=', '==') |
90 | | - open(fname, 'w').write(req) |
91 | | -
|
92 | | - shell: python |
| 77 | + python .github/set-min-requirements.py |
93 | 78 |
|
94 | 79 | # Note: This uses an internal pip API and may not always work |
95 | 80 | # https://github.com/actions/cache/blob/master/examples.md#multiple-oss-in-a-workflow |
@@ -120,7 +105,7 @@ jobs: |
120 | 105 | if: matrix.python-version == 3.9 |
121 | 106 | run: | |
122 | 107 | # pip uninstall -y horovod |
123 | | - python -c "fname = 'requirements/extra.txt' ; lines = [line for line in open(fname).readlines() if not line.startswith('horovod')] ; open(fname, 'w').writelines(lines)" |
| 108 | + python .github/prune-packages.py requirements/extra.txt "horovod" |
124 | 109 |
|
125 | 110 | - name: Install dependencies |
126 | 111 | env: |
|
0 commit comments