From c60349061d9b68d5050380c045f2a77b927e9dfa Mon Sep 17 00:00:00 2001 From: Zelin Cai Date: Mon, 29 Jul 2024 11:49:30 +0800 Subject: [PATCH] ci: build samples using twister. Signed-off-by: Zelin Cai --- .github/workflows/twister-samples.yml | 41 +++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/twister-samples.yml diff --git a/.github/workflows/twister-samples.yml b/.github/workflows/twister-samples.yml new file mode 100644 index 0000000..49f586c --- /dev/null +++ b/.github/workflows/twister-samples.yml @@ -0,0 +1,41 @@ +name: Twister Zephyr Samples + +on: + push: + pull_request: + schedule: + # Run at 03:00 UTC on every Sunday + - cron: "0 3 * * 0" + +jobs: + build: + strategy: + fail-fast: false + matrix: + os: [ubuntu-22.04, macos-13, macos-14, windows-2022] + runs-on: ${{ matrix.os }} + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + path: imxrt1011-nanokit + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: 3.11 + + - name: Setup Zephyr project + uses: zephyrproject-rtos/action-zephyr-setup@v1 + with: + app-path: imxrt1011-nanokit + toolchains: arm-zephyr-eabi + + - name: Twister Zephyr Samples + working-directory: imxrt1011-nanokit + shell: bash + run: | + if [ "${{ runner.os }}" = "Windows" ]; then + EXTRA_TWISTER_FLAGS="--short-build-path -O/tmp/twister-out" + fi + west twister -T samples/zephyr -v --inline-logs --integration $EXTRA_TWISTER_FLAGS \ No newline at end of file