@@ -19,39 +19,17 @@ defaults:
19
19
shell : bash
20
20
21
21
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@v4
32
- with :
33
- name : ${{ inputs.artifact-name }}
34
- path : dist
35
- retention-days : ${{ steps.keep-artifact.outputs.DAYS }}
36
- include-hidden-files : true
37
22
38
23
build-packages :
39
- needs : init
40
24
runs-on : ubuntu-22.04
41
25
strategy :
42
- max-parallel : 1 # run sequential to prevent download/upload collisions
43
26
matrix :
44
27
pkg-name : ${{ fromJSON(inputs.pkg-names) }}
45
28
steps :
46
29
- uses : actions/checkout@v4
47
- - uses : actions/download-artifact@v4
48
- with :
49
- name : ${{ inputs.artifact-name }}
50
- path : pypi
51
- merge-multiple : true
52
30
- uses : actions/setup-python@v5
53
31
with :
54
- python-version : 3.9
32
+ python-version : " 3.x "
55
33
56
34
- run : python -c "print('NB_DIRS=' + str(2 if '${{ matrix.pkg-name }}' == 'pytorch' else 1))" >> $GITHUB_ENV
57
35
- name : Build & check package
64
42
mkdir pypi/${{ matrix.pkg-name }}
65
43
cp dist/* pypi/${{ matrix.pkg-name }}/
66
44
45
+ - uses : actions/upload-artifact@v4
46
+ with :
47
+ name : ${{ inputs.artifact-name }}-${{ matrix.pkg-name }}
48
+ path : pypi
49
+
50
+ merge-artifacts :
51
+ runs-on : ubuntu-22.04
52
+ steps :
53
+ - uses : actions/download-artifact@v4
54
+ with : # download all build artifacts
55
+ pattern : ${{ inputs.artifact-name }}-*
56
+ merge-multiple : true
57
+ path : pypi
58
+ - name : Keep artifact
59
+ run : python -c "print('DAYS=' + str(5 if '${{ github.event_name }}'.startswith('pull_request') else 0))" >> $GITHUB_ENV
67
60
- uses : actions/upload-artifact@v4
68
61
with :
69
62
name : ${{ inputs.artifact-name }}
70
63
path : pypi
71
- include-hidden-files : true
72
- overwrite : true
64
+ retention-days : ${{ env.DAYS }}
0 commit comments