linux.yml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. # Copyright (C) 2019 Intel Corporation. All rights reserved.
  2. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  3. name: Linux
  4. # Controls when the action will run. Triggers the workflow on push or pull request
  5. # events but only for the main branch
  6. on:
  7. push:
  8. branches: [ main ]
  9. pull_request:
  10. branches: [ main ]
  11. jobs:
  12. build:
  13. runs-on: ${{ matrix.os }}
  14. strategy:
  15. matrix:
  16. os: [ubuntu-18.04, ubuntu-20.04]
  17. steps:
  18. - uses: actions/checkout@v2
  19. - name: Build iwasm [default]
  20. run: |
  21. cd product-mini/platforms/linux
  22. mkdir build && cd build
  23. cmake ..
  24. make
  25. cd .. && rm -rf build
  26. - name: Build iwasm [Classic interp]
  27. run: |
  28. cd product-mini/platforms/linux
  29. mkdir build && cd build
  30. cmake .. -DWAMR_BUILD_FAST_INTERP=0
  31. make
  32. cd .. && rm -rf build
  33. - name: Build iwasm [Multi module]
  34. run: |
  35. cd product-mini/platforms/linux
  36. mkdir build && cd build
  37. cmake .. -DWAMR_BUILD_MULTI_MODULE=1
  38. make
  39. cd .. && rm -rf build
  40. - name: Build iwasm [lib-pthread]
  41. run: |
  42. cd product-mini/platforms/linux
  43. mkdir build && cd build
  44. cmake .. -DWAMR_BUILD_LIB_PTHREAD=1
  45. make
  46. cd .. && rm -rf build
  47. - name: Build iwasm [aot only]
  48. run: |
  49. cd product-mini/platforms/linux
  50. mkdir build && cd build
  51. cmake .. -DWAMR_BUILD_AOT=1 -DWAMR_BUILD_INTERP=0
  52. make
  53. cd .. && rm -rf build
  54. - name: Build iwasm [interp only]
  55. run: |
  56. cd product-mini/platforms/linux
  57. mkdir build && cd build
  58. cmake .. -DWAMR_BUILD_AOT=0
  59. make
  60. cd .. && rm -rf build
  61. - name: Build iwasm [memory profiling]
  62. run: |
  63. cd product-mini/platforms/linux
  64. mkdir build && cd build
  65. cmake .. -DWAMR_BUILD_MEMORY_PROFILING=1
  66. make
  67. cd .. && rm -rf build
  68. - name: download wasi-sdk
  69. run: |
  70. cd /opt
  71. wget https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-8/wasi-sdk-8.0-linux.tar.gz
  72. tar -xzf wasi-sdk-8.0-linux.tar.gz
  73. mv wasi-sdk-8.0 wasi-sdk
  74. - name: Build Sample [wasm-c-api]
  75. run: |
  76. cd samples/wasm-c-api
  77. mkdir build && cd build
  78. cmake ..
  79. make
  80. ./hello
  81. ./global
  82. ./callback
  83. - name: Build Sample [basic]
  84. run: |
  85. cd samples/basic
  86. ./build.sh
  87. ./run.sh
  88. - name: Build Sample [multi-thread]
  89. run: |
  90. cd samples/multi-thread
  91. mkdir build && cd build
  92. cmake ..
  93. make
  94. ./iwasm wasm-apps/test.wasm
  95. - name: Build Sample [multi-module]
  96. run: |
  97. cd samples/multi-module
  98. mkdir build && cd build
  99. cmake ..
  100. make
  101. ./multi_module
  102. - name: Build Sample [spawn-thread]
  103. run: |
  104. cd samples/spawn-thread
  105. mkdir build && cd build
  106. cmake ..
  107. make
  108. ./spawn_thread