build_wamr_wasi_extensions.yml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. # Copyright (C) 2019 Intel Corporation. All rights reserved.
  2. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  3. name: build wamr_wasi_extensions release
  4. on:
  5. workflow_call:
  6. inputs:
  7. upload_url:
  8. description: upload binary assets to the URL of release
  9. type: string
  10. required: false
  11. ver_num:
  12. description: a semantic version number. it is required when `release` is true.
  13. type: string
  14. required: false
  15. permissions:
  16. contents: read
  17. jobs:
  18. build_wamr_wasi_extensions:
  19. runs-on: ${{ matrix.os }}
  20. permissions:
  21. contents: write # for uploading release artifacts
  22. strategy:
  23. matrix:
  24. os: [ubuntu-22.04]
  25. steps:
  26. - name: checkout
  27. uses: actions/checkout@v4
  28. - name: install-wasi-sdk-wabt
  29. uses: ./.github/actions/install-wasi-sdk-wabt
  30. with:
  31. os: ${{ matrix.os }}
  32. - name: Build wamr-wasi-extensions
  33. run: |
  34. mkdir dist
  35. ./build_libs.sh $(pwd)/dist/wamr-wasi-extensions
  36. working-directory: wamr-wasi-extensions
  37. - name: Compress the binary
  38. run: |
  39. zip -r wamr-wasi-extensions-${{ inputs.ver_num }}.zip wamr-wasi-extensions
  40. working-directory: wamr-wasi-extensions/dist
  41. - name: Upload release zip
  42. uses: actions/upload-release-asset@v1
  43. env:
  44. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  45. with:
  46. upload_url: ${{ inputs.upload_url }}
  47. asset_path: wamr-wasi-extensions/dist/wamr-wasi-extensions-${{ inputs.ver_num }}.zip
  48. asset_name: wamr-wasi-extensions-${{ inputs.ver_num }}.zip
  49. asset_content_type: application/zip