summaryrefslogtreecommitdiffstats
path: root/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/.github/workflows/build_iwasm_release.yml
diff options
context:
space:
mode:
Diffstat (limited to 'fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/.github/workflows/build_iwasm_release.yml')
-rw-r--r--fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/.github/workflows/build_iwasm_release.yml108
1 files changed, 108 insertions, 0 deletions
diff --git a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/.github/workflows/build_iwasm_release.yml b/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/.github/workflows/build_iwasm_release.yml
new file mode 100644
index 000000000..64aa9a92c
--- /dev/null
+++ b/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/.github/workflows/build_iwasm_release.yml
@@ -0,0 +1,108 @@
+# Copyright (C) 2019 Intel Corporation. All rights reserved.
+# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+name: build iwasm release
+
+on:
+ workflow_call:
+ inputs:
+ arch:
+ description: arch of the release
+ type: string
+ required: false
+ default: x86_64
+ cwd:
+ description: workfing directory
+ type: string
+ required: true
+ llvm_cache_key:
+ description: the cache key of llvm libraries
+ type: string
+ required: true
+ runner:
+ description: OS of compilation
+ type: string
+ required: true
+ upload_url:
+ description: a semantic version number. it is required when `release` is true.
+ type: string
+ required: false
+ ver_num:
+ description: a semantic version number. it is required when `release` is true.
+ type: string
+ required: false
+
+jobs:
+ build:
+ runs-on: ${{ inputs.runner }}
+ steps:
+ - uses: actions/checkout@v3
+
+ - name: get cached LLVM libraries
+ id: retrieve_llvm_libs
+ uses: actions/cache@v3
+ with:
+ path: |
+ ./core/deps/llvm/build/bin
+ ./core/deps/llvm/build/include
+ ./core/deps/llvm/build/lib
+ ./core/deps/llvm/build/libexec
+ ./core/deps/llvm/build/share
+ key: ${{ inputs.llvm_cache_key }}
+ fail-on-cache-miss: true
+
+ - name: generate iwasm binary release
+ run: |
+ cmake -S . -B build \
+ -DWAMR_BUILD_AOT=1 -DWAMR_BUILD_INTERP=1 -DWAMR_BUILD_FAST_JIT=1 -DWAMR_BUILD_JIT=1 \
+ -DWAMR_BUILD_CUSTOM_NAME_SECTION=0 \
+ -DWAMR_BUILD_DEBUG_INTERP=0 \
+ -DWAMR_BUILD_DEBUG_AOT=0 \
+ -DWAMR_BUILD_DUMP_CALL_STACK=0 \
+ -DWAMR_BUILD_LIBC_UVWASI=0 \
+ -DWAMR_BUILD_LIBC_EMCC=0 \
+ -DWAMR_BUILD_LIB_RATS=0 \
+ -DWAMR_BUILD_LOAD_CUSTOM_SECTION=0 \
+ -DWAMR_BUILD_MEMORY_PROFILING=0 \
+ -DWAMR_BUILD_MINI_LOADER=0 \
+ -DWAMR_BUILD_MULTI_MODULE=0 \
+ -DWAMR_BUILD_PERF_PROFILING=0 \
+ -DWAMR_BUILD_SPEC_TEST=0 \
+ -DWAMR_BUILD_BULK_MEMORY=1 \
+ -DWAMR_BUILD_LIB_PTHREAD=1 \
+ -DWAMR_BUILD_LIB_PTHREAD_SEMAPHORE=1 \
+ -DWAMR_BUILD_LIB_WASI_THREADS=1 \
+ -DWAMR_BUILD_LIBC_BUILTIN=1 \
+ -DWAMR_BUILD_LIBC_WASI=1 \
+ -DWAMR_BUILD_REF_TYPES=1 \
+ -DWAMR_BUILD_SIMD=1 \
+ -DWAMR_BUILD_SHARED_MEMORY=1 \
+ -DWAMR_BUILD_TAIL_CALL=1 \
+ -DWAMR_BUILD_THREAD_MGR=1
+ cmake --build build --config Release --parallel 4
+ working-directory: ${{ inputs.cwd }}
+
+ - name: compress the binary
+ run: |
+ tar czf iwasm-${{ inputs.ver_num }}-${{ inputs.runner }}.tar.gz iwasm
+ zip iwasm-${{ inputs.ver_num }}-${{ inputs.runner }}.zip iwasm
+ working-directory: ${{ inputs.cwd }}/build
+
+ - name: upload release tar.gz
+ uses: actions/upload-release-asset@v1
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ upload_url: ${{ inputs.upload_url }}
+ asset_path: ${{ inputs.cwd }}/build/iwasm-${{ inputs.ver_num }}-${{ inputs.runner }}.tar.gz
+ asset_name: iwasm-${{ inputs.ver_num }}-${{ inputs.arch }}-${{ inputs.runner }}.tar.gz
+ asset_content_type: application/x-gzip
+
+ - name: upload release zip
+ uses: actions/upload-release-asset@v1
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ upload_url: ${{ inputs.upload_url }}
+ asset_path: ${{ inputs.cwd }}/build/iwasm-${{ inputs.ver_num }}-${{ inputs.runner }}.zip
+ asset_name: iwasm-${{ inputs.ver_num }}-${{ inputs.arch }}-${{ inputs.runner }}.zip
+ asset_content_type: application/zip