-
Notifications
You must be signed in to change notification settings - Fork 729
Build projects in wamr-test-suites with multiple cores #811
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
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
05e315e
Merge pull request #360 from bytecodealliance/main
wenyongh d4f2649
Apply clang-format for core/shared and product-mini files
wenyongh 8c3ccef
Merge pull request #361 from bytecodealliance/main
wenyongh 084fef1
Merge pull request #362 from bytecodealliance/main
wenyongh 49fbb9c
Merge pull request #363 from bytecodealliance/main
wenyongh f0cd7ea
Fix app heap corrupted unchecked issue
wenyongh a4c8883
Change API to wasm_runtime_show_app_heap_corrupted_prompt()
wenyongh 0f25f37
Merge pull request #364 from bytecodealliance/main
wenyongh cb984fe
Merge pull request #365 from bytecodealliance/main
wenyongh 5a39a9d
Apply clang-format for more files
wenyongh d7857c5
Merge pull request #366 from bytecodealliance/main
wenyongh beaaf52
Enable auto install wasi-sdk when build wamr-sdk
wenyongh d2867ca
Merge bytecodealliance:main into wenyongh:main
wenyongh 3a68634
Merge pull request #367 from bytecodealliance/main
wenyongh 4c63230
Merge pull request #368 from bytecodealliance/main
wenyongh 6e1f4c9
Fix workflow issue, fix dockerfile bug, refine code format
wenyongh d44e6b0
Refine code format
wenyongh 3fca5ff
Merge pull request #369 from bytecodealliance/main
wenyongh 13bdd8c
Build projets in wamr-test-suites with multiple cores
wenyongh 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 |
|---|---|---|
|
|
@@ -208,7 +208,7 @@ function unit_test() | |
|
|
||
| # keep going and do not care if it is success or not | ||
| make -ki clean | true | ||
| cmake ${compile_flag} ${WORK_DIR}/../../unit && make | ||
| cmake ${compile_flag} ${WORK_DIR}/../../unit && make -j 4 | ||
| if [ "$?" != 0 ];then | ||
| echo -e "\033[31mbuild unit test failed, you may need to change wamr into dev/aot branch and ensure llvm is built \033[0m" | ||
| exit 1 | ||
|
|
@@ -311,7 +311,7 @@ function spec_test() | |
|
|
||
| echo "compile the reference intepreter" | ||
| pushd interpreter | ||
| make opt | ||
| make opt -j 4 | ||
| popd | ||
|
|
||
| git apply ../../spec-test-script/simd_ignore_cases.patch | ||
|
|
@@ -359,7 +359,7 @@ function spec_test() | |
| git pull | ||
| git reset --hard origin/main | ||
| cd .. | ||
| make -C wabt gcc-release | ||
| make -C wabt gcc-release -j 4 | ||
| fi | ||
|
|
||
| ln -sf ${WORK_DIR}/../spec-test-script/all.sh . | ||
|
|
@@ -473,7 +473,7 @@ function build_iwasm_with_cfg() | |
| && if [ -d build ]; then rm -rf build/*; else mkdir build; fi \ | ||
| && cd build \ | ||
| && cmake $* .. \ | ||
| && make | ||
| && make -j 4 | ||
| cd ${WAMR_DIR}/product-mini/platforms/linux-sgx/enclave-sample \ | ||
| && make clean \ | ||
| && make SPEC_TEST=1 | ||
|
|
@@ -482,7 +482,7 @@ function build_iwasm_with_cfg() | |
| && if [ -d build ]; then rm -rf build/*; else mkdir build; fi \ | ||
| && cd build \ | ||
| && cmake $* .. \ | ||
| && make | ||
| && make -j 4 | ||
| fi | ||
|
|
||
| if [ "$?" != 0 ];then | ||
|
|
@@ -506,7 +506,7 @@ function build_wamrc() | |
| && if [ -d build ]; then rm -r build/*; else mkdir build; fi \ | ||
| && cd build \ | ||
| && cmake .. \ | ||
| && make | ||
| && make -j 4 | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above |
||
| } | ||
|
|
||
| ### Need to add a test suite? | ||
|
|
||
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.
had better use
$(nproc)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.
nproc may not be installed. 4 might be a safe option
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.
Got it, thanks.
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, so let's use -j 4.
Another place to reduce the workloads compilation time is building iwasm in compilation_on_android_ubuntu_macos.yml, currently we get llvm libraries
before building iwasm for each mode, in fact we only need to get llvm libraries
for the mode jit and lazyjit. For fast/classic interpreter mode and aot mode,
we don't need to get the llvm libraires, is it easy to add condition check
in the scripts?
- name: Get LLVM libraries id: cache_llvm if: ${{ matrix.light == 'green' }} uses: actions/cache@v2 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: ${{ matrix.os }}-${{ env.LLVM_CACHE_SUFFIX }}e.g. modify this line: if: ${{ matrix.light == 'green' }} to something like:
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.
Time consumption is defined by the longest job in parallel mode. In our workflow, the followings will not start until all five build_iwasm jobs are finished.
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.
There should be total 243 build_iwasm jobs but not five in compilation_on_android_ubuntu_macos.yml:

https://github.com/bytecodealliance/wasm-micro-runtime/actions/runs/1402357515
It is the longest phase in all the workflows.
Currently each build_iwasm job will get LLVM libraries firstly which costs some time, but there
are a lot of interpreter/aot mode jobs which don't need llvm libraries, if we can skip this step for them,
we should be able to reduce the total time of 243 build_iwasm jobs, so as to reduce the total time of
all workflows.