Skip to content

Commit 3f8ef36

Browse files
New nightly build from main branch of mlplatform
1 parent ba94417 commit 3f8ef36

File tree

4 files changed

+431
-234
lines changed

4 files changed

+431
-234
lines changed

.github/workflows/nightly.yml

Lines changed: 46 additions & 234 deletions
Original file line numberDiff line numberDiff line change
@@ -1,257 +1,69 @@
1-
name: Nightly CI
1+
name: Release CI
22

33
# Controls when the action will run.
44
on:
5-
# Triggers the workflow on push or pull request events but only for the main branch
6-
schedule:
7-
# * is a special character in YAML so you have to quote this string
8-
- cron: '0 0 * * *'
9-
105
# Allows you to run this workflow manually from the Actions tab
116
workflow_dispatch:
7+
inputs:
8+
candidate_rev:
9+
description: 'Release candidate revision'
10+
required: false
11+
default: ''
12+
13+
run-name: mlplatform.org revision ${{ inputs.revision }} to pack ${{ inputs.revision }}${{ inputs.candidate_rev }} by @${{ github.actor }}
14+
1215

1316
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1417
jobs:
18+
# This workflow contains a single job called "build"
1519
build-tensorflow:
20+
# The type of runner that the job will run on
1621
runs-on: ubuntu-latest
22+
23+
# Steps represent a sequence of tasks that will be executed as part of the job
1724
steps:
25+
1826
- name: Checkout tensorflow-build
1927
uses: actions/checkout@v2
2028
with:
2129
repository: MDK-Packs/tensorflow-pack
2230
path: tensorflow-pack
23-
- name: Checkout tensorflow
24-
uses: actions/checkout@v2
25-
with:
26-
repository: tensorflow/tflite-micro
27-
path: tensorflow
28-
clean: false
29-
- name: Install CMSIS tools
30-
run:
31-
wget https://github.com/Open-CMSIS-Pack/devtools/releases/download/tools%2Ftoolbox%2F0.9.2/cmsis-toolbox.sh
32-
&& chmod +x ./cmsis-toolbox.sh && ./cmsis-toolbox.sh < tensorflow-pack/tensorflow-test/cmsis-toolbox.options
33-
&& rm cmsis-toolbox.sh
34-
- name: Install dependencies
35-
run : |
36-
pip3 install six requests pyyaml junit_xml pillow
37-
# ./tensorflow-pack/tensorflow-build/.wgetrc /root/.wgetrc
31+
32+
- name: Install tools
33+
run: |
34+
sudo apt install rsync
35+
pip3 install numpy pillow semantic-version six requests junit_xml pyyaml pygithub
3836
mkdir ${{ github.workspace }}/out/
39-
- name: Prepare list of sources for tensorflow library
40-
run :
41-
./tensorflow-pack/tensorflow-build/prep.sh
42-
- name: Fix various issues in list of modules
43-
run :
44-
./tensorflow-pack/tensorflow-build/hotfix.sh
45-
- name: Build TensorFlow Pack and run PackChk
46-
run :
47-
./tensorflow-pack/tensorflow-build/build.sh
48-
- name: Copy tensorflow-pack to out path
37+
38+
- name: Get history of releases from github
39+
run:
40+
python3 ./tensorflow-pack/tensorflow-build/get_releases.py ${{ secrets.GITHUB_TOKEN }} > ./tensorflow-pack/tensorflow-build/history.txt
41+
42+
- name: Run the pack build with the revision specified
4943
run :
50-
cp ${{ github.workspace }}/tensorflow-pack/tensorflow-build/gen/build/*.pack ${{ github.workspace }}/out/
51-
- name: Add PackChk to path
52-
run : |
53-
echo "${{github.workspace}}/tensorflow-pack/tensorflow-build/gen/build/utilities" >> $GITHUB_PATH
54-
#- name: Build 3rd Party Pack Flatbuffers
55-
# run : |
56-
# python3 ./tensorflow-pack/3rdparty-build/gen_pack.py --path=./tensorflow-pack/3rdparty-build/flatbuffers --date_tag
57-
# cp ${{ github.workspace }}/tensorflow-pack/3rdparty-build/flatbuffers/build/*.pack ${{ github.workspace }}/out/
58-
#- name: Build 3rd Party Pack KissFFT
59-
# run : |
60-
# python3 ./tensorflow-pack/3rdparty-build/gen_pack.py --path=./tensorflow-pack/3rdparty-build/kissfft --date_tag
61-
# cp ${{ github.workspace }}/tensorflow-pack/3rdparty-build/kissfft/build/*.pack ${{ github.workspace }}/out/
62-
#- name: Build 3rd Party Pack gemmlowp
63-
# run : |
64-
# python3 ./tensorflow-pack/3rdparty-build/gen_pack.py --path=./tensorflow-pack/3rdparty-build/gemmlowp --date_tag
65-
# cp ${{ github.workspace }}/tensorflow-pack/3rdparty-build/gemmlowp/build/*.pack ${{ github.workspace }}/out/
66-
#- name: Build 3rd Party Pack ruy
67-
# run : |
68-
# python3 ./tensorflow-pack/3rdparty-build/gen_pack.py --path=./tensorflow-pack/3rdparty-build/ruy --date_tag
69-
# cp ${{ github.workspace }}/tensorflow-pack/3rdparty-build/ruy/build/*.pack ${{ github.workspace }}/out/
70-
#- name: Build 3rd Party Pack Ethos-U Driver
71-
# run : |
72-
# docker exec build_runtime python3 ./tensorflow-pack/3rdparty-build/gen_pack.py --path=./tensorflow-pack/3rdparty-build/ethos-u-driver --date_tag
73-
# cp ${{ github.workspace }}/tensorflow-pack/3rdparty-build/ethos-u-driver/build/*.pack ${{ github.workspace }}/out/
74-
- name: Upload packs
75-
uses: actions/upload-artifact@v3
76-
with:
77-
name: packs-artifacts
78-
path: ${{ github.workspace }}/out/
79-
44+
./tensorflow-pack/tensorflow-build/build_d.sh $(date +'%y%m%d')
45+
46+
#- name: Copy tensorflow-pack to out path
47+
# run :
48+
# cp ${{ github.workspace }}/tensorflow-pack/tensorflow-build/gen/build/*.pack ${{ github.workspace }}/out/
49+
50+
- name: Run the 3rdparty pack build with the revision specified
51+
run : |
52+
export PATH=$PATH:${{ github.workspace }}/tensorflow-pack/tensorflow-build/gen/utilities
53+
./tensorflow-pack/3rdparty-build/build_d.sh $(date +'%y%m%d')
54+
55+
- name: Copy packs to out path
56+
run :
57+
cp ${{ github.workspace }}/tensorflow-pack/out/*.pack ${{ github.workspace }}/out/
58+
59+
- name: Get all generated PDSC files for artifact upload
60+
run :
61+
find ${{ github.workspace }}/tensorflow-pack/ -name '*.pdsc' -exec cp -prv '{}' '${{ github.workspace }}/out/' ';'
8062

81-
test-tensorflow-cm55:
82-
needs: [build-tensorflow]
83-
runs-on: ubuntu-latest
84-
steps:
85-
- name: Checkout tensorflow-build
86-
uses: actions/checkout@v2
87-
with:
88-
repository: MDK-Packs/tensorflow-pack
89-
path: tensorflow-pack
90-
- name: Checkout tensorflow
91-
uses: actions/checkout@v2
92-
with:
93-
repository: tensorflow/tflite-micro
94-
path: tensorflow
95-
clean: false
96-
- name: Download builds from build job
97-
uses: actions/download-artifact@v3
98-
with:
99-
name: packs-artifacts
100-
path: ${{ github.workspace }}/out/
101-
- name: Create test projects
102-
run: |
103-
echo "Run tests on Cortex-M55 FVP"
104-
python3 ./tensorflow-pack/tensorflow-test/testrunner_vht.py --cvariant=Reference --tflm_path=/home/ubuntu/vhtwork/ --inventory=./tensorflow-pack/tensorflow-test/all_tests_reference.yml
105-
mkdir ./vht
106-
mkdir ./vht/templates
107-
cp -R ${{ github.workspace }}/tensorflow-pack/tensorflow-test/vht/* ./vht
108-
cp -R ${{ github.workspace }}/tensorflow-pack/tensorflow-test/templates/* ./vht/templates
109-
cp -R ${{ github.workspace }}/out/*.pack ./vht/packs
110-
cp -R ${{ github.workspace }}/tensorflow-pack/tensorflow-test/cmsis-toolbox.options ./vht
111-
cp -R ${{ github.workspace }}/tensorflow-pack/tensorflow-test/install_cmsis_toolbox.sh ./vht
112-
# docker exec build_runtime python3 ./tensorflow-pack/tensorflow-test/testrunner_fvp.py --cvariant=Reference --tflm_path=./tensorflow/ --inventory=./tensorflow-pack/tensorflow-test/kernel_tests_reference.yml
113-
# docker exec build_runtime python3 ./tensorflow-pack/tensorflow-test/testrunner_fvp.py --cvariant=CMSIS-NN --tflm_path=./tensorflow/ --inventory=./tensorflow-pack/tensorflow-test/kernel_tests_cmsis.yml
114-
# docker exec build_runtime python3 ./tensorflow-pack/tensorflow-test/testrunner_fvp.py --cvariant=Ethos-U --tflm_path=./tensorflow/ --inventory=./tensorflow-pack/tensorflow-test/kernel_tests_ethos.yml
115-
- name: Execute test suite on Virtual Hardware at AWS
116-
uses: Arm-Software/VHT-AMI@v2
117-
with:
118-
vht_in: ./vht/
119-
ec2_instance_id: ${{ secrets.AWS_INSTANCE_ID }}
120-
ec2_instance_type: t2.xlarge
121-
ec2_security_group_id: ${{ secrets.AWS_EC2_SECURITY_GROUP_ID }}
122-
iam_profile: ${{ secrets.AWS_IAM_PROFILE }}
123-
s3_bucket_name: gh-mdkpacks-tensorflow-1
124-
ssh_key_name: tensorflow-pack
125-
subnet_id: ${{ secrets.AWS_SUBNET_ID }}
126-
terminate_ec2_instance: 'false'
127-
vht_ami_version: '1.1.2'
128-
env:
129-
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
130-
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY_SECRET }}
131-
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
132-
- name: Fetch results from VHT
133-
run: |
134-
tar xvzf out.tar
135-
cat ./home/ubuntu/vhtwork/out/testing_helpers_test.axf.stdio
136-
- name: Create junit Test Reports
137-
run: |
138-
docker exec build_runtime python3 ./tensorflow-pack/tensorflow-test/testlog_parser.py ./home/ubuntu/vhtwork/out/
139-
# mv ./home/ubuntu/vhtwork/out/*.junit ${{ github.workspace }}/tensorflow-pack/
140-
- name: Publish Unit Test Results
141-
uses: EnricoMi/publish-unit-test-result-action@v1
142-
if: always()
143-
with:
144-
files: ${{ github.workspace }}/home/ubuntu/vhtwork/out/**/*.junit
14563
- name: Upload Pack
146-
uses: actions/upload-artifact@v2
64+
uses: actions/upload-artifact@v3
14765
with:
66+
name: tensorflow-pack-release
14867
path: ${{ github.workspace }}/out
149-
- name: Upload Test Reports
150-
uses: actions/upload-artifact@v2
151-
with:
152-
path: ${{ github.workspace }}/out.tar
153-
154-
test-tensorflow-cm0:
155-
needs: [build-tensorflow]
156-
runs-on: ubuntu-latest
157-
steps:
158-
- name: Checkout tensorflow-build
159-
uses: actions/checkout@v2
160-
with:
161-
repository: MDK-Packs/tensorflow-pack
162-
path: tensorflow-pack
163-
- name: Checkout tensorflow
164-
uses: actions/checkout@v2
165-
with:
166-
repository: tensorflow/tflite-micro
167-
path: tensorflow
168-
clean: false
169-
- name: Download builds from build job
170-
uses: actions/download-artifact@v3
171-
with:
172-
name: packs-artifacts
173-
path: ${{ github.workspace }}/out/
174-
175-
test-tensorflow-cm3:
176-
needs: [build-tensorflow]
177-
runs-on: ubuntu-latest
178-
steps:
179-
- name: Checkout tensorflow-build
180-
uses: actions/checkout@v2
181-
with:
182-
repository: MDK-Packs/tensorflow-pack
183-
path: tensorflow-pack
184-
- name: Checkout tensorflow
185-
uses: actions/checkout@v2
186-
with:
187-
repository: tensorflow/tflite-micro
188-
path: tensorflow
189-
clean: false
190-
- name: Download builds from build job
191-
uses: actions/download-artifact@v3
192-
with:
193-
name: packs-artifacts
194-
path: ${{ github.workspace }}/out/
195-
196-
test-tensorflow-cm4f:
197-
needs: [build-tensorflow]
198-
runs-on: ubuntu-latest
199-
steps:
200-
- name: Checkout tensorflow-build
201-
uses: actions/checkout@v2
202-
with:
203-
repository: MDK-Packs/tensorflow-pack
204-
path: tensorflow-pack
205-
- name: Checkout tensorflow
206-
uses: actions/checkout@v2
207-
with:
208-
repository: tensorflow/tflite-micro
209-
path: tensorflow
210-
clean: false
211-
- name: Download builds from build job
212-
uses: actions/download-artifact@v3
213-
with:
214-
name: packs-artifacts
215-
path: ${{ github.workspace }}/out/
216-
217-
test-tensorflow-cm7:
218-
needs: [build-tensorflow]
219-
runs-on: ubuntu-latest
220-
steps:
221-
- name: Checkout tensorflow-build
222-
uses: actions/checkout@v2
223-
with:
224-
repository: MDK-Packs/tensorflow-pack
225-
path: tensorflow-pack
226-
- name: Checkout tensorflow
227-
uses: actions/checkout@v2
228-
with:
229-
repository: tensorflow/tflite-micro
230-
path: tensorflow
231-
clean: false
232-
- name: Download builds from build job
233-
uses: actions/download-artifact@v3
234-
with:
235-
name: packs-artifacts
236-
path: ${{ github.workspace }}/out/
23768

238-
test-tensorflow-cm33:
239-
needs: [build-tensorflow]
240-
runs-on: ubuntu-latest
241-
steps:
242-
- name: Checkout tensorflow-build
243-
uses: actions/checkout@v2
244-
with:
245-
repository: MDK-Packs/tensorflow-pack
246-
path: tensorflow-pack
247-
- name: Checkout tensorflow
248-
uses: actions/checkout@v2
249-
with:
250-
repository: tensorflow/tflite-micro
251-
path: tensorflow
252-
clean: false
253-
- name: Download builds from build job
254-
uses: actions/download-artifact@v3
255-
with:
256-
name: packs-artifacts
257-
path: ${{ github.workspace }}/out/
69+

0 commit comments

Comments
 (0)