use variable to control make parallelism in ci
This commit is contained in:
parent
f34a6fc523
commit
64d2783b5f
|
@ -23,7 +23,7 @@ if [ ! -d "$LOCAL_VERILATOR_DIR" ]; then
|
|||
run "mkdir -p $REMOTE_CHIPYARD_DIR"
|
||||
copy $LOCAL_CHIPYARD_DIR/ $SERVER:$REMOTE_CHIPYARD_DIR
|
||||
|
||||
run "make -j8 -C $REMOTE_SIM_DIR VERILATOR_INSTALL_DIR=$REMOTE_VERILATOR_DIR verilator_install"
|
||||
run "make -j$NPROC -C $REMOTE_SIM_DIR VERILATOR_INSTALL_DIR=$REMOTE_VERILATOR_DIR verilator_install"
|
||||
|
||||
# copy so that circleci can cache
|
||||
mkdir -p $LOCAL_CHIPYARD_DIR
|
||||
|
|
|
@ -17,6 +17,9 @@ clean () {
|
|||
run "rm -rf $REMOTE_WORK_DIR"
|
||||
}
|
||||
|
||||
# make parallelism
|
||||
NPROC=8
|
||||
|
||||
# remote variables
|
||||
REMOTE_WORK_DIR=$CI_DIR/$CIRCLE_PROJECT_REPONAME-$CIRCLE_BRANCH-$CIRCLE_SHA1-$CIRCLE_JOB
|
||||
REMOTE_RISCV_DIR=$REMOTE_WORK_DIR/riscv-tools-install
|
||||
|
|
|
@ -41,7 +41,7 @@ fi
|
|||
|
||||
# enter the verilator directory and build the specific config on remote server
|
||||
run "make -C $REMOTE_SIM_DIR clean"
|
||||
run "export RISCV=\"$TOOLS_DIR\"; export LD_LIBRARY_PATH=\"$LD_LIB_DIR\"; export VERILATOR_ROOT=$REMOTE_VERILATOR_DIR/install/share/verilator; make -j8 -C $REMOTE_SIM_DIR VERILATOR_INSTALL_DIR=$REMOTE_VERILATOR_DIR JAVA_ARGS=\"-Xmx8G -Xss8M\" ${mapping[$1]}"
|
||||
run "export RISCV=\"$TOOLS_DIR\"; export LD_LIBRARY_PATH=\"$LD_LIB_DIR\"; export VERILATOR_ROOT=$REMOTE_VERILATOR_DIR/install/share/verilator; make -j$NPROC -C $REMOTE_SIM_DIR VERILATOR_INSTALL_DIR=$REMOTE_VERILATOR_DIR JAVA_ARGS=\"-Xmx8G -Xss8M\" ${mapping[$1]}"
|
||||
run "rm -rf $REMOTE_CHIPYARD_DIR/project"
|
||||
|
||||
# copy back the final build
|
||||
|
|
|
@ -12,11 +12,11 @@ source $SCRIPT_DIR/defaults.sh
|
|||
export VERILATOR_ROOT=$LOCAL_VERILATOR_DIR/install/share/verilator
|
||||
|
||||
run_bmark () {
|
||||
make run-bmark-tests-fast -j8 -C $LOCAL_SIM_DIR VERILATOR_INSTALL_DIR=$LOCAL_VERILATOR_DIR $@
|
||||
make run-bmark-tests-fast -j$NPROC -C $LOCAL_SIM_DIR VERILATOR_INSTALL_DIR=$LOCAL_VERILATOR_DIR $@
|
||||
}
|
||||
|
||||
run_asm () {
|
||||
make run-asm-tests-fast -j8 -C $LOCAL_SIM_DIR VERILATOR_INSTALL_DIR=$LOCAL_VERILATOR_DIR $@
|
||||
make run-asm-tests-fast -j$NPROC -C $LOCAL_SIM_DIR VERILATOR_INSTALL_DIR=$LOCAL_VERILATOR_DIR $@
|
||||
}
|
||||
|
||||
run_both () {
|
||||
|
@ -44,7 +44,7 @@ case $1 in
|
|||
export RISCV=$LOCAL_ESP_DIR
|
||||
export LD_LIBRARY_PATH=$LOCAL_ESP_DIR/lib
|
||||
export PATH=$RISCV/bin:$PATH
|
||||
make run-rv64uv-p-asm-tests -j8 -C $LOCAL_SIM_DIR VERILATOR_INSTALL_DIR=$LOCAL_VERILATOR_DIR ${mapping[$1]}
|
||||
make run-rv64uv-p-asm-tests -j$NPROC -C $LOCAL_SIM_DIR VERILATOR_INSTALL_DIR=$LOCAL_VERILATOR_DIR ${mapping[$1]}
|
||||
;;
|
||||
*)
|
||||
echo "No set of tests for $1. Did you spell it right?"
|
||||
|
|
Loading…
Reference in New Issue