diff --git a/.github/workflows/simulation-1.2.yml b/.github/workflows/simulation-1.2.yml index f212ec6af..d1d2161d8 100644 --- a/.github/workflows/simulation-1.2.yml +++ b/.github/workflows/simulation-1.2.yml @@ -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 diff --git a/script/test b/script/test index f5b30124f..0d3dacdf9 100755 --- a/script/test +++ b/script/test @@ -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