Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update github action with device power cycle to off and device delete to release #390

Merged
merged 57 commits into from
Nov 18, 2022
Merged
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
eb4fb26
update nncase to v1.6 and sync dev to main (#5)
wuwentao May 8, 2022
c06caf0
Merge pull request #9 from kendryte/dev
wycwyhwyq May 11, 2022
4d34292
Merge pull request #61 from kendryte/dev
wycwyhwyq May 21, 2022
5b58fca
add
wuwentao May 23, 2022
4eca0ba
Merge pull request #1 from wuwentao/dev
wuwentao May 23, 2022
6aa08d6
update
wuwentao May 23, 2022
ed32676
update path
wuwentao May 23, 2022
b66936b
remove crb_v0_1
wuwentao May 23, 2022
dfff09e
update release save path
wuwentao May 23, 2022
dd082ec
update
wuwentao May 24, 2022
4a22c51
Merge pull request #2 from wuwentao/dev
wuwentao May 24, 2022
122c7e0
update
wuwentao May 24, 2022
95fe827
update
wuwentao May 24, 2022
71f9590
update with error step name
wuwentao May 24, 2022
e49541a
Merge branch 'kendryte:dev' into dev
wuwentao May 27, 2022
cadc04e
update latest tag command
wuwentao May 27, 2022
e237d67
fix input error
wuwentao May 27, 2022
e627006
Merge remote-tracking branch 'upstream/dev' into dev
wuwentao Jun 15, 2022
0a7461d
Merge remote-tracking branch 'upstream/dev' into dev
wuwentao Jun 21, 2022
8925f63
update github actions and pull request template
wuwentao Jun 21, 2022
6026098
update syntax
wuwentao Jun 21, 2022
852ddb3
update output to env
wuwentao Jun 21, 2022
6ece404
update syntax
wuwentao Jun 21, 2022
2711eae
update args format
wuwentao Jun 22, 2022
15407ce
Merge remote-tracking branch 'upstream/dev' into dev
wuwentao Jun 22, 2022
620b42d
update args format
wuwentao Jun 22, 2022
59a25e5
update
wuwentao Jun 22, 2022
acb2533
update
wuwentao Jun 22, 2022
36a239d
add outputs
wuwentao Jun 22, 2022
b5e087a
update md5 args
wuwentao Jun 23, 2022
239b060
Merge remote-tracking branch 'upstream/dev' into dev
wuwentao Jun 23, 2022
6c2cc39
update md5 check
wuwentao Jun 23, 2022
df16d48
update
wuwentao Jun 23, 2022
a975750
update
wuwentao Jun 23, 2022
986a829
update
wuwentao Jun 23, 2022
d202a21
update ci args
wuwentao Jun 23, 2022
3db658e
update ci args
wuwentao Jun 23, 2022
eb5e694
update debug flag
wuwentao Jun 23, 2022
bcb232e
Merge branch 'dev' into dev
wuwentao Jun 29, 2022
a262ec3
update
wuwentao Jun 29, 2022
39c9fdf
update
wuwentao Jun 30, 2022
02683c9
update name
wuwentao Jun 30, 2022
5924e0a
Merge branch 'dev' into dev
wuwentao Jul 1, 2022
72e91be
add test job
wuwentao Jul 8, 2022
23898c9
-a
wuwentao Jul 8, 2022
2b2d625
Merge remote-tracking branch 'origin/dev' into dev
wuwentao Jul 8, 2022
fc8a71d
update test mode
wuwentao Jul 8, 2022
db29602
update
wuwentao Jul 8, 2022
3f6a242
Merge branch 'dev' into dev
wuwentao Jul 11, 2022
45f2dfe
Merge remote-tracking branch 'upstream/dev' into dev
wuwentao Jul 28, 2022
ccd3811
add power control and latest version link
wuwentao Jul 28, 2022
8755a3c
fix input error
wuwentao Jul 28, 2022
facb4e8
Merge branch 'dev' into dev
wuwentao Jul 29, 2022
aaded72
Merge remote-tracking branch 'upstream/dev' into dev
wuwentao Aug 18, 2022
d9b3eb6
Merge remote-tracking branch 'upstream/dev' into dev
wuwentao Nov 18, 2022
c130594
update github action with power off and release device
wuwentao Nov 18, 2022
4c27524
add reserved time slot
wuwentao Nov 18, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 26 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,10 @@ jobs:
export HW_MODEL=`echo ${{ matrix.cfg }}|awk -F '_' '{print $1}'`
export HW_VER=`echo ${{ matrix.cfg }}|awk -F '_' '{print $3"."$4}'`
test -d bin || mkdir ./bin
test -f ./bin/ai_dut && rm -rf ./bin/ai_dut
wget -qc https://ai.b-bug.org/k510_buildroot/github/ai_dut -O ./bin/ai_dut
chmod +x ./bin/ai_dut
available=$(./bin/ai_dut show --dest available --hw_type k510 --hw_model $HW_MODEL --hw_ver $HW_VER --format args)
test -f ./bin/ailab && rm -rf ./bin/ailab
wget -qc https://ai.b-bug.org/k510_buildroot/github/ailab -O ./bin/ailab
chmod +x ./bin/ailab
available=$(./bin/ailab show --dest available --hw_type k510 --hw_model $HW_MODEL --hw_ver $HW_VER --format args)
echo $available
echo "available=$available" >> $GITHUB_ENV
if [[ $available =~ "k510" ]]; then
Expand All @@ -152,7 +152,7 @@ jobs:
echo "Reserve DUT start"
echo "PR ID: $PULL_REQUEST_ID"
echo "Job ID: $GITHUB_RUN_ID"
reserved=$(./bin/ai_dut add ${{ env.available }} --site github-actions --source $PULL_REQUEST_ID --job $GITHUB_RUN_ID --format args)
reserved=$(./bin/ailab add ${{ env.available }} --time 15m --site github-actions --source $PULL_REQUEST_ID --job $GITHUB_RUN_ID --format args)
echo $reserved
echo "reserved=$reserved" >> $GITHUB_ENV
if [[ $reserved =~ "github-actions" ]]; then
Expand All @@ -161,12 +161,12 @@ jobs:
echo "ERROR: Reserve DUT failed"
exit 1
fi
power=$(./bin/ai_dut power --type=cycle ${{ env.available }})
power=$(./bin/ailab power --type=on ${{ env.available }})
echo $power
if [[ $power =~ "True" ]]; then
echo "Power Cycle DUT pass"
echo "Power on DUT pass"
else
echo "ERROR: Power Cycle DUT failed"
echo "ERROR: Power on DUT failed"
exit 1
fi

Expand All @@ -178,28 +178,28 @@ jobs:
echo "bbl md5: ${{needs.build_image.outputs.md5_bbl}}"
echo "dtb md5: ${{needs.build_image.outputs.md5_dtb}}"
test -d bin || mkdir ./bin
test -f ./bin/ai_load && rm -rf ./bin/ai_load
wget -qc https://ai.b-bug.org/k510_buildroot/github/ai_load -O ./bin/ai_load
chmod +x ./bin/ai_load
test -f ./bin/aiload && rm -rf ./bin/aiload
wget -qc https://ai.b-bug.org/k510_buildroot/github/aiload -O ./bin/aiload
chmod +x ./bin/aiload
echo $PULL_REQUEST_ID
echo $GITHUB_RUN_ID
./bin/ai_load --pr_id $PULL_REQUEST_ID --job_id $GITHUB_RUN_ID --md5_dtb ${{needs.build_image.outputs.md5_dtb}} --md5_bbl ${{needs.build_image.outputs.md5_bbl}} ${{ env.available }}
./bin/aiload --pr_id $PULL_REQUEST_ID --job_id $GITHUB_RUN_ID --md5_dtb ${{needs.build_image.outputs.md5_dtb}} --md5_bbl ${{needs.build_image.outputs.md5_bbl}} ${{ env.available }}

- name: Run Test
id: run_test
timeout-minutes: 10
run: |
echo "Run Test start"
test -d bin || mkdir ./bin
test -f ./bin/ai_robot && rm -rf ./bin/ai_robot
wget -qc https://ai.b-bug.org/k510_buildroot/github/ai_robot -O ./bin/ai_robot
chmod +x ./bin/ai_robot
test -f ./bin/airobot && rm -rf ./bin/airobot
wget -qc https://ai.b-bug.org/k510_buildroot/github/airobot -O ./bin/airobot
chmod +x ./bin/airobot
test -f ./k510.robot && rm -rf ./k510.robot
wget -qc https://ai.b-bug.org/k510_buildroot/github/k510.robot -O ./k510.robot
./bin/ai_dut convert --dest=script --format yaml --file_name=var.yml ${{ env.available }}
./bin/ailab convert --dest=script --format yaml --file_name=var.yml ${{ env.available }}
test -f var.yml || exit 1
echo "Run test case start"
./bin/ai_robot -m github -V var.yml -i github k510.robot
./bin/airobot -m github -V var.yml -i github k510.robot
echo "Run test case pass"

- name: Release DUT
Expand All @@ -208,11 +208,19 @@ jobs:
run: |
echo "Release DUT start"
test -d bin || mkdir ./bin
result=$(./bin/ai_dut delete ${{ env.reserved }})
result=$(./bin/ailab update ${{ env.reserved }})
echo $result
if [[ $result =~ "True" ]]; then
echo "Release DUT pass"
else
echo "ERROR: Release DUT failed"
exit 1
fi
power=$(./bin/ailab power --type=off ${{ env.available }})
echo $power
if [[ $power =~ "True" ]]; then
echo "Power off DUT pass"
else
echo "ERROR: Power off DUT failed"
exit 1
fi