-
Notifications
You must be signed in to change notification settings - Fork 54
71 lines (69 loc) · 2.75 KB
/
latest-pytorch-support.yml
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
name: Support latest PyTorch
on:
workflow_call:
inputs:
working_branch:
required: true
type: string
base_branch:
required: true
type: string
permissions:
contents: write
issues: write
pull-requests: write
jobs:
latest-torch-support:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
- uses: JasonEtco/create-an-issue@1b14a70e4d8dc185e5cc76d3bec9eab20257b2c5 # v2.9.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
id:
create-issue
with:
filename: .github/ISSUE_TEMPLATE/support_latest_pytorch.md
milestone: 1
update_existing: true
search_existing: open
- name: Check out new branch
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
with:
token: ${{ secrets.GITHUB_TOKEN }}
ref: '${{ inputs.working_branch }}'
- name: Set env variables
run: |
echo "previous_pytorch=$(grep 'torch>=' setup.py | awk -F '<' '{print $2}' | tr -d '",')" >> $GITHUB_ENV
echo "new_pytorch=$(<.github/pytorch-release-versions/pytorch-latest.txt)" >> $GITHUB_ENV
- name: Increment version
run: |
chmod +x .github/workflows/increment_version.sh
echo "setup_pytorch=$(.github/workflows/increment_version.sh ${{ env.new_pytorch }})" >> $GITHUB_ENV
- name: Update setup.py
run: |
sed -i '/torch>=/ s/'"${{ env.previous_pytorch }}"'/'"${{ env.setup_pytorch }}"'/g' setup.py
- name: Create PR from branch
uses: peter-evans/create-pull-request@c55203cfde3e5c11a452d352b4393e68b85b4533 # v6.0.3
with:
base: ${{ inputs.base_branch }}
branch: ${{ inputs.working_branch }}
delete-branch: true
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Support latest PyTorch release
title: Support PyTorch ${{ env.new_pytorch }} on branch ${{ inputs.base_branch }}
body: |
Run tests on latest PyTorch release
Issue/s resolved: #${{ steps.create-issue.outputs.number }}
TODO:
- [ ] update `.github/workflows/ci.yaml` to include `n-1` Pytorch version
- [ ] update Nvidia and AMD Docker images on gitlab CI
Auto-generated by [create-pull-request][1]
[1]: https://github.com/peter-evans/create-pull-request
reviewers: ClaudiaComito, mtar, mrfh92
labels: interoperability
draft: true