mac.yml 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. # Copyright (C) 2019 Intel Corporation. All rights reserved.
  2. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  3. name: Mac
  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: [macos-latest]
  17. steps:
  18. - uses: actions/checkout@v2
  19. - name: Build iwasm [default]
  20. run: |
  21. cd product-mini/platforms/darwin
  22. mkdir build && cd build
  23. cmake ..
  24. make -j $(nproc)
  25. cd .. && rm -rf build
  26. - name: Build iwasm [classic interp]
  27. run: |
  28. cd product-mini/platforms/darwin
  29. mkdir build && cd build
  30. cmake .. -DWAMR_BUILD_FAST_INTERP=0
  31. make -j $(nproc)
  32. cd .. && rm -rf build
  33. - name: Build iwasm [multi module]
  34. run: |
  35. cd product-mini/platforms/darwin
  36. mkdir build && cd build
  37. cmake .. -DWAMR_BUILD_MULTI_MODULE=1
  38. make -j $(nproc)
  39. cd .. && rm -rf build
  40. - name: Build iwasm [lib-pthread]
  41. run: |
  42. cd product-mini/platforms/darwin
  43. mkdir build && cd build
  44. cmake .. -DWAMR_BUILD_LIB_PTHREAD=1
  45. make -j $(nproc)
  46. cd .. && rm -rf build
  47. - name: Build iwasm [aot only]
  48. run: |
  49. cd product-mini/platforms/darwin
  50. mkdir build && cd build
  51. cmake .. -DWAMR_BUILD_AOT=1 -DWAMR_BUILD_INTERP=0
  52. make -j $(nproc)
  53. cd .. && rm -rf build
  54. - name: Build iwasm [interp only]
  55. run: |
  56. cd product-mini/platforms/darwin
  57. mkdir build && cd build
  58. cmake .. -DWAMR_BUILD_AOT=0
  59. make -j $(nproc)
  60. cd .. && rm -rf build
  61. - name: Build iwasm [memory profiling]
  62. run: |
  63. cd product-mini/platforms/darwin
  64. mkdir build && cd build
  65. cmake .. -DWAMR_BUILD_MEMORY_PROFILING=1
  66. make -j $(nproc)
  67. cd .. && rm -rf build
  68. - name: Build iwasm [tail call]
  69. run: |
  70. cd product-mini/platforms/darwin
  71. mkdir build && cd build
  72. cmake .. -DWAMR_BUILD_TAIL_CALL=1
  73. make -j $(nproc)
  74. cd .. && rm -rf build
  75. - name: Build iwasm [custom name section]
  76. run: |
  77. cd product-mini/platforms/darwin
  78. mkdir build && cd build
  79. cmake .. -DWAMR_BUILD_CUSTOM_NAME_SECTION=1
  80. make -j $(nproc)
  81. cd .. && rm -rf build
  82. - name: Build iwasm [disable hardware boundary check]
  83. run: |
  84. cd product-mini/platforms/darwin
  85. mkdir build && cd build
  86. cmake .. -DWAMR_DISABLE_HW_BOUND_CHECK=1
  87. make -j $(nproc)
  88. cd .. && rm -rf build
  89. - name: Build iwasm [ref types]
  90. run: |
  91. cd product-mini/platforms/darwin
  92. mkdir build && cd build
  93. cmake .. -DWAMR_BUILD_REF_TYPES=1
  94. make -j $(nproc)
  95. cd .. && rm -rf build
  96. - name: Build iwasm [128-bit SIMD]
  97. run: |
  98. cd product-mini/platforms/darwin
  99. mkdir build && cd build
  100. cmake .. -DWAMR_BUILD_SIMD=1
  101. make -j $(nproc)
  102. cd .. && rm -rf build
  103. - name: download and install wabt
  104. run: |
  105. cd /opt
  106. sudo wget https://github.com/WebAssembly/wabt/releases/download/1.0.19/wabt-1.0.19-macos.tar.gz
  107. sudo tar -xzf wabt-1.0.19-macos.tar.gz
  108. sudo mv wabt-1.0.19 wabt
  109. - name: Build Sample [wasm-c-api]
  110. run: |
  111. cd samples/wasm-c-api
  112. mkdir build && cd build
  113. cmake ..
  114. make
  115. ./callback
  116. ./callback_chain
  117. ./global
  118. ./hello
  119. ./hostref
  120. ./memory
  121. ./reflect
  122. ./table
  123. ./trap