1- name : Test CI using Arm Virtual Hardware
2-
3- # Controls when the action will run.
1+ name : AVH build and execution test
42on :
5- workflow_run :
6- workflows : ["Release CI"]
7- types :
8- - completed
3+ workflow_dispatch :
4+ pull_request :
5+ branches : [main]
6+ push :
7+ branches : [main]
8+ schedule :
9+ - cron : ' 00 20 * * 6'
910
10- # A workflow run is made up of one or more jobs that can run sequentially or in parallel
1111jobs :
12- # This workflow contains a single job called "build"
13- test-tensorflow :
14- # The type of runner that the job will run on
12+ AVH :
13+ strategy :
14+
15+ matrix :
16+ target : [
17+ {proj: kws, board: AVH-SSE-300, model: FVP_Corstone_SSE-300, uart: mps3_board.uart0},
18+ {proj: kws, board: AVH-SSE-300-U55, model: FVP_Corstone_SSE-300_Ethos-U55, uart: mps3_board.uart0},
19+ {proj: kws, board: AVH-SSE-300-U65, model: FVP_Corstone_SSE-300_Ethos-U65, uart: mps3_board.uart0},
20+ {proj: kws, board: AVH-SSE-310, model: FVP_Corstone_SSE-310, uart: mps3_board.uart0},
21+ {proj: kws, board: AVH-SSE-310-U55, model: FVP_Corstone_SSE-310, uart: mps3_board.uart0},
22+ {proj: kws, board: AVH-SSE-310-U65, model: FVP_Corstone_SSE-310_Ethos-U65, uart: mps3_board.uart0},
23+ {proj: object-detection, board: AVH-SSE-300, model: FVP_Corstone_SSE-300, uart: mps3_board.uart0},
24+ {proj: object-detection, board: AVH-SSE-300-U55, model: FVP_Corstone_SSE-300_Ethos-U55, uart: mps3_board.uart0},
25+ {proj: object-detection, board: AVH-SSE-300-U65, model: FVP_Corstone_SSE-300_Ethos-U65, uart: mps3_board.uart0},
26+ {proj: object-detection, board: AVH-SSE-310, model: FVP_Corstone_SSE-310, uart: mps3_board.uart0},
27+ {proj: object-detection, board: AVH-SSE-310-U55, model: FVP_Corstone_SSE-310, uart: mps3_board.uart0},
28+ {proj: object-detection, board: AVH-SSE-310-U65, model: FVP_Corstone_SSE-310_Ethos-U65, uart: mps3_board.uart0}
29+ ]
30+
31+ fail-fast : false
32+
1533 runs-on : ubuntu-latest
1634
17- # Steps represent a sequence of tasks that will be executed as part of the job
1835 steps :
36+ - name : Checkout repo
37+ uses : actions/checkout@v4
38+ with :
39+ repository : Arm-Examples/mlek-cmsis-pack-examples
40+
41+ - name : Restore Latest Pack Build from Cache
42+ uses : actions/cache@v3
43+ with :
44+ path : ${{ github.workspace }}/out
45+ key : latest-tensorflow-pack-build
46+
47+ - name : Install tools
48+ uses : ARM-software/cmsis-actions/vcpkg@v1
49+ with :
50+ config : " .ci/vcpkg-configuration.json"
51+
52+ - name : Activate Arm tool license
53+ uses : ARM-software/cmsis-actions/armlm@v1
54+
55+ - name : Unpack and Install Packs
56+ run :
57+ cd ${{ github.workspace }}/out && cpackget add -a *.pack
58+
59+ - name : Diagnosis show directory structure
60+ run :
61+ tree -d
62+
63+ - name : Diagnosis where *.yml files are locacted
64+ run :
65+ tree --prune -P '*.yml'
66+
67+ - name : Show content of mlek.csolution.yml before patch
68+ run : |
69+ cat mlek.csolution.yml
70+
71+ - name : Patch the csolution to use the latest CMSIS and tensorflow packs
72+ run : |
73+ sed -i 's/\(tensorflow::[^@]*\)@[^ ]*/\1/g' mlek.csolution.yml
74+
75+ - name : Show content of mlek.csolution.yml after patch
76+ run : |
77+ cat mlek.csolution.yml
78+
79+ - name : Build project ${{ matrix.target.proj }} for target ${{ matrix.target.board }} with AC6
80+ run : |
81+ cbuild mlek.csolution.yml --update-rte --packs --context ${{ matrix.target.proj }}+${{ matrix.target.board }}
82+
83+ - name : Execute project ${{ matrix.target.proj }}, target ${{ matrix.target.board }}, build Release on AVH ${{ matrix.target.model }}
84+ if : always()
85+ run : |
86+ ${{ matrix.target.model }} \
87+ -a ./out/${{ matrix.target.proj }}/${{ matrix.target.board }}/Release/${{ matrix.target.proj }}.axf \
88+ -f ./FVP/${{ matrix.target.model }}/fvp_config.txt \
89+ -C ${{ matrix.target.uart }}.out_file=./out/${{ matrix.target.proj }}/${{ matrix.target.board }}/Release/fvp_stdout.log \
90+ --simlimit 60 --stat
91+ cat ./out/${{ matrix.target.proj }}/${{ matrix.target.board }}/Release/fvp_stdout.log
1992
20- - name : Checkout tensorflow-build
21- uses : actions/checkout@v2
22- with :
23- repository : MDK-Packs/tensorflow-pack
24- path : tensorflow-pack
25-
26- - name : Download artifacts from Release CI
27- uses : actions/download-artifact@v3
28- with :
29- name : tensorflow-pack-release
30- path : tensorflow-pack/tensorflow-test-ng/packs
31-
32- - name : Run unit tests on AVH@AWS
33- env :
34- AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
35- AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_ACCESS_KEY_SECRET }}
36- AWS_DEFAULT_REGION : ${{ secrets.AWS_DEFAULT_REGION }}
37- AWS_S3_BUCKET_NAME : ${{ secrets.AWS_S3_BUCKET }}
38- AWS_IAM_PROFILE : ${{ secrets.AWS_IAM_PROFILE }}
39- AWS_SECURITY_GROUP_ID : ${{ secrets.AWS_EC2_SECURITY_GROUP_ID }}
40- AWS_SUBNET_ID : ${{ secrets.AWS_SUBNET_ID }}
41-
42- run : |
43- ./tensorflow-pack/tensorflow-test-ng/test_r.sh
44- pip install git+https://github.com/ARM-software/avhclient.git@v0.1
45- mkdir ${{ github.workspace }}/tensorflow-pack/tensorflow-test-ng/out/
46- cp ${{ github.workspace }}/out/*.pack ${{ github.workspace }}/tensorflow-pack/tensorflow-test-ng/out/
47- avhclient -b aws execute --specfile tensorflow-pack/tensorflow-test-ng/avh.yml
48- ls tensorflow-pack/tensorflow-test-ng/test_results.db
49-
50- - name : Upload Test Reports
51- uses : actions/upload-artifact@v3
52- with :
53- path : ${{ github.workspace }}/tensorflow-pack/**/test_results.*
93+ - name : Execute project ${{ matrix.target.proj }}, target ${{ matrix.target.board }}, build Debug on AVH ${{ matrix.target.model }}
94+ if : always()
95+ run : |
96+ ${{ matrix.target.model }} \
97+ -a ./out/${{ matrix.target.proj }}/${{ matrix.target.board }}/Debug/${{ matrix.target.proj }}.axf \
98+ -f ./FVP/${{ matrix.target.model }}/fvp_config.txt \
99+ -C ${{ matrix.target.uart }}.out_file=./out/${{ matrix.target.proj }}/${{ matrix.target.board }}/Debug/fvp_stdout.log \
100+ --simlimit 60 --stat
101+ cat ./out/${{ matrix.target.proj }}/${{ matrix.target.board }}/Debug/fvp_stdout.log
0 commit comments