Skip to content

Commit

Permalink
ci: freeze requirements used in workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Borda committed Dec 12, 2023
1 parent 5280f9b commit d143caa
Show file tree
Hide file tree
Showing 14 changed files with 24 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .actions/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
jsonargparse>=4.16.0
jsonargparse >=4.16.0, <4.28.0
requests
2 changes: 1 addition & 1 deletion .github/actions/pip-wheels/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ runs:
using: "composite"
steps:
- name: install dev. env
run: pip install setuptools wheel
run: pip install -r requirements/ci.txt
shell: bash

- name: Freeze local emv.
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/pkg-check/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ runs:
using: "composite"
steps:
- name: install dev. env
run: pip install "twine==4.0.1" setuptools wheel flake8
run: pip install -r requirements/ci.txt
shell: bash

- name: Set PACKAGE_NAME envvar
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/_legacy-checkpoints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ jobs:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_PUB_SECRET_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_REGION }}
run: |
pip install -q awscli
pip install -q -r requirements/ci.txt
aws s3 sync $AWS_RUN checkpoints/ s3://pl-public-data/legacy/checkpoints/
zip -r checkpoints.zip checkpoints
aws s3 cp $AWS_RUN checkpoints.zip s3://pl-public-data/legacy/ --acl public-read
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci-checkpoints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
paths:
- ".github/workflows/ci-checkpoints.yml"
- ".github/workflows/_legacy-checkpoints.yml.yml"
- "requirements/ci.txt"

jobs:
try-legacy-checkpoints:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci-pkg-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped
paths:
- ".actions/*"
- "requirements/ci.txt"
- ".github/actions/pkg-check/*"
- ".github/actions/pkg-install/*"
- ".github/workflows/_build-packages.yml"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-tests-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
paths:
- ".actions/*"
- ".github/workflows/ci-tests-app.yml"
- "requirements/ci.txt"
- "src/lightning/app/**"
- "src/lightning_app/*"
- "tests/tests_app/**"
Expand Down Expand Up @@ -91,7 +92,6 @@ jobs:
- name: Install package & dependencies
timeout-minutes: 20
run: |
python -m pip install -q pip -U
pip install -e ".[${EXTRA_PREFIX}dev]" -U --prefer-binary \
--find-links="${TORCH_URL}" --find-links="${PYPI_CACHE_DIR}"
pip list
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-tests-data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped
paths:
- ".actions/*"
- "requirements/ci.txt"
- "requirements/data/**"
- "src/lightning/data/**"
- "src/lightning/__init__.py"
Expand Down Expand Up @@ -69,7 +70,7 @@ jobs:
- name: Adjust PyTorch versions in requirements files
if: ${{ matrix.requires != 'oldest' && matrix.release != 'pre' }}
run: |
pip install -q wget packaging
pip install -q -r requirements/ci.txt
python -m wget https://raw.githubusercontent.com/Lightning-AI/utilities/main/scripts/adjust-torch-versions.py
for fpath in `ls requirements/data/*.txt`; do \
python ./adjust-torch-versions.py $fpath ${{ matrix.pytorch-version }}; \
Expand All @@ -88,7 +89,6 @@ jobs:
- name: Install package & dependencies
timeout-minutes: 20
run: |
python -m pip install -q pip -U
pip install -e ".[data-dev]" -U --prefer-binary -f ${TORCH_URL}
pip list
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-tests-fabric.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped
paths:
- ".actions/*"
- "requirements/ci.txt"
- "requirements/fabric/**"
- "src/lightning/fabric/**"
- "src/lightning_fabric/*"
Expand Down Expand Up @@ -109,7 +110,7 @@ jobs:
- name: Adjust PyTorch versions in requirements files
if: ${{ matrix.requires != 'oldest' }}
run: |
pip install -q wget packaging
pip install -q -r requirements/ci.txt
python -m wget https://raw.githubusercontent.com/Lightning-AI/utilities/main/scripts/adjust-torch-versions.py
for fpath in `ls requirements/**/*.txt`; do \
python ./adjust-torch-versions.py $fpath ${{ matrix.pytorch-version }}; \
Expand All @@ -136,7 +137,6 @@ jobs:
- name: Install package & dependencies
timeout-minutes: 20
run: |
#python -m pip install -q pip -U
pip install -e ".[${EXTRA_PREFIX}test,${EXTRA_PREFIX}strategies]" -U --prefer-binary \
--find-links="${TORCH_URL}" --find-links="${PYPI_CACHE_DIR}"
pip list
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-tests-pytorch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped
paths:
- ".actions/*"
- "requirements/ci.txt"
- "requirements/pytorch/**"
- "src/lightning/pytorch/**"
- "src/pytorch_lightning/*"
Expand Down Expand Up @@ -114,7 +115,7 @@ jobs:
- name: Adjust PyTorch versions in requirements files
if: ${{ matrix.requires != 'oldest' }}
run: |
pip install -q wget packaging
pip install -q -r requirements/ci.txt
python -m wget https://raw.githubusercontent.com/Lightning-AI/utilities/main/scripts/adjust-torch-versions.py
for fpath in `ls requirements/**/*.txt`; do \
python ./adjust-torch-versions.py $fpath ${{ matrix.pytorch-version }}; \
Expand Down Expand Up @@ -142,7 +143,6 @@ jobs:
- name: Install package & dependencies
timeout-minutes: 20
run: |
#python -m pip install -q pip -U
pip install ".[${EXTRA_PREFIX}extra,${EXTRA_PREFIX}test,${EXTRA_PREFIX}strategies]" -U --prefer-binary \
-r requirements/_integrations/accelerators.txt \
--find-links="${TORCH_URL}" --find-links="${PYPI_CACHE_DIR}"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-tests-store.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped
paths:
- ".actions/*"
- "requirements/ci.txt"
- "requirements/store/**"
- "src/lightning/__init__.py"
- "src/lightning/__setup__.py"
Expand Down Expand Up @@ -57,7 +58,7 @@ jobs:
- name: Adjust PyTorch versions in requirements files
if: ${{ matrix.requires != 'oldest' && matrix.release != 'pre' }}
run: |
pip install -q wget packaging
pip install -q -r requirements/ci.txt
python -m wget https://raw.githubusercontent.com/Lightning-AI/utilities/main/scripts/adjust-torch-versions.py
for fpath in `ls requirements/store/*.txt`; do \
python ./adjust-torch-versions.py $fpath ${{ matrix.pytorch-version }}; \
Expand All @@ -66,7 +67,6 @@ jobs:
- name: Install package & dependencies
timeout-minutes: 20
run: |
python -m pip install -q pip -U
pip install -e ".[store,store-test]" -U -f ${TORCH_URL} --prefer-binary
pip list
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/docs-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:
paths:
- ".actions/*"
- ".github/workflows/docs-build.yml"
- "requirements/ci.txt"
- "docs/**"
- "_notebooks"
- "requirements/**"
Expand Down Expand Up @@ -74,7 +75,7 @@ jobs:

- name: Pull sphinx template
run: |
pip install awscli
pip install -q -r requirements/ci.txt
aws s3 sync --no-sign-request s3://sphinx-packages/ ${PYPI_LOCAL_DIR}
pip install lai-sphinx-theme -U -f ${PYPI_LOCAL_DIR}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release-pkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
branches: [master, "release/*"]
types: [opened, reopened, ready_for_review, synchronize]
paths:
- "requirements/ci.txt"
- ".github/actions/pkg-publish/*"
- ".github/workflows/_legacy-checkpoints.yml.yml"
- ".github/workflows/_build-packages.yml"
Expand Down
6 changes: 6 additions & 0 deletions requirements/ci.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
setuptools
wheel
awscli >=1.30.0, <1.31.0
twine ==4.0.1
wget
packaging

0 comments on commit d143caa

Please sign in to comment.