name: AutoTestCI # Controls when the action will run. Triggers the workflow on push or pull request on: [push, pull_request] jobs: test: runs-on: ubuntu-latest name: ${{ matrix.legs.UTEST }} strategy: fail-fast: false matrix: legs: - {UTEST: "kernel/mem", RTT_BSP: "bsp/qemu-vexpress-a9", QEMU_ARCH: "vexpress-a9", CONFIG_FILE: "examples/utest/configs/kernel/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://developer.arm.com/-/media/Files/downloads/gnu-rm/10-2020q4/gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2 sudo tar xjf gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2 -C /opt - name: Build bsp run: | export RTT_EXEC_PATH=/opt/gcc-arm-none-eabi-10-2020-q4-major/bin /opt/gcc-arm-none-eabi-10-2020-q4-major/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