-
Notifications
You must be signed in to change notification settings - Fork 227
109 lines (99 loc) · 3.39 KB
/
copy_release.yml
File metadata and controls
109 lines (99 loc) · 3.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# Copyright Advanced Micro Devices, Inc.
# SPDX-License-Identifier: MIT
name: Copy release to dev bucket
on:
workflow_dispatch:
inputs:
rocm_version:
description: ROCm version to copy, e.g. 7.0.0rc20250912
type: string
amdgpu_family:
type: choice
options:
- gfx101X-dgpu
- gfx103X-all
- gfx110X-all
- gfx1150
- gfx1151
- gfx1152
- gfx1153
- gfx120X-all
- gfx900
- gfx906
- gfx908
- gfx90a
- gfx94X-dcgpu
- gfx950-dcgpu
default: gfx94X-dcgpu
python_version:
type: choice
options:
- 3.11
- 3.12
- 3.13
default: 3.12
include_torch:
type: boolean
default: false
sourcesubdir:
type: choice
options:
- v2
- v2-staging
destsubdir:
type: string
default: v2
sourcebucket:
type: choice
options:
- nightly
- dev
default: nightly
destbucket:
type: choice
options:
- dev
- nightly
default: dev
permissions:
contents: read
jobs:
copy_python_packages:
name: Copy ${{ inputs.sourcebucket }} ${{ inputs.sourcesubdir }} -> ${{ inputs.destbucket }} ${{ inputs.destsubdir }} | ${{ inputs.amdgpu_family }} | rocm ${{ inputs.rocm_version }} | py ${{ inputs.python_version }}
runs-on: ubuntu-24.04
permissions:
id-token: write
steps:
- name: Checkout Repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install the AWS tool
run: ./dockerfiles/install_awscli.sh
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@8df5847569e6427dd6c4fb1cf565c83acfa8afa7 # v6.0.0
with:
aws-region: us-east-2
role-to-assume: arn:aws:iam::692859939525:role/therock-${{ inputs.destbucket }}-releases
- name: Select Python version
run: |
python build_tools/github_actions/python_to_cp_version.py \
--python-version ${{ inputs.python_version }}
- name: Copy ROCm packages between S3 buckets
run: |
aws s3 cp \
s3://therock-${{ inputs.sourcebucket }}-python/${{ inputs.sourcesubdir }}/${{ inputs.amdgpu_family }}/ \
s3://therock-${{ inputs.destbucket }}-python/${{ inputs.destsubdir }}/${{ inputs.amdgpu_family }}/ \
--recursive --exclude "*" --include "rocm*${{ inputs.rocm_version }}*"
- name: Copy torch wheels between S3 buckets
if: ${{ inputs.include_torch }}
run: |
aws s3 cp \
s3://therock-${{ inputs.sourcebucket }}-python/${{ inputs.sourcesubdir }}/${{ inputs.amdgpu_family }}/ \
s3://therock-${{ inputs.destbucket }}-python/${{ inputs.destsubdir }}/${{ inputs.amdgpu_family }}/ \
--recursive --exclude "*" --include "*torch*${{ inputs.rocm_version }}*${{ env.cp_version }}*"
- name: (Re-)Generate Python package release index
env:
S3_BUCKET_PY: "therock-${{ inputs.destbucket }}-python"
CUSTOM_PREFIX: "${{ inputs.destsubdir }}/${{ inputs.amdgpu_family }}"
run: |
pip install boto3 packaging
python ./build_tools/third_party/s3_management/manage.py ${CUSTOM_PREFIX}