diff --git a/.github/workflows/posix.yml b/.github/workflows/posix.yml index 13745f080..0ca8e513f 100644 --- a/.github/workflows/posix.yml +++ b/.github/workflows/posix.yml @@ -40,7 +40,7 @@ jobs: GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" if: "github.ref != 'refs/heads/master'" - macOS: + expects-macos: runs-on: macos-10.15 env: CFLAGS: -DCLI_COAP_SECURE_USE_COAP_DEFAULT_HANDLER=1 -DOPENTHREAD_CONFIG_MLE_MAX_CHILDREN=15 -DOPENTHREAD_CONFIG_MAC_SCAN_DURATION=500 @@ -63,6 +63,78 @@ jobs: host ipv6.google.com ::1 OT_OPTIONS=-DOT_READLINE=OFF OT_NATIVE_IP=1 OT_NODE_TYPE=rcp-cli ./script/test clean build expect + expects-linux: + runs-on: ubuntu-18.04 + env: + CFLAGS: -DCLI_COAP_SECURE_USE_COAP_DEFAULT_HANDLER=1 -DOPENTHREAD_CONFIG_MLE_MAX_CHILDREN=15 + CXXFLAGS: -DCLI_COAP_SECURE_USE_COAP_DEFAULT_HANDLER=1 -DOPENTHREAD_CONFIG_MLE_MAX_CHILDREN=15 + steps: + - uses: actions/checkout@v2 + - name: Bootstrap + run: | + sudo apt-get --no-install-recommends install -y expect ninja-build lcov socat + - name: Run RCP Mode + run: | + ulimit -c unlimited + ./script/test prepare_coredump_upload + OT_OPTIONS='-DOT_READLINE=OFF -DOT_FULL_LOGS=ON -DOT_LOG_OUTPUT=PLATFORM_DEFINED' VIRTUAL_TIME=0 OT_NODE_TYPE=rcp ./script/test build expect + - name: Check Crash + if: ${{ failure() }} + run: | + CRASHED=$(./script/test check_crash | tail -1) + [[ $CRASHED -eq "1" ]] && echo "Crashed!" || echo "Not crashed." + echo "CRASHED_RCP=$CRASHED" >> $GITHUB_ENV + - uses: actions/upload-artifact@v2 + if: ${{ failure() && env.CRASHED_RCP == '1' }} + with: + name: core-expect-rcp + path: | + ./ot-core-dump/* + - name: Generate Coverage + run: | + ./script/test generate_coverage gcc + - uses: actions/upload-artifact@v2 + with: + name: cov-expects-linux-1 + path: tmp/coverage.info + - name: Run TUN Mode + run: | + sudo rm /etc/apt/sources.list.d/* && sudo apt-get update + sudo apt-get install --no-install-recommends -y dnsmasq bind9-host ntp + sudo systemctl start dnsmasq ntp + host ipv6.google.com 127.0.0.1 + echo 'listen-address=::1' | sudo tee /etc/dnsmasq.conf + echo 0 | sudo tee /proc/sys/net/ipv6/conf/all/disable_ipv6 + sudo systemctl restart dnsmasq + host ipv6.google.com ::1 + ulimit -c unlimited + ./script/test prepare_coredump_upload + OT_OPTIONS='-DOT_READLINE=OFF -DOT_FULL_LOGS=ON -DOT_LOG_OUTPUT=PLATFORM_DEFINED' OT_NATIVE_IP=1 VIRTUAL_TIME=0 OT_NODE_TYPE=rcp ./script/test clean build expect + - name: Check Crash + if: ${{ failure() }} + run: | + CRASHED=$(./script/test check_crash | tail -1) + [[ $CRASHED -eq "1" ]] && echo "Crashed!" || echo "Not crashed." + echo "CRASHED_TUN=$CRASHED" >> $GITHUB_ENV + - uses: actions/upload-artifact@v2 + if: ${{ failure() && env.CRASHED_TUN == '1' }} + with: + name: core-expect-posix + path: | + ./ot-core-dump/* + - uses: actions/upload-artifact@v2 + if: ${{ failure() }} + with: + name: syslog-expect-posix + path: /var/log/syslog + - name: Generate Coverage + run: | + ./script/test generate_coverage gcc + - uses: actions/upload-artifact@v2 + with: + name: cov-expects-linux-2 + path: tmp/coverage.info + posix-cli: runs-on: ubuntu-20.04 env: @@ -243,6 +315,7 @@ jobs: upload-coverage: needs: + - expects-linux - posix-cli - posix-ncp - posix-ncp-rcp-migrate diff --git a/.github/workflows/simulation.yml b/.github/workflows/simulation.yml index ce943c178..bc7799ccd 100644 --- a/.github/workflows/simulation.yml +++ b/.github/workflows/simulation.yml @@ -237,7 +237,7 @@ jobs: ./script/test generate_coverage gcc - uses: actions/upload-artifact@v2 with: - name: cov-cli-mtd + name: cov-cli-mtd-${{ matrix.message_use_heap }} path: tmp/coverage.info cli-time-sync: @@ -286,8 +286,6 @@ jobs: CXXFLAGS: -DCLI_COAP_SECURE_USE_COAP_DEFAULT_HANDLER=1 -DOPENTHREAD_CONFIG_MLE_MAX_CHILDREN=15 steps: - uses: actions/checkout@v2 - with: - submodules: true - name: Bootstrap run: | sudo apt-get --no-install-recommends install -y expect ninja-build lcov socat @@ -313,68 +311,7 @@ jobs: ./script/test generate_coverage gcc - uses: actions/upload-artifact@v2 with: - name: cov-expects-1 - path: tmp/coverage.info - - name: Run RCP Mode - run: | - ulimit -c unlimited - ./script/test prepare_coredump_upload - OT_OPTIONS='-DOT_READLINE=OFF -DOT_FULL_LOGS=ON -DOT_LOG_OUTPUT=PLATFORM_DEFINED' VIRTUAL_TIME=0 OT_NODE_TYPE=rcp ./script/test clean build expect - - name: Check Crash - if: ${{ failure() }} - run: | - CRASHED=$(./script/test check_crash | tail -1) - [[ $CRASHED -eq "1" ]] && echo "Crashed!" || echo "Not crashed." - echo "CRASHED_RCP=$CRASHED" >> $GITHUB_ENV - - uses: actions/upload-artifact@v2 - if: ${{ failure() && env.CRASHED_RCP == '1' }} - with: - name: core-expect-rcp - path: | - ./ot-core-dump/* - - name: Generate Coverage - run: | - ./script/test generate_coverage gcc - - uses: actions/upload-artifact@v2 - with: - name: cov-expects-2 - path: tmp/coverage.info - - name: Run TUN Mode - run: | - sudo rm /etc/apt/sources.list.d/* && sudo apt-get update - sudo apt-get install --no-install-recommends -y dnsmasq bind9-host ntp - sudo systemctl start dnsmasq ntp - host ipv6.google.com 127.0.0.1 - echo 'listen-address=::1' | sudo tee /etc/dnsmasq.conf - echo 0 | sudo tee /proc/sys/net/ipv6/conf/all/disable_ipv6 - sudo systemctl restart dnsmasq - host ipv6.google.com ::1 - ulimit -c unlimited - ./script/test prepare_coredump_upload - OT_OPTIONS='-DOT_READLINE=OFF -DOT_FULL_LOGS=ON -DOT_LOG_OUTPUT=PLATFORM_DEFINED' OT_NATIVE_IP=1 VIRTUAL_TIME=0 OT_NODE_TYPE=rcp ./script/test clean build expect - - name: Check Crash - if: ${{ failure() }} - run: | - CRASHED=$(./script/test check_crash | tail -1) - [[ $CRASHED -eq "1" ]] && echo "Crashed!" || echo "Not crashed." - echo "CRASHED_TUN=$CRASHED" >> $GITHUB_ENV - - uses: actions/upload-artifact@v2 - if: ${{ failure() && env.CRASHED_TUN == '1' }} - with: - name: core-expect-posix - path: | - ./ot-core-dump/* - - uses: actions/upload-artifact@v2 - if: ${{ failure() }} - with: - name: syslog-expect-posix - path: /var/log/syslog - - name: Generate Coverage - run: | - ./script/test generate_coverage gcc - - uses: actions/upload-artifact@v2 - with: - name: cov-expects-3 + name: cov-expects path: tmp/coverage.info external-commissioner: