-
Notifications
You must be signed in to change notification settings - Fork 4
109 lines (89 loc) · 4.01 KB
/
Copy pathrelease.yml
File metadata and controls
109 lines (89 loc) · 4.01 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
name: Release CI
# Controls when the action will run.
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
revision:
description: 'gitlab revision'
required: true
default: '25.02'
candidate_rev:
description: 'Release candidate revision'
required: false
default: ''
run-name: gitlab revision ${{ inputs.revision }} to pack ${{ inputs.revision }}${{ inputs.candidate_rev }} by @${{ github.actor }}
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build-tensorflow:
# The type of runner that the job will run on
runs-on: ubuntu-latest
permissions:
actions: write
contents: read
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout tensorflow-build
uses: actions/checkout@v7
with:
path: tensorflow-pack
- name: Setup Python environment
uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Install tools
run: |
sudo apt install rsync
pip install numpy pillow semantic-version six requests junit_xml pyyaml pygithub
mkdir ${{ github.workspace }}/out/
- name: Check and delete cache key
env:
GH_TOKEN: ${{ github.token }}
run: |
KEY="latest-tensorflow-pack-build_26.02"
REF="refs/heads/1.26.2"
REPO="${{ github.repository }}"
if gh cache list --repo "$REPO" --ref "$REF" --key "$KEY" | grep -Fq "$KEY"; then
gh cache delete "$KEY" --repo "$REPO" --ref "$REF"
else
echo "Cache not found: $KEY"
fi
- name: Get history of releases from github
run:
python ./tensorflow-pack/tensorflow-build/get_releases.py ${{ secrets.GITHUB_TOKEN }} > ./tensorflow-pack/tensorflow-build/history.txt
cat ./tensorflow-pack/tensorflow-build/history.txt
- name: Run the pack build with the revision specified
run :
./tensorflow-pack/tensorflow-build/build_r.sh ${{ github.event.inputs.revision }} ${{ github.event.inputs.candidate_rev }}
- name: Show content of ${{ github.workspace }}/tensorflow-pack/out/* folder after bulding the tensorflow-pack
run: |
tree ${{ github.workspace }}/tensorflow-pack/out/
- name: Run the 3rdparty pack build with the revision specified
run : |
export PATH=$PATH:${{ github.workspace }}/tensorflow-pack/tensorflow-build/gen/utilities
./tensorflow-pack/3rdparty-build/build_r.sh ${{ github.event.inputs.revision }} ${{ github.event.inputs.candidate_rev }}
- name: Show content of ${{ github.workspace }}/tensorflow-pack/out/* folder after bulding the 3rd party pack
run: |
tree ${{ github.workspace }}/tensorflow-pack/out/
- name: Copy packs to out path
run :
cp ${{ github.workspace }}/tensorflow-pack/out/*.pack ${{ github.workspace }}/out/
- name: Show all available pdsc files
working-directory: ${{ github.workspace }}/tensorflow-pack/
run :
tree --prune -P '*.pdsc'
- name: Get all generated PDSC files for artifact upload
run : |
find ${{ github.workspace }}/tensorflow-pack/3rdparty-build/ -name '*.pdsc' -exec cp -prv '{}' '${{ github.workspace }}/out/' ';'
find ${{ github.workspace }}/tensorflow-pack/tensorflow-build/gen/ -name '*.pdsc' -exec cp -prv '{}' '${{ github.workspace }}/out/' ';'
- name: Upload Pack
uses: actions/upload-artifact@v7
with:
name: tensorflow-pack-release
path: ${{ github.workspace }}/out
- name: Cache artifact
uses: actions/cache/save@v6
with:
path: ${{ github.workspace }}/out
key: latest-tensorflow-pack-build_${{ inputs.revision }}${{ inputs.candidate_rev }}