Skip to content

Commit

Permalink
[github-actions] migrate version 1.3 checks to 1.4 (#10694)
Browse files Browse the repository at this point in the history
  • Loading branch information
jwhui authored Sep 11, 2024
1 parent c0690e7 commit 2f51cab
Show file tree
Hide file tree
Showing 16 changed files with 73 additions and 72 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/otbr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
REFERENCE_DEVICE: 1
VIRTUAL_TIME: 0
PACKET_VERIFICATION: 1
THREAD_VERSION: 1.3
THREAD_VERSION: 1.4
INTER_OP: 1
COVERAGE: 1
MULTIPLY: 1
Expand Down Expand Up @@ -170,7 +170,7 @@ jobs:
REFERENCE_DEVICE: 1
VIRTUAL_TIME: 0
PACKET_VERIFICATION: ${{ matrix.packet_verification }}
THREAD_VERSION: 1.3
THREAD_VERSION: 1.4
INTER_OP: 1
COVERAGE: 1
MULTIPLY: 1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/otci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
PYTHONPATH=./tests/scripts/thread-cert pytype tools/otci
- name: Build
run: |
./script/cmake-build simulation -DOT_THREAD_VERSION=1.3 -DOT_DUA=ON -DOT_MLR=ON -DOT_BACKBONE_ROUTER=ON \
./script/cmake-build simulation -DOT_THREAD_VERSION=1.4 -DOT_DUA=ON -DOT_MLR=ON -DOT_BACKBONE_ROUTER=ON \
-DOT_CSL_RECEIVER=ON -DOT_SIMULATION_VIRTUAL_TIME=${VIRTUAL_TIME}
- name: Install OTCI Python Library
run: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# POSSIBILITY OF SUCH DAMAGE.
#

name: Simulation 1.3
name: Simulation 1.4

on:
push:
Expand All @@ -45,15 +45,15 @@ permissions: # added using https://github.com/step-security/secure-workflows

jobs:

thread-1-3:
name: thread-1-3-${{ matrix.compiler.c }}-${{ matrix.arch }}
thread-1-4:
name: thread-1-4-${{ matrix.compiler.c }}-${{ matrix.arch }}
runs-on: ubuntu-20.04
env:
CFLAGS: -${{ matrix.arch }}
CXXFLAGS: -${{ matrix.arch }}
LDFLAGS: -${{ matrix.arch }}
COVERAGE: 1
THREAD_VERSION: 1.3
THREAD_VERSION: 1.4
VIRTUAL_TIME: 1
INTER_OP: 1
INTER_OP_BBR: 1
Expand Down Expand Up @@ -98,20 +98,20 @@ jobs:
- uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
if: ${{ failure() }}
with:
name: thread-1-3-${{ matrix.compiler.c }}-${{ matrix.arch }}-pcaps
name: thread-1-4-${{ matrix.compiler.c }}-${{ matrix.arch }}-pcaps
path: "*.pcap"
- uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
if: ${{ failure() && env.CRASHED == '1' }}
with:
name: core-packet-verification-thread-1-3
name: core-packet-verification-thread-1-4
path: |
./ot-core-dump/*
- name: Generate Coverage
run: |
./script/test generate_coverage "${{ matrix.compiler.gcov }}"
- uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
with:
name: cov-thread-1-3-${{ matrix.compiler.c }}-${{ matrix.arch }}
name: cov-thread-1-4-${{ matrix.compiler.c }}-${{ matrix.arch }}
path: tmp/coverage.info
retention-days: 1

Expand All @@ -122,7 +122,7 @@ jobs:
VIRTUAL_TIME: 1
COVERAGE: 1
PACKET_VERIFICATION: 1
THREAD_VERSION: 1.3
THREAD_VERSION: 1.4
MAC_FILTER: 1
INTER_OP: 1
INTER_OP_BBR: 0
Expand Down Expand Up @@ -188,13 +188,13 @@ jobs:
path: tmp/coverage.info
retention-days: 1

packet-verification-1-1-on-1-3:
packet-verification-1-1-on-1-4:
runs-on: ubuntu-20.04
env:
REFERENCE_DEVICE: 1
VIRTUAL_TIME: 1
PACKET_VERIFICATION: 1
THREAD_VERSION: 1.3
THREAD_VERSION: 1.4
INTER_OP_BBR: 1
MULTIPLY: 3
steps:
Expand Down Expand Up @@ -223,7 +223,7 @@ jobs:
- uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
if: ${{ failure() }}
with:
name: packet-verification-1.1-on-1.3-pcaps
name: packet-verification-1.1-on-1.4-pcaps
path: |
*.pcap
*.json
Expand All @@ -232,7 +232,7 @@ jobs:
./script/test generate_coverage gcc
- uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
with:
name: cov-packet-verification-1-1-on-1-3
name: cov-packet-verification-1-1-on-1-4
path: tmp/coverage.info
retention-days: 1

Expand All @@ -243,7 +243,7 @@ jobs:
CXXFLAGS: -m32
LDFLAGS: -m32
COVERAGE: 1
THREAD_VERSION: 1.3
THREAD_VERSION: 1.4
VIRTUAL_TIME: 1
steps:
- name: Harden Runner
Expand Down Expand Up @@ -284,7 +284,7 @@ jobs:
runs-on: ubuntu-20.04
env:
COVERAGE: 1
THREAD_VERSION: 1.3
THREAD_VERSION: 1.4
VIRTUAL_TIME: 0
steps:
- name: Harden Runner
Expand Down Expand Up @@ -313,7 +313,7 @@ jobs:
- uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
if: ${{ failure() && env.CRASHED == '1' }}
with:
name: core-expect-1-3
name: core-expect-1-4
path: |
./ot-core-dump/*
- name: Generate Coverage
Expand All @@ -325,13 +325,13 @@ jobs:
path: tmp/coverage.info
retention-days: 1

thread-1-3-posix:
thread-1-4-posix:
runs-on: ubuntu-20.04
env:
COVERAGE: 1
PYTHONUNBUFFERED: 1
READLINE: readline
THREAD_VERSION: 1.3
THREAD_VERSION: 1.4
OT_NODE_TYPE: rcp
USE_MTD: 1
VIRTUAL_TIME: 1
Expand Down Expand Up @@ -372,30 +372,30 @@ jobs:
- uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
if: ${{ failure() }}
with:
name: thread-1-3-posix-pcaps
name: thread-1-4-posix-pcaps
path: "*.pcap"
- uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
if: ${{ failure() && env.CRASHED == '1' }}
with:
name: core-thread-1-3-posix
name: core-thread-1-4-posix
path: |
./ot-core-dump/*
- name: Generate Coverage
run: |
./script/test generate_coverage gcc
- uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
with:
name: cov-thread-1-3-posix
name: cov-thread-1-4-posix
path: tmp/coverage.info
retention-days: 1

upload-coverage:
needs:
- thread-1-3
- thread-1-4
- packet-verification-low-power
- packet-verification-1-1-on-1-3
- packet-verification-1-1-on-1-4
- expects
- thread-1-3-posix
- thread-1-4-posix
runs-on: ubuntu-20.04
steps:
- name: Harden Runner
Expand Down
2 changes: 1 addition & 1 deletion script/check-arm-build
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ build_nrf52840()
"-DOT_SNTP_CLIENT=ON"
"-DOT_SRP_CLIENT=ON"
"-DOT_SRP_SERVER=ON"
"-DOT_THREAD_VERSION=1.3"
"-DOT_THREAD_VERSION=1.4"
"-DOT_TIME_SYNC=ON"
"-DOT_UDP_FORWARD=ON"
"-DOT_UPTIME=ON"
Expand Down
4 changes: 2 additions & 2 deletions script/check-gn-build
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ main()
ninja -C gn-out
test -f gn-out/obj/src/core/libopenthread-ftd.a

# Check GN build for OT1.3
# Check GN build for OT1.4
rm gn-out -r || true
mkdir gn-out
echo 'openthread_config_thread_version = "1.3"' >gn-out/args.gn
echo 'openthread_config_thread_version = "1.4"' >gn-out/args.gn
gn gen --check gn-out
gn args gn-out --list
ninja -C gn-out
Expand Down
22 changes: 11 additions & 11 deletions script/check-simulation-build-cmake
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ build_all_features()
-DOT_SIMULATION_VIRTUAL_TIME=ON \
-DOT_OTNS=ON

# Thread 1.3 options
# Thread 1.4 options
local options=(
"-DOT_BACKBONE_ROUTER=ON"
"-DOT_BORDER_ROUTING=ON"
Expand All @@ -152,35 +152,35 @@ build_all_features()
"-DOT_MLR=ON"
"-DOT_OTNS=ON"
"-DOT_SIMULATION_VIRTUAL_TIME=ON"
"-DOT_THREAD_VERSION=1.3"
"-DOT_THREAD_VERSION=1.4"
)

# Build Thread 1.3 with full features
# Build Thread 1.4 with full features
reset_source
CFLAGS="${cppflags[*]} ${CFLAGS}" CXXFLAGS="${cppflags[*]} ${CXXFLAGS}" \
"$(dirname "$0")"/cmake-build simulation "${options[@]}" -DOT_DUA=ON

# Build Thread 1.3 with external heap and msg pool using heap
# Build Thread 1.4 with external heap and msg pool using heap
reset_source
CFLAGS="${cppflags[*]} ${CFLAGS} -DOPENTHREAD_CONFIG_MESSAGE_USE_HEAP_ENABLE=1" \
CXXFLAGS="${cppflags[*]} ${CXXFLAGS} -DOPENTHREAD_CONFIG_MESSAGE_USE_HEAP_ENABLE=1" \
"$(dirname "$0")"/cmake-build simulation "${options[@]}" -DOT_DUA=ON

# Build Thread 1.3 with full features and no log
# Build Thread 1.4 with full features and no log
reset_source
CFLAGS="${cppflags[*]} ${CFLAGS}" CXXFLAGS="${cppflags[*]} ${CXXFLAGS}" \
"$(dirname "$0")"/cmake-build simulation "${options[@]}" -DOT_DUA=ON -DOT_LOG_OUTPUT=NONE

# Build Thread 1.3 with full features and full logs
# Build Thread 1.4 with full features and full logs
reset_source
CFLAGS="${cppflags[*]} ${CFLAGS}" CXXFLAGS="${cppflags[*]} ${CXXFLAGS}" \
"$(dirname "$0")"/cmake-build simulation "${options[@]}" -DOT_DUA=ON -DOT_FULL_LOGS=ON

# Build Thread 1.3 Backbone Router without DUA ND Proxying
# Build Thread 1.4 Backbone Router without DUA ND Proxying
reset_source
"$(dirname "$0")"/cmake-build simulation "${options[@]}" -DOT_BACKBONE_ROUTER_DUA_NDPROXYING=OFF

# Build Thread 1.3 Backbone Router without Multicast Routing
# Build Thread 1.4 Backbone Router without Multicast Routing
reset_source
"$(dirname "$0")"/cmake-build simulation "${options[@]}" -DOT_BACKBONE_ROUTER_MULTICAST_ROUTING=OFF

Expand All @@ -190,11 +190,11 @@ build_all_features()
-DOT_THREAD_VERSION=1.1 \
-DOT_VENDOR_EXTENSION=../../src/core/instance/extension_example.cpp

# Build Thread 1.3 with no additional features
# Build Thread 1.4 with no additional features
reset_source
"$(dirname "$0")"/cmake-build simulation -DOT_THREAD_VERSION=1.3
"$(dirname "$0")"/cmake-build simulation -DOT_THREAD_VERSION=1.4

# Build Thread 1.3 with full features and OT_ASSERT=OFF
# Build Thread 1.4 with full features and OT_ASSERT=OFF
reset_source
"$(dirname "$0")"/cmake-build simulation "${options[@]}" -DOT_DUA=ON -DOT_ASSERT=OFF

Expand Down
6 changes: 3 additions & 3 deletions script/make-pretty
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ OT_CLANG_TIDY_BUILD_OPTS=(
'-DOT_SRP_ADV_PROXY=ON'
'-DOT_SRP_CLIENT=ON'
'-DOT_SRP_SERVER=ON'
'-DOT_THREAD_VERSION=1.3'
'-DOT_THREAD_VERSION=1.4'
'-DOT_TREL=ON'
'-DOT_COVERAGE=ON'
'-DOT_LOG_LEVEL_DYNAMIC=ON'
Expand Down Expand Up @@ -174,7 +174,7 @@ do_clang_tidy_fix()

(mkdir -p ./build/cmake-tidy \
&& cd ./build/cmake-tidy \
&& THREAD_VERSION=1.3 cmake "${OT_CLANG_TIDY_BUILD_OPTS[@]}" ../.. \
&& THREAD_VERSION=1.4 cmake "${OT_CLANG_TIDY_BUILD_OPTS[@]}" ../.. \
&& ../../script/clang-tidy -j"$OT_BUILD_JOBS" "${OT_CLANG_TIDY_FIX_DIRS[@]}" -fix)
}

Expand All @@ -186,7 +186,7 @@ do_clang_tidy_check()

(mkdir -p ./build/cmake-tidy \
&& cd ./build/cmake-tidy \
&& THREAD_VERSION=1.3 cmake "${OT_CLANG_TIDY_BUILD_OPTS[@]}" ../.. \
&& THREAD_VERSION=1.4 cmake "${OT_CLANG_TIDY_BUILD_OPTS[@]}" ../.. \
&& ../../script/clang-tidy -j"$OT_BUILD_JOBS" "${OT_CLANG_TIDY_FIX_DIRS[@]}")
}

Expand Down
20 changes: 10 additions & 10 deletions script/test
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ readonly OT_NODE_TYPE
OT_NATIVE_IP="${OT_NATIVE_IP:-0}"
readonly OT_NATIVE_IP

THREAD_VERSION="${THREAD_VERSION:-1.3}"
THREAD_VERSION="${THREAD_VERSION:-1.4}"
readonly THREAD_VERSION

INTER_OP="${INTER_OP:-0}"
Expand Down Expand Up @@ -263,7 +263,7 @@ do_unit()
do_unit_version "${THREAD_VERSION}"

if [[ ${THREAD_VERSION} != "1.1" && ${INTER_OP_BBR} == 1 ]]; then
do_unit_version "1.3-bbr"
do_unit_version "1.4-bbr"
fi
}

Expand All @@ -282,7 +282,7 @@ do_cert()
esac

if [[ ${THREAD_VERSION} != "1.1" ]]; then
export top_builddir_1_3_bbr="${OT_BUILDDIR}/openthread-simulation-1.3-bbr"
export top_builddir_1_4_bbr="${OT_BUILDDIR}/openthread-simulation-1.4-bbr"
if [[ ${INTER_OP} == "1" ]]; then
export top_builddir_1_1="${OT_BUILDDIR}/openthread-simulation-1.1"
fi
Expand All @@ -301,7 +301,7 @@ do_cert_suite()
export top_srcdir="${OT_SRCDIR}"

if [[ ${THREAD_VERSION} != "1.1" ]]; then
export top_builddir_1_3_bbr="${OT_BUILDDIR}/openthread-simulation-1.3-bbr"
export top_builddir_1_4_bbr="${OT_BUILDDIR}/openthread-simulation-1.4-bbr"
if [[ ${INTER_OP} == "1" ]]; then
export top_builddir_1_1="${OT_BUILDDIR}/openthread-simulation-1.1"
fi
Expand Down Expand Up @@ -505,9 +505,9 @@ ENVIRONMENTS:
VERBOSE 1 to build or test verbosely. The default is 0.
VIRTUAL_TIME 1 for virtual time, otherwise real time. The default value is 0 when running expect tests,
otherwise default value is 1.
THREAD_VERSION 1.1 for Thread 1.1 stack, 1.3 for Thread 1.3 stack. The default is 1.3.
INTER_OP 1 to build 1.1 together. Only works when THREAD_VERSION is 1.3. The default is 0.
INTER_OP_BBR 1 to build bbr version together. Only works when THREAD_VERSION is 1.3. The default is 1.
THREAD_VERSION 1.1 for Thread 1.1 stack, 1.4 for Thread 1.4 stack. The default is 1.4.
INTER_OP 1 to build 1.1 together. Only works when THREAD_VERSION is 1.4. The default is 0.
INTER_OP_BBR 1 to build bbr version together. Only works when THREAD_VERSION is 1.4. The default is 1.
COMMANDS:
clean Clean built files to prepare for new build.
Expand Down Expand Up @@ -539,7 +539,7 @@ EXAMPLES:
THREAD_VERSION=1.1 VIRTUAL_TIME=0 $0 clean build cert tests/scripts/thread-cert/Cert_5_1_01_RouterAttach.py
THREAD_VERSION=1.1 VIRTUAL_TIME=0 $0 cert tests/scripts/thread-cert/Cert_5_1_02_ChildAddressTimeout.py
# Test Thread 1.3 with real time, use 'INTER_OP=1' when the case needs both versions.
# Test Thread 1.4 with real time, use 'INTER_OP=1' when the case needs both versions.
VIRTUAL_TIME=0 $0 clean build cert tests/scripts/thread-cert/v1_2_test_enhanced_keep_alive.py
INTER_OP=1 VIRTUAL_TIME=0 $0 clean build cert tests/scripts/thread-cert/v1_2_router_5_1_1.py
INTER_OP=1 VIRTUAL_TIME=0 $0 clean build cert_suite tests/scripts/thread-cert/v1_2_*
Expand Down Expand Up @@ -646,7 +646,7 @@ envsetup()
if [[ ${THREAD_VERSION} != "1.1" ]]; then
export RADIO_DEVICE_1_1="${OT_BUILDDIR}/openthread-simulation-1.1/examples/apps/ncp/ot-rcp"
export OT_CLI_PATH_1_1="${OT_BUILDDIR}/openthread-posix-1.1/src/posix/ot-cli"
export OT_CLI_PATH_BBR="${OT_BUILDDIR}/openthread-posix-1.3-bbr/src/posix/ot-cli"
export OT_CLI_PATH_BBR="${OT_BUILDDIR}/openthread-posix-1.4-bbr/src/posix/ot-cli"
fi
fi

Expand Down Expand Up @@ -690,7 +690,7 @@ main()
fi

[[ ${VIRTUAL_TIME} == 1 ]] && echo "Using virtual time" || echo "Using real time"
[[ ${THREAD_VERSION} != "1.1" ]] && echo "Using Thread 1.3 stack" || echo "Using Thread 1.1 stack"
[[ ${THREAD_VERSION} != "1.1" ]] && echo "Using Thread 1.4 stack" || echo "Using Thread 1.1 stack"

while [[ $# != 0 ]]; do
case "$1" in
Expand Down
Loading

0 comments on commit 2f51cab

Please sign in to comment.