|
| 1 | +# Copyright (C) 2019 Intel Corporation. All rights reserved. |
| 2 | +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 3 | + |
| 4 | +name: compilation on zephyr |
| 5 | + |
| 6 | +on: |
| 7 | + # will be triggered on PR events |
| 8 | + pull_request: |
| 9 | + types: |
| 10 | + - opened |
| 11 | + - synchronize |
| 12 | + paths: |
| 13 | + - ".github/**" |
| 14 | + - "build-scripts/**" |
| 15 | + - "core/**" |
| 16 | + - "!core/deps/**" |
| 17 | + - "product-mini/platforms/common/**" |
| 18 | + - "product-mini/platforms/zephyr/**" |
| 19 | + - "samples/**" |
| 20 | + - "!samples/workload/**" |
| 21 | + - "tests/wamr-test-suites/**" |
| 22 | + - "wamr-compiler/**" |
| 23 | + # will be triggered on push events |
| 24 | + push: |
| 25 | + branches: |
| 26 | + - main |
| 27 | + - "dev/**" |
| 28 | + paths: |
| 29 | + - ".github/**" |
| 30 | + - "build-scripts/**" |
| 31 | + - "core/**" |
| 32 | + - "!core/deps/**" |
| 33 | + - "product-mini/platforms/common/**" |
| 34 | + - "product-mini/platforms/zephyr/**" |
| 35 | + - "samples/**" |
| 36 | + - "!samples/workload/**" |
| 37 | + - "tests/wamr-test-suites/**" |
| 38 | + - "wamr-compiler/**" |
| 39 | + # allow to be triggered manually |
| 40 | + workflow_dispatch: |
| 41 | + |
| 42 | +# Cancel any in-flight jobs for the same PR/branch so there's only one active |
| 43 | +# at a time |
| 44 | +concurrency: |
| 45 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 46 | + cancel-in-progress: true |
| 47 | + |
| 48 | +env: |
| 49 | + # FOR SETUP |
| 50 | + ZEPHYR_SDK_VERSION: "0.16.9" |
| 51 | + ZEPHYR_VERSION: "v3.7.0" |
| 52 | + # FOR BUILD |
| 53 | + |
| 54 | +permissions: |
| 55 | + contents: read |
| 56 | + |
| 57 | +jobs: |
| 58 | + smoke_test: |
| 59 | + runs-on: ubuntu-latest |
| 60 | + steps: |
| 61 | + - name: Checkout code |
| 62 | + uses: actions/checkout@v3 |
| 63 | + |
| 64 | + - name: Setup Zephyr |
| 65 | + uses: ./.github/actions/setup-zephyr |
| 66 | + with: |
| 67 | + zephyr-version: ${{ env.ZEPHYR_VERSION }} |
| 68 | + zephyr-sdk-version: ${{ env.ZEPHYR_SDK_VERSION }} |
| 69 | + |
| 70 | + - name: Build a sample application(simple) |
| 71 | + run: | |
| 72 | + west build . -b qemu_arc/qemu_arc_em -p always -- -DWAMR_BUILD_TARGET=ARC |
| 73 | + # TODO: enable the following line when we learned how to exit automatically |
| 74 | + # west build -t run |
| 75 | + working-directory: product-mini/platforms/zephyr/simple |
| 76 | + |
| 77 | + - name: Build a sample application(user-mode) |
| 78 | + run: | |
| 79 | + west build . -b qemu_arc/qemu_arc_em -p always -- -DWAMR_BUILD_TARGET=ARC |
| 80 | + # TODO: enable the following line when we learned how to exit automatically |
| 81 | + # west build -t run |
| 82 | + working-directory: product-mini/platforms/zephyr/user-mode |
0 commit comments