mac.yml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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
  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
  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
  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
  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
  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
  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
  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
  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
  81. cd .. && rm -rf build
  82. - name: download and install wabt
  83. run: |
  84. cd /opt
  85. sudo wget https://github.com/WebAssembly/wabt/releases/download/1.0.19/wabt-1.0.19-macos.tar.gz
  86. sudo tar -xzf wabt-1.0.19-macos.tar.gz
  87. sudo mv wabt-1.0.19 wabt
  88. - name: Build Sample [wasm-c-api]
  89. run: |
  90. cd samples/wasm-c-api
  91. mkdir build && cd build
  92. cmake ..
  93. make
  94. ./hello
  95. ./global
  96. ./callback