Skip to content

Commit

Permalink
ci: bump upload/download artifact v4 [2/2] & actions-ref optional (
Browse files Browse the repository at this point in the history
…#345)

* bump upload/download artifact `v4`
* make `actions-ref` optional
* chlog
  • Loading branch information
Borda authored Dec 16, 2024
1 parent d1d36eb commit c3d7630
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/actions/unittesting/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ runs:
shell: ${{ inputs.shell-type }}

- name: Upload pytest results
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ steps.location.outputs.artifact }}
path: "test/${{ steps.location.outputs.artifact }}.xml"
Expand Down
21 changes: 17 additions & 4 deletions .github/workflows/check-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ name: Building docs
on:
workflow_call:
inputs:
actions-ref:
description: "Version of actions, normally the same as workflow"
required: false
type: string
default: ""
python-version:
description: "Python version to use"
default: "3.9"
Expand Down Expand Up @@ -71,6 +76,7 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
cache: "pip"

- name: Install pandoc & texlive
if: ${{ inputs.install-tex == 'true' }}
Expand All @@ -83,16 +89,23 @@ jobs:
dvipng \
texlive-pictures \
latexmk
# todo: consider adding cache with separate restore/save
- name: Install dependencies
timeout-minutes: 20
run: |
pip --version
pip install -e . -U -r ${{ inputs.requirements-file }} -f ${TORCH_URL}
pip list
# TODO: re-enable after the external usage is resolved, see #51
# - uses: ./.github/actions/pip-list
- name: Pull reusable 🤖 actions️
if: ${{ inputs.actions-ref != '' }}
uses: actions/checkout@v4
with:
ref: ${{ inputs.actions-ref }}
path: .cicd
repository: Lightning-AI/utilities
- name: Print 🖨️ dependencies
if: ${{ inputs.actions-ref != '' }}
uses: ./.cicd/.github/actions/pip-list

- name: Build documentation
working-directory: ${{ inputs.docs-dir }}
Expand All @@ -104,7 +117,7 @@ jobs:
if: startsWith(github.event_name, 'pull_request')
run: echo "KEEP_DAYS=7" >> $GITHUB_ENV
- name: Upload built docs
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: docs-${{ matrix.target }}-${{ github.sha }}
path: ${{ inputs.docs-dir }}/build/
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/check-typing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ on:
inputs:
actions-ref:
description: "Version of actions, normally the same as workflow"
required: true
required: false
type: string
default: ""
python-version:
description: "Python version to use"
default: "3.9"
Expand Down Expand Up @@ -50,12 +51,14 @@ jobs:
pip list
- name: Pull reusable 🤖 actions️
if: ${{ inputs.actions-ref != '' }}
uses: actions/checkout@v4
with:
ref: ${{ inputs.actions-ref }}
path: .cicd
repository: Lightning-AI/utilities
- name: Print 🖨️ dependencies
if: ${{ inputs.actions-ref != '' }}
uses: ./.cicd/.github/actions/pip-list
with:
unfold: true
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/ci-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Set oldest dependencies
# todo: this is strange to use itself :/
if: matrix.requires == 'oldest'
timeout-minutes: 20
run: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci-use-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ jobs:
check-docs:
uses: ./.github/workflows/check-docs.yml
with:
actions-ref: ${{ github.sha }} # use local version
requirements-file: "requirements/_docs.txt"
install-tex: true

Expand Down
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- CLI: update parsing inputs ([#333](https://github.com/Lightning-AI/utilities/pull/333))


- CI: bump upload/download artifact `v4` ([#344](https://github.com/Lightning-AI/utilities/pull/344))
- CI: bump upload/download artifact `v4` ([#344](https://github.com/Lightning-AI/utilities/pull/344), [#345](https://github.com/Lightning-AI/utilities/pull/345))


- CI: make `actions-ref` optional if used only for listing packages ([#345](https://github.com/Lightning-AI/utilities/pull/345))


- Bump minimal Python version to be 3.9 ([#331](https://github.com/Lightning-AI/utilities/pull/331))
Expand Down

0 comments on commit c3d7630

Please sign in to comment.