linux.yml 2.8 KB

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