-
Notifications
You must be signed in to change notification settings - Fork 728
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
Conversation
Merge bytecodealliance:main into wenyongh:main
Apply clang-format for core/shared and product-mini files (#785)
Merge bytecodealliance:main into wenyongh:main
Enhance spec test workflow to support x86_32 target (#787)
Merge bytecodealliance:main into wenyongh:main
Merge wasm-micro-runtime:main into wenyongh:main
Apply clang-format for more source files (#795)
And fix host_tool help show issue.
Disable source debugging by default (#804)
Merge bytecodealliance:main into wenyongh:main
Merge bytecodealliance:main into wenyongh:main
| # 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 |
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)
| cmake ${compile_flag} ${WORK_DIR}/../../unit && make -j 4 | |
| cmake ${compile_flag} ${WORK_DIR}/../../unit && make -j $(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:
if: ${{ matrix.light == 'green'
&& (make_options_run_mode == $JIT_BUILD_OPTIONS
|| make_options_run_mode == $LAZY_JIT_BUILD_OPTIONS)
}}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.
| && cd build \ | ||
| && cmake .. \ | ||
| && make | ||
| && make -j 4 |
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.
Same as above
|
LGTM |
Build projects in wamr-test-suites with multiple cores (#811)
…nce#811) Build several projects in wamr-test-suites with multiple cores to reduce the compilation time.
Build several projects in wamr-test-suites with multiple cores to reduce
the compilation time.