-
Notifications
You must be signed in to change notification settings - Fork 703
CI: build wamr-wasi-extensions #4394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
yamt
wants to merge
2
commits into
bytecodealliance:main
Choose a base branch
from
yamt:ci-wamr-wasi-extensions3
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+108
−31
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# Copyright (C) 2019 Intel Corporation. All rights reserved. | ||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
||
name: wamr_wasi_extensions | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
paths: | ||
- ".github/workflows/wamr_wasi_extensions.yml" | ||
- "wamr_wasi_extensios/**" | ||
- "core/iwasm/libraries/wasi-nn/include/**" | ||
- "core/iwasm/libraries/lib-socket/**" | ||
# allow to be triggered manually | ||
workflow_dispatch: | ||
|
||
# Cancel any in-flight jobs for the same PR/branch so there's only one active | ||
# at a time | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build_wamr_wasi_extensions: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-22.04, macos-13, macos-14] | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: install-wasi-sdk-wabt | ||
uses: ./.github/actions/install-wasi-sdk-wabt | ||
with: | ||
os: ${{ matrix.os }} | ||
|
||
- name: Build wamr-wasi-extensions | ||
run: | | ||
mkdir dist | ||
./build_libs.sh $(pwd)/dist/wamr-wasi-extensions | ||
working-directory: wamr-wasi-extensions | ||
|
||
- name: Build wamr-wasi-extensions samples | ||
run: | | ||
./build_samples.sh $(pwd)/dist/wamr-wasi-extensions | ||
working-directory: wamr-wasi-extensions | ||
|
||
- name: Upload artifacts | ||
if: matrix.os == 'macos-14' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: wamr-wasi-extensions | ||
path: wamr-wasi-extensions/dist | ||
retention-days: 10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#! /bin/sh | ||
|
||
# Copyright (C) 2025 Midokura Japan KK. All rights reserved. | ||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
||
set -e | ||
|
||
PREFIX=${1:-/tmp/wamr} | ||
WASI_SDK=${WASI_SDK:-/opt/wasi-sdk} | ||
|
||
cmake -B build-lib \ | ||
-DCMAKE_TOOLCHAIN_FILE=${WASI_SDK}/share/cmake/wasi-sdk.cmake \ | ||
-DCMAKE_INSTALL_PREFIX=${PREFIX} \ | ||
. | ||
cmake --build build-lib -t install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#! /bin/sh | ||
|
||
# Copyright (C) 2025 Midokura Japan KK. All rights reserved. | ||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
||
set -e | ||
|
||
PREFIX=${1:-/tmp/wamr} | ||
WASI_SDK=${WASI_SDK:-/opt/wasi-sdk} | ||
|
||
cmake -B build-app-nn \ | ||
-DCMAKE_TOOLCHAIN_FILE=${WASI_SDK}/share/cmake/wasi-sdk.cmake \ | ||
-DCMAKE_PREFIX_PATH=${PREFIX} \ | ||
samples/nn | ||
cmake --build build-app-nn | ||
|
||
cmake -B build-app-nn-cli \ | ||
-DCMAKE_TOOLCHAIN_FILE=${WASI_SDK}/share/cmake/wasi-sdk.cmake \ | ||
-DCMAKE_PREFIX_PATH=${PREFIX} \ | ||
samples/nn-cli | ||
cmake --build build-app-nn-cli | ||
|
||
cmake -B build-app-socket-nslookup \ | ||
-DCMAKE_TOOLCHAIN_FILE=${WASI_SDK}/share/cmake/wasi-sdk-pthread.cmake \ | ||
-DCMAKE_PREFIX_PATH=${PREFIX} \ | ||
samples/socket-nslookup | ||
cmake --build build-app-socket-nslookup | ||
|
||
cmake -B build-app-socket-tcp-udp \ | ||
-DCMAKE_TOOLCHAIN_FILE=${WASI_SDK}/share/cmake/wasi-sdk-pthread.cmake \ | ||
-DCMAKE_PREFIX_PATH=${PREFIX} \ | ||
samples/socket-tcp-udp | ||
cmake --build build-app-socket-tcp-udp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lum1n0us
eventually i want to ship this zip file as a part of release. can you guide me how it can be done?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For other release artifacts, take iwasm as an example, firstly define a reusable workflow: .github/workflows/build_iwasm_release.yml to build iwasm as an artifact, use actions/upload-release-asset@v1 to upload the artifact. and then use it in realease_process.yml, pass different input to build for different platforms
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you. i will take a look.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i read build_iwasm_release.yml a bit.
is the binary we release (eg. build_iwasm_release.yml) completely independent from what we tested (eg. compilation_on_macos.yml) right now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's independent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok. then maybe i will leave this PR for on.pull_request and prepare another yml file for release workflow.