-
Notifications
You must be signed in to change notification settings - Fork 0
215 lines (196 loc) · 9.23 KB
/
release-artifacts-standalone-ubuntu.yaml
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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
name: release-artifacts standalone-ubuntu
on:
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
set-safe-directory: false
fetch-depth: 0 # ensure all tags are fetched
- name: Set environment variables 1
id: set_env_1
run: |
# latest git tag in the form 10.00.00.08
git_tag=$(git tag | grep -E '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$' | sort -V | tail -n 1)
echo "git_tag=${git_tag}" >> $GITHUB_ENV
echo "release_tag=rel.${git_tag}-ubuntu22.04" >> $GITHUB_ENV
#==> hard-coded. PLEASE update each release
sdk_ver=10.0.0
# base_images
base_images=(
ubuntu:22.04
# debian:12.5
)
# platforms
platforms=(
j784s4
j721s2
j721e
j722s
am62a
)
# tidl package names
for base_image_ in ${base_images[@]}; do
base_image=${base_image_//:/}
base_image_var=${base_image//./-}
for platform in ${platforms[@]}; do
tidl_pkg_name=arm-tidl-${platform}_${sdk_ver}-${base_image}.tar.gz
echo "tidl_pkg_name_${platform}_${base_image_var}=${tidl_pkg_name}" >> $GITHUB_ENV
echo "tidl_pkg_path_${platform}_${base_image_var}=release/tidl-${base_image}/${tidl_pkg_name}" >> $GITHUB_ENV
done
done
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: release
github-token: ${{ secrets.GHCR_PAT }}
run-id: 11583957536
- name: Check for downloaded artifacts
run: ls -R release
- name: Set environment variables 2
id: set_env_2
run: |
# base_images
base_images=(
ubuntu:22.04
debian:12.5
)
# whl, pkg names
for base_image_ in ${base_images[@]}; do
base_image=${base_image_//:/}
base_image_var=${base_image//./-}
onnx_whl_path=$(find release/onnxrt-${base_image} -name "onnxruntime_tidl-*.whl" || { echo "onnxruntime_tidl for ${base_image} wheel package not found."; exit 1; })
onnx_pkg_path=$(find release/onnxrt-${base_image} -name "onnx-*.tar.gz" || { echo "onnx tarball for ${base_image} not found."; exit 1; })
onnx_whl_name=$(basename ${onnx_whl_path})
onnx_pkg_name=$(basename ${onnx_pkg_path})
#==> NOTE: Later changed from "release/tilite-${base_image}" to "release/tflite-${base_image}" in release-{ubuntu,debian}.yaml
tflite_whl_path=$(find release/tilite-${base_image} -name "tflite_runtime*.whl" || { echo "tflite_runtime whl for ${base_image} not found."; exit 1; })
tflite_pkg_path=$(find release/tilite-${base_image} -name "tflite-*_aarch64.tar.gz" || { echo "tflite lib tarball for ${base_image} not found."; exit 1; })
tflite_whl_name=$(basename $tflite_whl_path)
tflite_pkg_name=$(basename $tflite_pkg_path)
dlr_whl_path=$(find release/dlr-${base_image} -name "dlr-*.whl" || { echo "dlr wheel package for ${base_image} not found."; exit 1; })
dlr_whl_name=$(basename $dlr_whl_path)
# set env variables
echo "onnx_whl_path_${base_image_var}=${onnx_whl_path}" >> $GITHUB_ENV
echo "onnx_whl_name_${base_image_var}=${onnx_whl_name}" >> $GITHUB_ENV
echo "onnx_pkg_path_${base_image_var}=${onnx_pkg_path}" >> $GITHUB_ENV
echo "onnx_pkg_name_${base_image_var}=${onnx_pkg_name}" >> $GITHUB_ENV
echo "tflite_whl_path_${base_image_var}=${tflite_whl_path}" >> $GITHUB_ENV
echo "tflite_whl_name_${base_image_var}=${tflite_whl_name}" >> $GITHUB_ENV
echo "tflite_pkg_path_${base_image_var}=${tflite_pkg_path}" >> $GITHUB_ENV
echo "tflite_pkg_name_${base_image_var}=${tflite_pkg_name}" >> $GITHUB_ENV
echo "dlr_whl_path_${base_image_var}=${dlr_whl_path}" >> $GITHUB_ENV
echo "dlr_whl_name_${base_image_var}=${dlr_whl_name}" >> $GITHUB_ENV
done
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GHCR_PAT }}
with:
tag_name: ${{ env.release_tag }}
release_name: ${{ env.release_tag }}
body: |
Compatible with Processor-SDK-Linux-EdgeAI ${{ env.git_tag }}. Check the matching version of the PSDK-Linux:
- AM69A (j784s4): https://www.ti.com/tool/download/PROCESSOR-SDK-LINUX-AM69A
- AM68A (j721s2): https://www.ti.com/tool/download/PROCESSOR-SDK-LINUX-AM68A
- TDA4VM (j721e): https://www.ti.com/tool/download/PROCESSOR-SDK-LINUX-SK-TDA4VM
- AM67A (j722s): https://www.ti.com/tool/download/PROCESSOR-SDK-LINUX-AM67A
- AM62A (am62a): https://www.ti.com/tool/download/PROCESSOR-SDK-LINUX-AM62A
draft: false
prerelease: false
## Upload release: Ubuntu 22.04
- name: Upload onnx-whl-ubuntu22-04 to release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GHCR_PAT }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ env.onnx_whl_path_ubuntu22-04 }}
asset_name: ${{ env.onnx_whl_name_ubuntu22-04 }}
asset_content_type: application/octet-stream
- name: Upload onnx-pkg-ubuntu22-04 to release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GHCR_PAT }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ env.onnx_pkg_path_ubuntu22-04 }}
asset_name: ${{ env.onnx_pkg_name_ubuntu22-04 }}
asset_content_type: application/gzip
- name: Upload tflite-whl-ubuntu22-04 to release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GHCR_PAT }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ env.tflite_whl_path_ubuntu22-04 }}
asset_name: ${{ env.tflite_whl_name_ubuntu22-04 }}
asset_content_type: application/octet-stream
- name: Upload tflite-pkg-ubuntu22-04 to release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GHCR_PAT }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ env.tflite_pkg_path_ubuntu22-04 }}
asset_name: ${{ env.tflite_pkg_name_ubuntu22-04 }}
asset_content_type: application/gzip
- name: Upload dlr-whl-ubuntu22-04 to release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GHCR_PAT }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ env.dlr_whl_path_ubuntu22-04 }}
asset_name: ${{ env.dlr_whl_name_ubuntu22-04 }}
asset_content_type: application/octet-stream
### ARM-TIDL for each platform
- name: Upload tidl-j784s4-ubuntu22-04 to release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GHCR_PAT }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ env.tidl_pkg_path_j784s4_ubuntu22-04 }}
asset_name: ${{ env.tidl_pkg_name_j784s4_ubuntu22-04 }}
asset_content_type: application/gzip
- name: Upload tidl-j721s2-ubuntu22-04 to release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GHCR_PAT }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ env.tidl_pkg_path_j721s2_ubuntu22-04 }}
asset_name: ${{ env.tidl_pkg_name_j721s2_ubuntu22-04 }}
asset_content_type: application/gzip
- name: Upload tidl-j721e-ubuntu22-04 to release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GHCR_PAT }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ env.tidl_pkg_path_j721e_ubuntu22-04 }}
asset_name: ${{ env.tidl_pkg_name_j721e_ubuntu22-04 }}
asset_content_type: application/gzip
- name: Upload tidl-j722s-ubuntu22-04 to release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GHCR_PAT }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ env.tidl_pkg_path_j722s_ubuntu22-04 }}
asset_name: ${{ env.tidl_pkg_name_j722s_ubuntu22-04 }}
asset_content_type: application/gzip
- name: Upload tidl-am62a-ubuntu22-04 to release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GHCR_PAT }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ env.tidl_pkg_path_am62a_ubuntu22-04 }}
asset_name: ${{ env.tidl_pkg_name_am62a_ubuntu22-04 }}
asset_content_type: application/gzip