From 3906f3b948100bfafe03daecf9bc7b1d1ce9fb0b Mon Sep 17 00:00:00 2001 From: guozhanxin Date: Mon, 10 May 2021 20:34:33 +0800 Subject: [add] auto test ci. --- .github/workflows/action_utest.yml | 40 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/action_utest.yml (limited to '.github/workflows') diff --git a/.github/workflows/action_utest.yml b/.github/workflows/action_utest.yml new file mode 100644 index 0000000000..43abe6539c --- /dev/null +++ b/.github/workflows/action_utest.yml @@ -0,0 +1,40 @@ +name: AutoTestCI +on: push +jobs: + test: + runs-on: ubuntu-latest + name: ${{ matrix.legs.UTEST }} + strategy: + fail-fast: false + matrix: + legs: + - {UTEST: "kernel/ipc", RTT_BSP: "bsp/qemu-vexpress-a9", QEMU_ARCH: "vexpress-a9", CONFIG_FILE: "examples/utest/configs/utest_self/config.h"} + - {UTEST: "components/utest", RTT_BSP: "bsp/qemu-vexpress-a9", QEMU_ARCH: "vexpress-a9", CONFIG_FILE: "examples/utest/configs/utest_self/config.h"} + + env: + TEST_BSP_ROOT: ${{ matrix.legs.RTT_BSP }} + TEST_CONFIG_FILE: ${{ matrix.legs.CONFIG_FILE }} + steps: + - uses: actions/checkout@v1 + - name: Prepare env + run: | + sudo apt-get update > /dev/null + sudo apt-get -yqq install scons qemu-system-arm git + wget -q https://github.com/RT-Thread/toolchains-ci/releases/download/arm-2017q2-v6/gcc-arm-none-eabi-6-2017-q2-update-linux.tar.bz2 + sudo tar xjf gcc-arm-none-eabi-6-2017-q2-update-linux.tar.bz2 -C /opt + - name: Build bsp + run: | + export RTT_EXEC_PATH=/opt/gcc-arm-none-eabi-6-2017-q2-update/bin + /opt/gcc-arm-none-eabi-6-2017-q2-update/bin/arm-none-eabi-gcc --version + cp $TEST_CONFIG_FILE $TEST_BSP_ROOT/rtconfig.h + scons -j$(nproc) -C $TEST_BSP_ROOT + - name: Start test + run: | + git clone https://github.com/armink/UtestRunner.git + pushd $TEST_BSP_ROOT + dd if=/dev/zero of=sd.bin bs=1024 count=65536 + popd + pushd UtestRunner + python3 qemu_runner.py --elf ../$TEST_BSP_ROOT/rtthread.elf --sd ../$TEST_BSP_ROOT/sd.bin + cat rtt_console.log + popd -- cgit v1.3.1 From 0e4228dbecf762c695af53841e13fda9c94ad855 Mon Sep 17 00:00:00 2001 From: guozhanxin Date: Mon, 10 May 2021 20:38:58 +0800 Subject: [添加] ci 触发方式 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/action_utest.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/action_utest.yml b/.github/workflows/action_utest.yml index 43abe6539c..b8fea056e1 100644 --- a/.github/workflows/action_utest.yml +++ b/.github/workflows/action_utest.yml @@ -1,5 +1,8 @@ name: AutoTestCI -on: push + +# Controls when the action will run. Triggers the workflow on push or pull request +on: [push, pull_request] + jobs: test: runs-on: ubuntu-latest -- cgit v1.3.1