diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 45199b268..041a4efdb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,7 +33,7 @@ on: [push, pull_request] jobs: cancel-previous-runs: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - uses: rokroskar/workflow-run-cleanup-action@master env: @@ -69,7 +69,7 @@ jobs: package: name: package-${{ matrix.compiler }} - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 strategy: matrix: include: @@ -166,7 +166,7 @@ jobs: clang: name: clang-${{ matrix.clang_ver }} - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 strategy: matrix: clang_ver: ["6.0", "7", "8", "9"] @@ -186,7 +186,7 @@ jobs: clang-m32: name: clang-m32-${{ matrix.clang_ver }} - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 strategy: matrix: clang_ver: ["6.0", "7", "8", "9"] @@ -210,7 +210,7 @@ jobs: script/check-posix-build gn: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 - name: Bootstrap @@ -257,7 +257,7 @@ jobs: script/check-simulation-build android: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 - name: Build diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index c2e540140..d3f369f88 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -33,7 +33,7 @@ on: [push, pull_request] jobs: cancel-previous-runs: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - uses: rokroskar/workflow-run-cleanup-action@master env: @@ -42,7 +42,7 @@ jobs: buildx: name: buildx-${{ matrix.docker_name }} - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 strategy: matrix: include: diff --git a/.github/workflows/fuzz.yml b/.github/workflows/fuzz.yml index 818664a84..8f549c505 100644 --- a/.github/workflows/fuzz.yml +++ b/.github/workflows/fuzz.yml @@ -30,7 +30,7 @@ name: CIFuzz on: [pull_request] jobs: Fuzzing: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - name: Build Fuzzers uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master diff --git a/.github/workflows/posix.yml b/.github/workflows/posix.yml index 8fd18d30d..ea68ed4b8 100644 --- a/.github/workflows/posix.yml +++ b/.github/workflows/posix.yml @@ -33,7 +33,7 @@ on: [push, pull_request] jobs: cancel-previous-runs: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - uses: rokroskar/workflow-run-cleanup-action@master env: @@ -42,7 +42,7 @@ jobs: posix-cli: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 env: COVERAGE: 1 PYTHONUNBUFFERED: 1 @@ -94,7 +94,7 @@ jobs: path: tmp/coverage.info posix-ncp: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 env: COVERAGE: 1 NODE_TYPE: ncp-sim @@ -148,7 +148,7 @@ jobs: path: tmp/coverage.info posix-ncp-rcp-migrate: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 env: COVERAGE: 1 steps: @@ -188,7 +188,7 @@ jobs: path: tmp/coverage.info posix-pty: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 env: COVERAGE: 1 steps: @@ -196,7 +196,7 @@ jobs: - name: Bootstrap run: | sudo rm /etc/apt/sources.list.d/* && sudo apt-get update - sudo apt-get --no-install-recommends install -y socat expect lcov + sudo apt-get --no-install-recommends install -y socat expect lcov net-tools cd /tmp wget https://github.com/obgm/libcoap/archive/bsd-licensed.tar.gz tar xvf bsd-licensed.tar.gz @@ -236,7 +236,7 @@ jobs: path: tmp/coverage.info posix-pty-daemon: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 env: COVERAGE: 1 DAEMON: 1 @@ -245,7 +245,7 @@ jobs: - name: Bootstrap run: | sudo rm /etc/apt/sources.list.d/* && sudo apt-get update - sudo apt-get --no-install-recommends install -y socat expect lcov + sudo apt-get --no-install-recommends install -y socat expect lcov net-tools cd /tmp wget https://github.com/obgm/libcoap/archive/bsd-licensed.tar.gz tar xvf bsd-licensed.tar.gz @@ -291,7 +291,7 @@ jobs: - posix-ncp-rcp-migrate - posix-pty - posix-pty-daemon - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 - name: Bootstrap diff --git a/.github/workflows/simulation-1.2.yml b/.github/workflows/simulation-1.2.yml index b9054e00e..69f71d3da 100644 --- a/.github/workflows/simulation-1.2.yml +++ b/.github/workflows/simulation-1.2.yml @@ -33,7 +33,7 @@ on: [push, pull_request] jobs: cancel-previous-runs: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - uses: rokroskar/workflow-run-cleanup-action@master env: @@ -42,7 +42,7 @@ jobs: thread-1-2: name: thread-1-2-${{ matrix.compiler.c }}-${{ matrix.arch }} - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 env: CFLAGS: -${{ matrix.arch }} CXXFLAGS: -${{ matrix.arch }} @@ -112,7 +112,7 @@ jobs: path: tmp/coverage.info packet-verification-low-power: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 env: REFERENCE_DEVICE: 1 VIRTUAL_TIME: 1 @@ -170,7 +170,7 @@ jobs: path: tmp/coverage.info packet-verification-1-1-on-1-2: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 env: REFERENCE_DEVICE: 1 VIRTUAL_TIME: 1 @@ -211,7 +211,7 @@ jobs: path: tmp/coverage.info expects: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 env: COVERAGE: 1 THREAD_VERSION: 1.2 @@ -299,7 +299,7 @@ jobs: - packet-verification-1-1-on-1-2 - expects - thread-1-2-backbone - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 - name: Bootstrap diff --git a/.github/workflows/simulation.yml b/.github/workflows/simulation.yml index 46d86e2c2..b9727685b 100644 --- a/.github/workflows/simulation.yml +++ b/.github/workflows/simulation.yml @@ -33,7 +33,7 @@ on: [push, pull_request] jobs: cancel-previous-runs: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - uses: rokroskar/workflow-run-cleanup-action@master env: @@ -41,7 +41,7 @@ jobs: if: "github.ref != 'refs/heads/master'" distcheck: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 env: CC: clang CXX: clang++ @@ -63,7 +63,7 @@ jobs: make -f examples/Makefile-simulation distcheck cli-ftd-otns: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 env: CFLAGS: -m32 CXXFLAGS: -m32 @@ -117,7 +117,7 @@ jobs: path: tmp/coverage.info packet-verification: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 env: REFERENCE_DEVICE: 1 VIRTUAL_TIME: 1 @@ -157,7 +157,7 @@ jobs: path: tmp/coverage.info cli-ftd: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 env: CFLAGS: -m32 CXXFLAGS: -m32 @@ -193,7 +193,7 @@ jobs: path: tmp/coverage.info cli-mtd: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 strategy: matrix: message_use_heap: [0, 1] @@ -234,7 +234,7 @@ jobs: path: tmp/coverage.info cli-time-sync: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 env: CFLAGS: -m32 CXXFLAGS: -m32 @@ -348,7 +348,7 @@ jobs: path: tmp/coverage.info external-commissioner: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 - name: Bootstrap @@ -385,7 +385,7 @@ jobs: path: tmp/coverage.info multiple-instance: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 env: COVERAGE: 1 MULTIPLE_INSTANCE: 1 @@ -418,7 +418,7 @@ jobs: path: tmp/coverage.info ncp-gcc-m32: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 env: CFLAGS: -m32 CXXFLAGS: -m32 @@ -457,7 +457,7 @@ jobs: path: tmp/coverage.info ncp-clang: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 env: COVERAGE: 1 NODE_TYPE: ncp-sim @@ -506,7 +506,7 @@ jobs: - multiple-instance - ncp-gcc-m32 - ncp-clang - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 - name: Bootstrap diff --git a/.github/workflows/size.yml b/.github/workflows/size.yml index 168923d9b..c498589cc 100644 --- a/.github/workflows/size.yml +++ b/.github/workflows/size.yml @@ -33,7 +33,7 @@ on: [push, pull_request] jobs: cancel-previous-runs: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - uses: rokroskar/workflow-run-cleanup-action@master env: @@ -41,7 +41,7 @@ jobs: if: "github.ref != 'refs/heads/master'" size-report: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 - name: Bootstrap diff --git a/.github/workflows/toranj.yml b/.github/workflows/toranj.yml index 6547ba00a..9db9ab5a0 100644 --- a/.github/workflows/toranj.yml +++ b/.github/workflows/toranj.yml @@ -33,7 +33,7 @@ on: [push, pull_request] jobs: cancel-previous-runs: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - uses: rokroskar/workflow-run-cleanup-action@master env: diff --git a/.github/workflows/version.yml b/.github/workflows/version.yml index 0c71178a4..0dcf05d69 100644 --- a/.github/workflows/version.yml +++ b/.github/workflows/version.yml @@ -32,7 +32,7 @@ on: [pull_request] jobs: cancel-previous-runs: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - uses: rokroskar/workflow-run-cleanup-action@master env: @@ -40,7 +40,7 @@ jobs: if: "github.ref != 'refs/heads/master'" api-version: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 - name: Check diff --git a/tests/unit/test_link_quality.cpp b/tests/unit/test_link_quality.cpp index 025395b66..a8f2290f1 100644 --- a/tests/unit/test_link_quality.cpp +++ b/tests/unit/test_link_quality.cpp @@ -333,7 +333,7 @@ void TestRssAveraging(void) rss = GetRandomRss(); IgnoreError(rssAverager.Add(rss)); sum += rss; - mean = static_cast(sum) / j; + mean = static_cast(sum) / static_cast(j); VerifyOrQuit(ABS(rssAverager.GetAverage() - mean) < 1, "Average does not match the arithmetic mean!"); VerifyRawRssValue(rssAverager); printf("AddRss(%4d) sum=%-5d, mean=%-8.2f RssAverager=", rss, sum, mean);