compilation_on_android_ubuntu_macos.yml 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516
  1. # Copyright (C) 2019 Intel Corporation. All rights reserved.
  2. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  3. name: compilation on android, ubuntu-18.04, ubuntu-20.04, macos-latest
  4. on:
  5. # will be triggered on PR events
  6. pull_request:
  7. paths-ignore:
  8. - "assembly-script/**"
  9. - "ci/**"
  10. - "doc/**"
  11. - "test-tools/**"
  12. - ".github/workflows/compilation_on_android_ubuntu_macos.yml"
  13. # will be triggered on push events
  14. push:
  15. paths-ignore:
  16. - "assembly-script/**"
  17. - "ci/**"
  18. - "doc/**"
  19. - "test-tools/**"
  20. - ".github/workflows/compilation_on_android_ubuntu_macos.yml"
  21. # allow to be triggered manually
  22. workflow_dispatch:
  23. # Cancel any in-flight jobs for the same PR/branch so there's only one active
  24. # at a time
  25. concurrency:
  26. group: ${{ github.workflow }}-${{ github.ref }}
  27. cancel-in-progress: true
  28. env:
  29. AOT_BUILD_OPTIONS: "-DWAMR_BUILD_AOT=1 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=0 -DWAMR_BUILD_JIT=0 -DWAMR_BUILD_LAZY_JIT=0"
  30. CLASSIC_INTERP_BUILD_OPTIONS: "-DWAMR_BUILD_AOT=0 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=1 -DWAMR_BUILD_JIT=0 -DWAMR_BUILD_LAZY_JIT=0"
  31. FAST_INTERP_BUILD_OPTIONS: "-DWAMR_BUILD_AOT=0 -DWAMR_BUILD_FAST_INTERP=1 -DWAMR_BUILD_INTERP=1 -DWAMR_BUILD_JIT=0 -DWAMR_BUILD_LAZY_JIT=0"
  32. LAZY_JIT_BUILD_OPTIONS: "-DWAMR_BUILD_AOT=1 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=0 -DWAMR_BUILD_JIT=1 -DWAMR_BUILD_LAZY_JIT=1"
  33. MC_JIT_BUILD_OPTIONS: "-DWAMR_BUILD_AOT=1 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=0 -DWAMR_BUILD_JIT=1 -DWAMR_BUILD_LAZY_JIT=0"
  34. LLVM_CACHE_SUFFIX: "build-llvm_libraries_ex"
  35. jobs:
  36. # Cancel any in-flight jobs for the same PR/branch so there's only one active
  37. # at a time
  38. cancel_previous:
  39. runs-on: ${{ matrix.os }}
  40. strategy:
  41. matrix:
  42. os: [ubuntu-18.04, ubuntu-20.04, macos-latest]
  43. steps:
  44. - name: Cancel Workflow Action
  45. uses: styfle/cancel-workflow-action@0.6.0
  46. with:
  47. access_token: ${{ github.token }}
  48. # set different traffic lights based on the current repo and the running OS.
  49. # according to light colors, the workflow will run different jobs
  50. check_repo:
  51. needs: cancel_previous
  52. runs-on: ${{ matrix.os }}
  53. strategy:
  54. matrix:
  55. os: [ubuntu-18.04, ubuntu-20.04, macos-latest]
  56. outputs:
  57. traffic_light_on_ubuntu_1804: ${{ steps.do_check_on_ubuntu_1804.outputs.light }}
  58. traffic_light_on_ubuntu_2004: ${{ steps.do_check_on_ubuntu_2004.outputs.light }}
  59. traffic_light_on_macos_latest: ${{ steps.do_check_on_macos_latest.outputs.light }}
  60. steps:
  61. - name: do_check_on_ubuntu_1804
  62. id: do_check_on_ubuntu_1804
  63. if: ${{ matrix.os == 'ubuntu-18.04' }}
  64. run: |
  65. if [[ ${{ github.repository }} == */wasm-micro-runtime ]]; then
  66. echo "::set-output name=light::green"
  67. else
  68. echo "::set-output name=light::red"
  69. fi
  70. - name: do_check_on_ubuntu_2004
  71. id: do_check_on_ubuntu_2004
  72. if: ${{ matrix.os == 'ubuntu-20.04' }}
  73. run: |
  74. if [[ ${{ github.repository }} == */wasm-micro-runtime ]]; then
  75. echo "::set-output name=light::green"
  76. else
  77. echo "::set-output name=light::green"
  78. fi
  79. - name: do_check_on_macos_latest
  80. id: do_check_on_macos_latest
  81. if: ${{ matrix.os == 'macos-latest' }}
  82. run: |
  83. if [[ ${{ github.repository }} == */wasm-micro-runtime ]]; then
  84. echo "::set-output name=light::green"
  85. else
  86. echo "::set-output name=light::red"
  87. fi
  88. build_llvm_libraries:
  89. needs: check_repo
  90. runs-on: ${{ matrix.os }}
  91. strategy:
  92. matrix:
  93. os: [ubuntu-18.04, ubuntu-20.04, macos-latest]
  94. include:
  95. - os: ubuntu-18.04
  96. light: ${{ needs.check_repo.outputs.traffic_light_on_ubuntu_1804 }}
  97. - os: ubuntu-20.04
  98. light: ${{ needs.check_repo.outputs.traffic_light_on_ubuntu_2004 }}
  99. - os: macos-latest
  100. light: ${{ needs.check_repo.outputs.traffic_light_on_macos_latest }}
  101. steps:
  102. - name: light status
  103. run: echo "matrix.os=${{ matrix.os }}, light=${{ matrix.light }}"
  104. - name: checkout
  105. if: ${{ matrix.light == 'green' }}
  106. uses: actions/checkout@v2
  107. - name: Cache LLVM libraries
  108. id: cache_llvm
  109. if: ${{ matrix.light == 'green' }}
  110. uses: actions/cache@v2
  111. with:
  112. path: |
  113. ./core/deps/llvm/build/bin
  114. ./core/deps/llvm/build/include
  115. ./core/deps/llvm/build/lib
  116. ./core/deps/llvm/build/libexec
  117. ./core/deps/llvm/build/share
  118. key: ${{ matrix.os }}-${{ env.LLVM_CACHE_SUFFIX }}
  119. - name: Build llvm and clang from source on ubuntu
  120. id: build_llvm_ubuntu
  121. if: ${{ matrix.light == 'green' && steps.cache_llvm.outputs.cache-hit != 'true' && matrix.os != 'macos-latest' }}
  122. run: /usr/bin/env python3 ./build_llvm.py --arch X86 WebAssembly --project clang lldb
  123. working-directory: build-scripts
  124. - name: Build llvm and clang from source on macos
  125. id: build_llvm_macos
  126. if: ${{ matrix.light == 'green' && steps.cache_llvm.outputs.cache-hit != 'true' && matrix.os == 'macos-latest' }}
  127. run: /usr/bin/env python3 ./build_llvm.py --arch X86 WebAssembly
  128. working-directory: build-scripts
  129. build_wamrc:
  130. needs: [build_llvm_libraries, check_repo]
  131. runs-on: ${{ matrix.os }}
  132. strategy:
  133. matrix:
  134. os: [ubuntu-18.04, ubuntu-20.04, macos-latest]
  135. include:
  136. - os: ubuntu-18.04
  137. light: ${{ needs.check_repo.outputs.traffic_light_on_ubuntu_1804 }}
  138. - os: ubuntu-20.04
  139. light: ${{ needs.check_repo.outputs.traffic_light_on_ubuntu_2004 }}
  140. - os: macos-latest
  141. light: ${{ needs.check_repo.outputs.traffic_light_on_macos_latest }}
  142. steps:
  143. - name: light status
  144. run: echo "matrix.os=${{ matrix.os }}, light=${{ matrix.light }}"
  145. - name: checkout
  146. if: ${{ matrix.light == 'green' }}
  147. uses: actions/checkout@v2
  148. - name: Get LLVM libraries
  149. id: cache_llvm
  150. if: ${{ matrix.light == 'green' }}
  151. uses: actions/cache@v2
  152. with:
  153. path: |
  154. ./core/deps/llvm/build/bin
  155. ./core/deps/llvm/build/include
  156. ./core/deps/llvm/build/lib
  157. ./core/deps/llvm/build/libexec
  158. ./core/deps/llvm/build/share
  159. key: ${{ matrix.os }}-${{ env.LLVM_CACHE_SUFFIX }}
  160. - name: Quit if cache miss
  161. if: ${{ matrix.light == 'green' && steps.cache_llvm.outputs.cache-hit != 'true' }}
  162. run: echo "::error::can not get prebuilt llvm libraries" && exit 1
  163. - name: Build wamrc
  164. if: ${{ matrix.light == 'green' }}
  165. run: |
  166. mkdir build && cd build
  167. cmake ..
  168. cmake --build . --config Release --parallel 4
  169. working-directory: wamr-compiler
  170. build_iwasm:
  171. needs: [build_llvm_libraries, check_repo]
  172. runs-on: ${{ matrix.os }}
  173. strategy:
  174. matrix:
  175. make_options_run_mode: [
  176. # Running mode
  177. $CLASSIC_INTERP_BUILD_OPTIONS,
  178. $FAST_INTERP_BUILD_OPTIONS,
  179. $LAZY_JIT_BUILD_OPTIONS,
  180. $MC_JIT_BUILD_OPTIONS,
  181. $AOT_BUILD_OPTIONS,
  182. ]
  183. make_options_feature: [
  184. # Features
  185. "-DWAMR_BUILD_CUSTOM_NAME_SECTION=1",
  186. "-DWAMR_BUILD_DEBUG_AOT=1",
  187. "-DWAMR_BUILD_DEBUG_INTERP=1",
  188. "-DWAMR_BUILD_DUMP_CALL_STACK=1",
  189. "-DWAMR_BUILD_LIB_PTHREAD=1",
  190. "-DWAMR_BUILD_MINI_LOADER=1",
  191. "-DWAMR_BUILD_MEMORY_PROFILING=1",
  192. "-DWAMR_BUILD_MULTI_MODULE=1",
  193. "-DWAMR_BUILD_PERF_PROFILING=1",
  194. "-DWAMR_BUILD_REF_TYPES=1",
  195. "-DWAMR_BUILD_SIMD=1",
  196. "-DWAMR_BUILD_TAIL_CALL=1",
  197. "-DWAMR_DISABLE_HW_BOUND_CHECK=1",
  198. ]
  199. os: [ubuntu-18.04, ubuntu-20.04, macos-latest]
  200. platform: [android, linux, darwin]
  201. exclude:
  202. # uncompatiable os and platform
  203. # ubuntu can not go with darwin
  204. - os: ubuntu-18.04
  205. platform: darwin
  206. - os: ubuntu-20.04
  207. platform: darwin
  208. # macos can not go with android, linux
  209. - os: macos-latest
  210. platform: android
  211. - os: macos-latest
  212. platform: linux
  213. # uncompatiable feature and platform
  214. - os: macos-latest
  215. make_options_feature: "-DWAMR_BUILD_DEBUG_AOT=1"
  216. # uncompatiable mode and feature
  217. # MULTI_MODULE only on INTERP mode
  218. - make_options_run_mode: $LAZY_JIT_BUILD_OPTIONS
  219. make_options_feature: "-DWAMR_BUILD_MULTI_MODULE=1"
  220. - make_options_run_mode: $AOT_BUILD_OPTIONS
  221. make_options_feature: "-DWAMR_BUILD_MULTI_MODULE=1"
  222. - make_options_run_mode: $MC_JIT_BUILD_OPTIONS
  223. make_options_feature: "-DWAMR_BUILD_MULTI_MODULE=1"
  224. # SIMD only on JIT/AOT mode
  225. - make_options_run_mode: $CLASSIC_INTERP_BUILD_OPTIONS
  226. make_options_feature: "-DWAMR_BUILD_SIMD=1"
  227. - make_options_run_mode: $FAST_INTERP_BUILD_OPTIONS
  228. make_options_feature: "-DWAMR_BUILD_SIMD=1"
  229. # DEBUG_INTERP only on CLASSIC INTERP mode
  230. - make_options_run_mode: $AOT_BUILD_OPTIONS
  231. make_options_feature: "-DWAMR_BUILD_DEBUG_INTERP=1"
  232. - make_options_run_mode: $LAZY_JIT_BUILD_OPTIONS
  233. make_options_feature: "-DWAMR_BUILD_DEBUG_INTERP=1"
  234. - make_options_run_mode: $MC_JIT_BUILD_OPTIONS
  235. make_options_feature: "-DWAMR_BUILD_DEBUG_INTERP=1"
  236. - make_options_run_mode: $FAST_INTERP_BUILD_OPTIONS
  237. make_options_feature: "-DWAMR_BUILD_DEBUG_INTERP=1"
  238. # DEBUG_AOT only on JIT/AOT mode
  239. - make_options_run_mode: $CLASSIC_INTERP_BUILD_OPTIONS
  240. make_options_feature: "-DWAMR_BUILD_DEBUG_AOT=1"
  241. - make_options_run_mode: $FAST_INTERP_BUILD_OPTIONS
  242. make_options_feature: "-DWAMR_BUILD_DEBUG_AOT=1"
  243. # TODO: DEBUG_AOT on JIT
  244. - make_options_run_mode: $LAZY_JIT_BUILD_OPTIONS
  245. make_options_feature: "-DWAMR_BUILD_DEBUG_AOT=1"
  246. - make_options_run_mode: $MC_JIT_BUILD_OPTIONS
  247. make_options_feature: "-DWAMR_BUILD_DEBUG_AOT=1"
  248. # MINI_LOADER only on INTERP mode
  249. - make_options_run_mode: $AOT_BUILD_OPTIONS
  250. make_options_feature: "-DWAMR_BUILD_MINI_LOADER=1"
  251. - make_options_run_mode: $LAZY_JIT_BUILD_OPTIONS
  252. make_options_feature: "-DWAMR_BUILD_MINI_LOADER=1"
  253. - make_options_run_mode: $MC_JIT_BUILD_OPTIONS
  254. make_options_feature: "-DWAMR_BUILD_MINI_LOADER=1"
  255. include:
  256. - os: ubuntu-18.04
  257. light: ${{ needs.check_repo.outputs.traffic_light_on_ubuntu_1804 }}
  258. - os: ubuntu-20.04
  259. light: ${{ needs.check_repo.outputs.traffic_light_on_ubuntu_2004 }}
  260. - os: macos-latest
  261. light: ${{ needs.check_repo.outputs.traffic_light_on_macos_latest }}
  262. steps:
  263. - name: light status
  264. run: echo "matrix.os=${{ matrix.os }}, light=${{ matrix.light }}"
  265. - name: checkout
  266. if: ${{ matrix.light == 'green' }}
  267. uses: actions/checkout@v2
  268. - name: Get LLVM libraries
  269. id: cache_llvm
  270. if: ${{ matrix.light == 'green' }}
  271. uses: actions/cache@v2
  272. with:
  273. path: |
  274. ./core/deps/llvm/build/bin
  275. ./core/deps/llvm/build/include
  276. ./core/deps/llvm/build/lib
  277. ./core/deps/llvm/build/libexec
  278. ./core/deps/llvm/build/share
  279. key: ${{ matrix.os }}-${{ env.LLVM_CACHE_SUFFIX }}
  280. - name: Quit if cache miss
  281. if: ${{ matrix.light == 'green' && steps.cache_llvm.outputs.cache-hit != 'true' }}
  282. run: echo "::error::can not get prebuilt llvm libraries" && exit 1
  283. - name: Build iwasm
  284. if: ${{ matrix.light == 'green' }}
  285. run: |
  286. mkdir build && cd build
  287. cmake .. ${{ matrix.make_options_run_mode }} ${{ matrix.make_options_feature }}
  288. cmake --build . --config Release --parallel 4
  289. working-directory: product-mini/platforms/${{ matrix.platform }}
  290. build_samples_wasm_c_api:
  291. needs: [build_iwasm, build_llvm_libraries, build_wamrc, check_repo]
  292. runs-on: ${{ matrix.os }}
  293. strategy:
  294. matrix:
  295. make_options: [
  296. # Running mode
  297. $CLASSIC_INTERP_BUILD_OPTIONS,
  298. $FAST_INTERP_BUILD_OPTIONS,
  299. $LAZY_JIT_BUILD_OPTIONS,
  300. $MC_JIT_BUILD_OPTIONS,
  301. $AOT_BUILD_OPTIONS,
  302. ]
  303. os: [ubuntu-18.04, ubuntu-20.04, macos-latest]
  304. include:
  305. - os: ubuntu-18.04
  306. light: ${{ needs.check_repo.outputs.traffic_light_on_ubuntu_1804 }}
  307. wasi_sdk_release: https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-12/wasi-sdk-12.0-linux.tar.gz
  308. wabt_release: https://github.com/WebAssembly/wabt/releases/download/1.0.24/wabt-1.0.24-ubuntu.tar.gz
  309. - os: ubuntu-20.04
  310. light: ${{ needs.check_repo.outputs.traffic_light_on_ubuntu_2004 }}
  311. wasi_sdk_release: https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-12/wasi-sdk-12.0-linux.tar.gz
  312. wabt_release: https://github.com/WebAssembly/wabt/releases/download/1.0.24/wabt-1.0.24-ubuntu.tar.gz
  313. - os: macos-latest
  314. light: ${{ needs.check_repo.outputs.traffic_light_on_macos_latest }}
  315. wasi_sdk_release: https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-12/wasi-sdk-12.0-macos.tar.gz
  316. wabt_release: https://github.com/WebAssembly/wabt/releases/download/1.0.24/wabt-1.0.24-macos.tar.gz
  317. exclude:
  318. # TODO: a .aot compatiable problem
  319. - os: macos-latest
  320. make_options: $LAZY_JIT_BUILD_OPTIONS
  321. - os: macos-latest
  322. make_options: $AOT_BUILD_OPTIONS
  323. - os: macos-latest
  324. make_options: $MC_JIT_BUILD_OPTIONS
  325. steps:
  326. - name: light status
  327. run: echo "matrix.os=${{ matrix.os }}, light=${{ matrix.light }}"
  328. - name: checkout
  329. if: ${{ matrix.light == 'green' }}
  330. uses: actions/checkout@v2
  331. - name: Get LLVM libraries
  332. id: cache_llvm
  333. if: ${{ matrix.light == 'green' }}
  334. uses: actions/cache@v2
  335. with:
  336. path: |
  337. ./core/deps/llvm/build/bin
  338. ./core/deps/llvm/build/include
  339. ./core/deps/llvm/build/lib
  340. ./core/deps/llvm/build/libexec
  341. ./core/deps/llvm/build/share
  342. key: ${{ matrix.os }}-${{ env.LLVM_CACHE_SUFFIX }}
  343. - name: Quit if cache miss
  344. if: ${{ matrix.light == 'green' && steps.cache_llvm.outputs.cache-hit != 'true' }}
  345. run: echo "::error::can not get prebuilt llvm libraries" && exit 1
  346. - name: download and install wabt
  347. if: ${{ matrix.light == 'green' }}
  348. run: |
  349. cd /opt
  350. sudo wget ${{ matrix.wabt_release }}
  351. sudo tar -xzf wabt-1.0.24-*.tar.gz
  352. sudo mv wabt-1.0.24 wabt
  353. - name: Build wamrc
  354. if: ${{ matrix.light == 'green' }}
  355. run: |
  356. mkdir build && cd build
  357. cmake ..
  358. cmake --build . --config Release --parallel 4
  359. working-directory: wamr-compiler
  360. - name: Build Sample [wasm-c-api]
  361. if: ${{ matrix.light == 'green' }}
  362. run: |
  363. mkdir build && cd build
  364. cmake .. ${{ matrix.make_options }}
  365. cmake --build . --config Release --parallel 4
  366. ./callback
  367. ./callback_chain
  368. ./empty_imports
  369. ./global
  370. ./hello
  371. ./hostref
  372. ./memory
  373. ./reflect
  374. ./table
  375. ./trap
  376. working-directory: samples/wasm-c-api
  377. build_samples_others:
  378. needs: [build_iwasm, build_llvm_libraries, build_wamrc, check_repo]
  379. runs-on: ${{ matrix.os }}
  380. strategy:
  381. matrix:
  382. include:
  383. - os: ubuntu-18.04
  384. light: ${{ needs.check_repo.outputs.traffic_light_on_ubuntu_1804 }}
  385. wasi_sdk_release: https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-12/wasi-sdk-12.0-linux.tar.gz
  386. wabt_release: https://github.com/WebAssembly/wabt/releases/download/1.0.24/wabt-1.0.24-ubuntu.tar.gz
  387. - os: ubuntu-20.04
  388. light: ${{ needs.check_repo.outputs.traffic_light_on_ubuntu_2004 }}
  389. wasi_sdk_release: https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-12/wasi-sdk-12.0-linux.tar.gz
  390. wabt_release: https://github.com/WebAssembly/wabt/releases/download/1.0.24/wabt-1.0.24-ubuntu.tar.gz
  391. - os: macos-latest
  392. light: ${{ needs.check_repo.outputs.traffic_light_on_macos_latest }}
  393. wasi_sdk_release: https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-12/wasi-sdk-12.0-macos.tar.gz
  394. wabt_release: https://github.com/WebAssembly/wabt/releases/download/1.0.24/wabt-1.0.24-macos.tar.gz
  395. steps:
  396. - name: light status
  397. run: echo "matrix.os=${{ matrix.os }}, light=${{ matrix.light }}"
  398. - name: checkout
  399. if: ${{ matrix.light == 'green' }}
  400. uses: actions/checkout@v2
  401. - name: Get LLVM libraries
  402. id: cache_llvm
  403. if: ${{ matrix.light == 'green' }}
  404. uses: actions/cache@v2
  405. with:
  406. path: |
  407. ./core/deps/llvm/build/bin
  408. ./core/deps/llvm/build/include
  409. ./core/deps/llvm/build/lib
  410. ./core/deps/llvm/build/libexec
  411. ./core/deps/llvm/build/share
  412. key: ${{ matrix.os }}-${{ env.LLVM_CACHE_SUFFIX }}
  413. - name: Quit if cache miss
  414. if: ${{ matrix.light == 'green' && steps.cache_llvm.outputs.cache-hit != 'true' }}
  415. run: echo "::error::can not get prebuilt llvm libraries" && exit 1
  416. - name: download and install wasi-sdk
  417. if: ${{ matrix.light == 'green' }}
  418. run: |
  419. cd /opt
  420. sudo wget ${{ matrix.wasi_sdk_release }}
  421. sudo tar -xzf wasi-sdk-12.0-*.tar.gz
  422. sudo mv wasi-sdk-12.0 wasi-sdk
  423. - name: download and install wabt
  424. if: ${{ matrix.light == 'green' }}
  425. run: |
  426. cd /opt
  427. sudo wget ${{ matrix.wabt_release }}
  428. sudo tar -xzf wabt-1.0.24-*.tar.gz
  429. sudo mv wabt-1.0.24 wabt
  430. - name: Build wamrc
  431. if: ${{ matrix.light == 'green' }}
  432. run: |
  433. mkdir build && cd build
  434. cmake ..
  435. cmake --build . --config Release --parallel 4
  436. working-directory: wamr-compiler
  437. - name: Build Sample [basic]
  438. if: ${{ matrix.light == 'green' }}
  439. run: |
  440. cd samples/basic
  441. ./build.sh
  442. ./run.sh
  443. - name: Build Sample [multi-thread]
  444. if: ${{ matrix.light == 'green' }}
  445. run: |
  446. cd samples/multi-thread
  447. mkdir build && cd build
  448. cmake ..
  449. cmake --build . --config Release --parallel 4
  450. ./iwasm wasm-apps/test.wasm
  451. - name: Build Sample [multi-module]
  452. if: ${{ matrix.light == 'green' }}
  453. run: |
  454. cd samples/multi-module
  455. mkdir build && cd build
  456. cmake ..
  457. cmake --build . --config Release --parallel 4
  458. ./multi_module
  459. - name: Build Sample [spawn-thread]
  460. if: ${{ matrix.light == 'green' }}
  461. run: |
  462. cd samples/spawn-thread
  463. mkdir build && cd build
  464. cmake ..
  465. cmake --build . --config Release --parallel 4
  466. ./spawn_thread
  467. - name: Build Sample [ref-types]
  468. if: ${{ matrix.light == 'green' }}
  469. run: |
  470. cd samples/ref-types
  471. mkdir build && cd build
  472. cmake ..
  473. cmake --build . --config Release --parallel 4
  474. ./hello