-
Notifications
You must be signed in to change notification settings - Fork 0
184 lines (167 loc) · 7.08 KB
/
update-s2s.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
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
name: update-s2s
on:
workflow_dispatch:
inputs:
ivy-branch:
description: 'Branch of Ivy to use'
default: 'main'
required: true
# schedule:
# - cron: "0 1 * * *"
permissions:
actions: read
contents: write
jobs:
update-kornia:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
file : [ test_color, test_contrib, test_enhance, test_feature1, test_feature2, test_feature3, test_feature4, test_feature5,
test_filters, test_image, test_io, test_losses, test_metrics, test_morphology, test_nerf, test_sensors,
test_tracking, test_utils, test_x, geometry/test_bbox, geometry/test_boxes, geometry/test_calibration,
geometry/test_camera, geometry/test_conversions, geometry/test_depth, geometry/test_epipolar, geometry/test_homography,
geometry/test_liegroup, geometry/test_linalg, geometry/test_line, geometry/test_quaternion, geometry/test_ransac,
geometry/test_solvers, geometry/test_subpix, geometry/test_transform, geometry/test_vector,
augmentation/test_augmentation, augmentation/test_auto, augmentation/test_container ]
compile : [ F ]
target : ["tensorflow", "jax" ]
steps:
- name: Checkout ivy-integration-tests
uses: actions/checkout@v4
with:
path: ivy-integration-tests
- name: Checkout 🛎️Ivy
uses: actions/checkout@v4
with:
repository: ivy-llc/ivy
token: ${{ secrets.DEV_BOT_GENERAL_PAT }}
path: ivy
persist-credentials: true
ref: ${{ inputs.ivy-branch }}
- name: Get Job URL
uses: Tiryoh/gha-jobid-action@v0
id: jobs
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
job_name: ${{ github.job }} (${{ matrix.file }}, ${{ matrix.compile }})
per_page: 64
- name: Run Tests
id: tests
run: |
if [ "${{ steps.jobs.outputs.html_url }}" = "null" ]; then
docker run --rm -v "$(pwd)":/ivy -v "$(pwd)"/.hypothesis:/.hypothesis ivyllc/ivy:latest ivy-integration-tests/update_s2s.sh kornia ${{ matrix.file }} linux-nightly ${{ matrix.compile }} ${{ matrix.target }} https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} ${{ secrets.IVY_API_KEY }}
else
docker run --rm -v "$(pwd)":/ivy -v "$(pwd)"/.hypothesis:/.hypothesis ivyllc/ivy:latest ivy-integration-tests/update_s2s.sh kornia ${{ matrix.file }} linux-nightly ${{ matrix.compile }} ${{ matrix.target }} ${{ steps.jobs.outputs.html_url }} ${{ secrets.IVY_API_KEY }}
fi
- name: Prepare Artifact Name
id: prepare
shell: bash
run: |
safe_file_name=$(echo "${{ matrix.file }}" | sed 's/\//-/g')
echo "::set-output name=safe_file_name::$safe_file_name"
- name: Upload Test Results
if: always()
uses: actions/upload-artifact@v3
with:
name: test-results-transformers-${{ steps.prepare.outputs.safe_file_name }}-${{ matrix.compile }}-${{ matrix.target }}
path: |
ivy-integration-tests/test_results.txt
ivy-integration-tests/test_logs.txt
update-transformers:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
file : [ test_vision ]
compile : [ T, F ]
target : ["tensorflow", "jax" ]
steps:
- name: Checkout ivy-integration-tests
uses: actions/checkout@v4
with:
path: ivy-integration-tests
- name: Checkout 🛎️Ivy
uses: actions/checkout@v4
with:
repository: ivy-llc/ivy
token: ${{ secrets.DEV_BOT_GENERAL_PAT }}
path: ivy
persist-credentials: true
ref: ${{ inputs.ivy-branch }}
- name: Get Job URL
uses: Tiryoh/gha-jobid-action@v0
id: jobs
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
job_name: ${{ github.job }} (${{ matrix.file }}, ${{ matrix.compile }})
per_page: 64
- name: Run Tests
id: tests
run: |
if [ "${{ steps.jobs.outputs.html_url }}" = "null" ]; then
docker run --rm -v "$(pwd)":/ivy -v "$(pwd)"/.hypothesis:/.hypothesis ivyllc/ivy:latest ivy-integration-tests/update_s2s.sh transformers ${{ matrix.file }} linux-nightly ${{ matrix.compile }} ${{ matrix.target }} https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} ${{ secrets.IVY_API_KEY }}
else
docker run --rm -v "$(pwd)":/ivy -v "$(pwd)"/.hypothesis:/.hypothesis ivyllc/ivy:latest ivy-integration-tests/update_s2s.sh transformers ${{ matrix.file }} linux-nightly ${{ matrix.compile }} ${{ matrix.target }} ${{ steps.jobs.outputs.html_url }} ${{ secrets.IVY_API_KEY }}
fi
- name: Prepare Artifact Name
id: prepare
shell: bash
run: |
safe_file_name=$(echo "${{ matrix.file }}" | sed 's/\//-/g')
echo "::set-output name=safe_file_name::$safe_file_name"
- name: Upload Test Results
if: always()
uses: actions/upload-artifact@v3
with:
name: test-results-transformers-${{ steps.prepare.outputs.safe_file_name }}-${{ matrix.compile }}-${{ matrix.target }}
path: |
ivy-integration-tests/test_results.txt
ivy-integration-tests/test_logs.txt
update-dashboard:
runs-on: ubuntu-latest
needs:
- update-kornia
- update-transformers
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Download Test Results
uses: actions/download-artifact@v3
with:
path: ./artifacts
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.10"
# - name: Update Native Compilation Dashboard
# env:
# GITHUB_TOKEN: ${{ secrets.DEV_BOT_GENERAL_PAT }}
# run: |
# python update_s2s_dashboard.py --backend-compile
# git config --global user.email "hello@transpile-ai.com"
# git config --global user.name "ivy-dev-bot"
# git add NATIVE_COMPILATION_DASHBOARD.md
# git commit -m "Auto-update native compilation integration tests dashboard"
# git push
- name: Update Dashboard
env:
GITHUB_TOKEN: ${{ secrets.DEV_BOT_GENERAL_PAT }}
run: |
python update_s2s_dashboard.py
git config --global user.email "hello@transpile-ai.com"
git config --global user.name "ivy-dev-bot"
git add DASHBOARD.md
git commit -m "Auto-update integration tests dashboard"
git push
- name: Update Failing Tests
env:
GITHUB_TOKEN: ${{ secrets.DEV_BOT_GENERAL_PAT }}
run: |
python find_all_failing_tests.py
git config --global user.email "hello@transpile-ai.com"
git config --global user.name "ivy-dev-bot"
git add FAILING_TESTS.txt
git add TEST_LOGS.txt
git commit -m "Auto-update failing tests"
git push