Skip to content

Commit 4c0eb3a

Browse files
alleeclarkBordapre-commit-ci[bot]
authored
Update (ci): github action's artifact upgrade v4 (#20500)
* Update (ci): github action's artifact upgrade due to EOL for versions less than 4 * fix (ci: linkcheck): ignore 403 status code from habana.ai since it redirects intel.com documentation * fix with pattern + merge * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * use dist * Revert "use dist" This reverts commit ed44fec. * retention * ls -lh pypi/ * strategy.job-index * stupid missing needs: build-packages * tree pypi * sudo * Apply suggestions from code review --------- Co-authored-by: Jirka B <j.borovec+github@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Jirka Borovec <6035284+Borda@users.noreply.github.com>
1 parent 110d621 commit 4c0eb3a

File tree

6 files changed

+34
-33
lines changed

6 files changed

+34
-33
lines changed

.github/workflows/_build-packages.yml

+26-26
Original file line numberDiff line numberDiff line change
@@ -19,38 +19,16 @@ defaults:
1919
shell: bash
2020

2121
jobs:
22-
init:
23-
runs-on: ubuntu-22.04
24-
steps:
25-
- uses: actions/checkout@v4
26-
- run: |
27-
mkdir dist && touch dist/.placeholder
28-
- name: Keep artifact
29-
id: keep-artifact
30-
run: python -c "print('DAYS=' + str(5 if '${{ github.event_name }}'.startswith('pull_request') else 0))" >> $GITHUB_OUTPUT
31-
- uses: actions/upload-artifact@v3
32-
with:
33-
name: ${{ inputs.artifact-name }}
34-
path: dist
35-
retention-days: ${{ steps.keep-artifact.outputs.DAYS }}
36-
include-hidden-files: true
37-
3822
build-packages:
39-
needs: init
4023
runs-on: ubuntu-22.04
4124
strategy:
42-
max-parallel: 1 # run sequential to prevent download/upload collisions
4325
matrix:
4426
pkg-name: ${{ fromJSON(inputs.pkg-names) }}
4527
steps:
4628
- uses: actions/checkout@v4
47-
- uses: actions/download-artifact@v3
48-
with:
49-
name: ${{ inputs.artifact-name }}
50-
path: pypi
5129
- uses: actions/setup-python@v5
5230
with:
53-
python-version: 3.9
31+
python-version: "3.x"
5432

5533
- run: python -c "print('NB_DIRS=' + str(2 if '${{ matrix.pkg-name }}' == 'pytorch' else 1))" >> $GITHUB_ENV
5634
- name: Build & check package
@@ -60,11 +38,33 @@ jobs:
6038
nb-dirs: ${{ env.NB_DIRS }}
6139

6240
- run: |
63-
mkdir pypi/${{ matrix.pkg-name }}
41+
mkdir -p pypi/${{ matrix.pkg-name }}
6442
cp dist/* pypi/${{ matrix.pkg-name }}/
6543
66-
- uses: actions/upload-artifact@v3
44+
- uses: actions/upload-artifact@v4
45+
with:
46+
name: ${{ inputs.artifact-name }}-${{ matrix.pkg-name }}
47+
path: pypi
48+
retention-days: 1
49+
50+
merge-artifacts:
51+
needs: build-packages
52+
runs-on: ubuntu-22.04
53+
steps:
54+
- uses: actions/download-artifact@v4
55+
with: # download all build artifacts
56+
pattern: ${{ inputs.artifact-name }}-*
57+
merge-multiple: true
58+
path: pypi
59+
- run: |
60+
sudo apt-get install -y tree
61+
tree pypi
62+
63+
- name: Keep artifact
64+
run: python -c "print('DAYS=' + str(5 if '${{ github.event_name }}'.startswith('pull_request') else 0))" >> $GITHUB_ENV
65+
- uses: actions/upload-artifact@v4
6766
with:
6867
name: ${{ inputs.artifact-name }}
6968
path: pypi
70-
include-hidden-files: true
69+
retention-days: ${{ env.DAYS }}
70+
if-no-files-found: error

.github/workflows/_legacy-checkpoints.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ jobs:
104104
python -c "print('AWS_RUN=' + str('' if '${{inputs.push_to_s3}}' == 'true' else '--dryrun'))" >> $GITHUB_ENV
105105
106106
- name: Upload checkpoints to GitHub Actions artifact
107-
uses: actions/upload-artifact@v3
107+
uses: actions/upload-artifact@v4
108108
with:
109109
name: checkpoints-${{ github.sha }}
110110
path: ${{ env.LEGACY_FOLDER }}/checkpoints/

.github/workflows/ci-pkg-install.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
- uses: actions/setup-python@v5
5151
with:
5252
python-version: ${{ matrix.python-version }}
53-
- uses: actions/download-artifact@v3
53+
- uses: actions/download-artifact@v4
5454
with:
5555
name: dist-packages-${{ github.sha }}
5656
path: dist

.github/workflows/docs-build.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ jobs:
129129
run: echo "ARTIFACT_DAYS=7" >> $GITHUB_ENV
130130
- name: Upload built docs
131131
if: ${{ matrix.target == 'html' }}
132-
uses: actions/upload-artifact@v3
132+
uses: actions/upload-artifact@v4
133133
with:
134134
name: docs-${{ matrix.pkg-name }}-${{ github.sha }}
135135
path: docs/build/html/
@@ -158,7 +158,7 @@ jobs:
158158
# use input if dispatch or git tag
159159
VERSION: ${{ inputs.version || github.ref_name }}
160160
steps:
161-
- uses: actions/download-artifact@v3
161+
- uses: actions/download-artifact@v4
162162
with:
163163
name: docs-${{ matrix.pkg-name }}-${{ github.sha }}
164164
path: docs/build/html/

.github/workflows/release-pkg.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
if: github.event_name == 'release'
3939
steps:
4040
- uses: actions/checkout@v4
41-
- uses: actions/download-artifact@v3
41+
- uses: actions/download-artifact@v4
4242
with:
4343
name: dist-packages-${{ github.sha }}
4444
path: dist
@@ -140,7 +140,7 @@ jobs:
140140
name: ["FABRIC", "PYTORCH", "LIGHTNING"]
141141
steps:
142142
- uses: actions/checkout@v4 # needed for local action below
143-
- uses: actions/download-artifact@v3
143+
- uses: actions/download-artifact@v4
144144
with:
145145
name: dist-packages-${{ github.sha }}
146146
path: dist
@@ -165,7 +165,7 @@ jobs:
165165
name: ["FABRIC", "PYTORCH", "LIGHTNING"]
166166
steps:
167167
- uses: actions/checkout@v4 # needed for local action below
168-
- uses: actions/download-artifact@v3
168+
- uses: actions/download-artifact@v4
169169
with:
170170
name: dist-packages-${{ github.sha }}
171171
path: dist

docs/source-pytorch/conf.py

+1
Original file line numberDiff line numberDiff line change
@@ -643,6 +643,7 @@ def package_list_from_file(file):
643643
r"starter/installation.html$",
644644
r"^../common/trainer.html#trainer-flags$",
645645
"https://deepgenerativemodels.github.io/assets/slides/cs236_lecture11.pdf",
646+
"https://developer.habana.ai", # returns 403 error but redirects to intel.com documentation
646647
"https://www.intel.com/content/www/us/en/products/docs/processors/what-is-a-gpu.html",
647648
"https://www.microsoft.com/en-us/research/blog/zero-infinity-and-deepspeed-unlocking-unprecedented-model-scale-for-deep-learning-training/", # noqa: E501
648649
"https://stackoverflow.com/questions/66640705/how-can-i-install-grpcio-on-an-apple-m1-silicon-laptop",

0 commit comments

Comments
 (0)