[github-action] change the way to upload coverage report (#5375)

This commit is contained in:
Li Cao
2020-08-12 12:30:47 +08:00
committed by GitHub
parent f2d026729d
commit 7dc3b2696a
2 changed files with 41 additions and 0 deletions
+16
View File
@@ -71,5 +71,21 @@ jobs:
run: |
./script/test unit
./script/test cert_suite tests/scripts/thread-cert/v1_2_*
- name: Keep-1-2-only
run: |
./script/test tar 1.1
./script/test tar 1.2-bbr
- name: Codecov
uses: codecov/codecov-action@v1
- name: Keep-1-2-bbr-only
run: |
./script/test tar 1.2
./script/test untar 1.2-bbr
- name: Codecov
uses: codecov/codecov-action@v1
- name: Keep-1-1-only
run: |
./script/test tar 1.2-bbr
./script/test untar 1.1
- name: Codecov
uses: codecov/codecov-action@v1
+25
View File
@@ -332,6 +332,23 @@ do_package()
ls "${builddir}"/openthread-daemon-*.deb
}
do_tar()
{
local target_name="openthread-simulation-$1"
local build_dir="${OT_BUILDDIR}/cmake"
tar -cf "${target_name}.tar" -C "${build_dir}" "${target_name}"
mv "${target_name}.tar" "${build_dir}/"
rm -rf "${build_dir:?}/${target_name}"
}
do_untar()
{
local target_name="openthread-simulation-$1"
local build_dir="${OT_BUILDDIR}/cmake"
tar -xf "${build_dir}/${target_name}.tar" -C "${build_dir}"
rm "${build_dir:?}/${target_name}.tar"
}
envsetup()
{
if [[ ${NODE_MODE} == 'rcp' ]]; then
@@ -418,6 +435,14 @@ main()
shift
do_expect "$@"
;;
tar)
shift
do_tar "$1"
;;
untar)
shift
do_untar "$1"
;;
esac
shift
done