compilation_on_nuttx.yml 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. # Copyright (C) 2019 Intel Corporation. All rights reserved.
  2. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  3. name: compilation on nuttx
  4. on:
  5. # will be triggered on PR events
  6. pull_request:
  7. types:
  8. - opened
  9. - synchronize
  10. paths:
  11. - ".github/workflows/compilation_on_nuttx.yml"
  12. - "build-scripts/**"
  13. - "core/**"
  14. - "!core/deps/**"
  15. - "product-mini/**"
  16. - "samples/**"
  17. - "!samples/workload/**"
  18. - "tests/wamr-test-suites/**"
  19. - "wamr-compiler/**"
  20. - "wamr-sdk/**"
  21. # will be triggered on push events
  22. push:
  23. branches:
  24. - main
  25. - "dev/**"
  26. paths:
  27. - ".github/workflows/compilation_on_nuttx.yml"
  28. - "build-scripts/**"
  29. - "core/**"
  30. - "!core/deps/**"
  31. - "product-mini/**"
  32. - "samples/**"
  33. - "!samples/workload/**"
  34. - "tests/wamr-test-suites/**"
  35. - "wamr-compiler/**"
  36. - "wamr-sdk/**"
  37. # allow to be triggered manually
  38. workflow_dispatch:
  39. # Cancel any in-flight jobs for the same PR/branch so there's only one active
  40. # at a time
  41. concurrency:
  42. group: ${{ github.workflow }}-${{ github.ref }}
  43. cancel-in-progress: true
  44. env:
  45. WASI_SDK_PATH: "/opt/wasi-sdk"
  46. jobs:
  47. build_iwasm_on_nuttx:
  48. runs-on: ubuntu-latest
  49. container:
  50. image: ghcr.io/apache/nuttx/apache-nuttx-ci-linux@sha256:d9261eacf6c6ebe656c571757751c803e8f04c3ae9b820320a5ea5dd57b7205a
  51. strategy:
  52. matrix:
  53. nuttx_board_config: [
  54. # x64
  55. "boards/sim/sim/sim/configs/nsh",
  56. # cortex-m0
  57. "boards/arm/rp2040/raspberrypi-pico/configs/nsh",
  58. # cortex-m7
  59. "boards/arm/stm32h7/nucleo-h743zi/configs/nsh",
  60. # riscv32imc
  61. "boards/risc-v/espressif/esp32c3-generic/configs/nsh",
  62. # riscv32gc
  63. "boards/risc-v/qemu-rv/rv-virt/configs/nsh",
  64. # riscv64gc
  65. "boards/risc-v/qemu-rv/rv-virt/configs/nsh64",
  66. # arm64
  67. "boards/arm64/qemu/qemu-armv8a/configs/nsh",
  68. ]
  69. wamr_config_option: [
  70. "CONFIG_INTERPRETERS_WAMR=y\\nCONFIG_INTERPRETERS_WAMR_AOT=y\\nCONFIG_INTERPRETERS_WAMR_FAST=y\\n",
  71. "CONFIG_INTERPRETERS_WAMR=y\\nCONFIG_INTERPRETERS_WAMR_AOT=y\\nCONFIG_INTERPRETERS_WAMR_FAST=y\\nCONFIG_INTERPRETERS_WAMR_LIBC_WASI=y\\n",
  72. "CONFIG_INTERPRETERS_WAMR=y\\nCONFIG_INTERPRETERS_WAMR_AOT=y\\nCONFIG_INTERPRETERS_WAMR_FAST=y\\nCONFIG_INTERPRETERS_WAMR_LIBC_BUILTIN=y\\n",
  73. "CONFIG_INTERPRETERS_WAMR=y\\nCONFIG_INTERPRETERS_WAMR_AOT=y\\nCONFIG_INTERPRETERS_WAMR_CLASSIC=y\\n",
  74. "CONFIG_INTERPRETERS_WAMR=y\\nCONFIG_INTERPRETERS_WAMR_AOT=y\\nCONFIG_INTERPRETERS_WAMR_CLASSIC=y\\nCONFIG_INTERPRETERS_WAMR_LIBC_WASI=y\\n",
  75. "CONFIG_INTERPRETERS_WAMR=y\\nCONFIG_INTERPRETERS_WAMR_AOT=y\\nCONFIG_INTERPRETERS_WAMR_CLASSIC=y\\nCONFIG_INTERPRETERS_WAMR_LIBC_BUILTIN=y\\n",
  76. "CONFIG_INTERPRETERS_WAMR=y\\nCONFIG_INTERPRETERS_WAMR_AOT=y\\nCONFIG_INTERPRETERS_WAMR_LIBC_BUILTIN=y\\n",
  77. "CONFIG_INTERPRETERS_WAMR=y\\nCONFIG_INTERPRETERS_WAMR_AOT=y\\n",
  78. "CONFIG_INTERPRETERS_WAMR=y\\nCONFIG_INTERPRETERS_WAMR_FAST=y\\n",
  79. "CONFIG_INTERPRETERS_WAMR=y\\nCONFIG_INTERPRETERS_WAMR_CLASSIC=y\\n",
  80. ]
  81. steps:
  82. - name: Checkout NuttX
  83. uses: actions/checkout@v4
  84. with:
  85. repository: apache/incubator-nuttx
  86. ref: releases/12.4
  87. path: nuttx
  88. - name: Checkout NuttX Apps
  89. uses: actions/checkout@v4
  90. with:
  91. repository: apache/incubator-nuttx-apps
  92. ref: releases/12.4
  93. path: apps
  94. - name: Checkout WAMR
  95. uses: actions/checkout@v4
  96. with:
  97. repository: ${{ github.repository }}
  98. path: apps/interpreters/wamr/wamr
  99. - name: Enable WAMR for NuttX
  100. run: |
  101. find nuttx/boards -name defconfig | xargs sed -i '$a\CONFIG_EOL_IS_LF=y\n${{ matrix.wamr_config_option }}'
  102. find nuttx/boards/sim -name defconfig | xargs sed -i '$a\CONFIG_LIBM=y\n'
  103. - name: Build
  104. run: |
  105. cd nuttx
  106. tools/configure.sh ${{ matrix.nuttx_board_config }}
  107. make -j$(nproc) EXTRAFLAGS=-Werror