Address CircleCI
This commit is contained in:
@@ -122,12 +122,7 @@ search
|
|||||||
|
|
||||||
submodules=("fpga-shells")
|
submodules=("fpga-shells")
|
||||||
dir="fpga"
|
dir="fpga"
|
||||||
if [ "$CIRCLE_BRANCH" == "master" ] || [ "$CIRCLE_BRANCH" == "dev" ]
|
branches=("master")
|
||||||
then
|
|
||||||
branches=("master")
|
|
||||||
else
|
|
||||||
branches=("master" "dev")
|
|
||||||
fi
|
|
||||||
search
|
search
|
||||||
|
|
||||||
# turn off verbose printing to make this easier to read
|
# turn off verbose printing to make this easier to read
|
||||||
|
|||||||
@@ -81,12 +81,15 @@ commands:
|
|||||||
build-script:
|
build-script:
|
||||||
type: string
|
type: string
|
||||||
default: "do-rtl-build.sh"
|
default: "do-rtl-build.sh"
|
||||||
|
build-type:
|
||||||
|
type: string
|
||||||
|
default: "sim"
|
||||||
steps:
|
steps:
|
||||||
- setup-tools:
|
- setup-tools:
|
||||||
tools-version: "<< parameters.tools-version >>"
|
tools-version: "<< parameters.tools-version >>"
|
||||||
- run:
|
- run:
|
||||||
name: Building << parameters.group-key >> subproject using Verilator
|
name: Building << parameters.group-key >> subproject using Verilator
|
||||||
command: .circleci/<< parameters.build-script >> << parameters.group-key >>
|
command: .circleci/<< parameters.build-script >> << parameters.group-key >> << parameters.build-type >>
|
||||||
no_output_timeout: << parameters.timeout >>
|
no_output_timeout: << parameters.timeout >>
|
||||||
- save_cache:
|
- save_cache:
|
||||||
key: << parameters.group-key >>-{{ .Branch }}-{{ .Revision }}
|
key: << parameters.group-key >>-{{ .Branch }}-{{ .Revision }}
|
||||||
@@ -366,7 +369,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- prepare-rtl:
|
- prepare-rtl:
|
||||||
group-key: "group-fpga"
|
group-key: "group-fpga"
|
||||||
build-script: "do-fpga-rtl-build.sh"
|
build-type: "fpga"
|
||||||
|
|
||||||
# Order and dependencies of jobs to run
|
# Order and dependencies of jobs to run
|
||||||
workflows:
|
workflows:
|
||||||
|
|||||||
@@ -1,52 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# create the different verilator builds
|
|
||||||
# argument is the make command string
|
|
||||||
|
|
||||||
# turn echo on and error on earliest command
|
|
||||||
set -ex
|
|
||||||
|
|
||||||
# get shared variables
|
|
||||||
SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"
|
|
||||||
source $SCRIPT_DIR/defaults.sh
|
|
||||||
|
|
||||||
# call clean on exit
|
|
||||||
trap clean EXIT
|
|
||||||
|
|
||||||
cd $LOCAL_CHIPYARD_DIR
|
|
||||||
./scripts/init-submodules-no-riscv-tools.sh
|
|
||||||
|
|
||||||
# set stricthostkeychecking to no (must happen before rsync)
|
|
||||||
run "echo \"Ping $SERVER\""
|
|
||||||
|
|
||||||
clean
|
|
||||||
|
|
||||||
# copy over riscv/esp-tools, and chipyard to remote
|
|
||||||
run "mkdir -p $REMOTE_CHIPYARD_DIR"
|
|
||||||
copy $LOCAL_CHIPYARD_DIR/ $SERVER:$REMOTE_CHIPYARD_DIR
|
|
||||||
|
|
||||||
run "cp -r ~/.ivy2 $REMOTE_WORK_DIR"
|
|
||||||
run "cp -r ~/.sbt $REMOTE_WORK_DIR"
|
|
||||||
|
|
||||||
TOOLS_DIR=$REMOTE_RISCV_DIR
|
|
||||||
LD_LIB_DIR=$REMOTE_RISCV_DIR/lib
|
|
||||||
|
|
||||||
run "mkdir -p $REMOTE_RISCV_DIR"
|
|
||||||
copy $LOCAL_RISCV_DIR/ $SERVER:$REMOTE_RISCV_DIR
|
|
||||||
|
|
||||||
# enter the verilator directory and build the specific config on remote server
|
|
||||||
run "export RISCV=\"$TOOLS_DIR\"; \
|
|
||||||
make -C $REMOTE_FPGA_DIR clean;"
|
|
||||||
|
|
||||||
read -a keys <<< ${grouping[$1]}
|
|
||||||
|
|
||||||
for key in "${keys[@]}"
|
|
||||||
do
|
|
||||||
run "export RISCV=\"$TOOLS_DIR\"; \
|
|
||||||
export LD_LIBRARY_PATH=\"$LD_LIB_DIR\"; \
|
|
||||||
export PATH=\"$REMOTE_VERILATOR_DIR/bin:\$PATH\"; \
|
|
||||||
export COURSIER_CACHE=\"$REMOTE_WORK_DIR/.coursier-cache\"; \
|
|
||||||
make -j$REMOTE_MAKE_NPROC -C $REMOTE_FPGA_DIR FIRRTL_LOGLEVEL=info JAVA_ARGS=\"$REMOTE_JAVA_ARGS\" ${mapping[$key]}"
|
|
||||||
done
|
|
||||||
|
|
||||||
run "rm -rf $REMOTE_CHIPYARD_DIR/project"
|
|
||||||
@@ -1,7 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# create the different verilator builds
|
# create the different verilator builds
|
||||||
# argument is the make command string
|
# usage:
|
||||||
|
# do-rtl-build.sh <make command string> sim
|
||||||
|
# run rtl build for simulations and copy back results
|
||||||
|
# do-rtl-build.sh <make command string> fpga
|
||||||
|
# run rtl build for fpga and don't copy back results
|
||||||
|
|
||||||
# turn echo on and error on earliest command
|
# turn echo on and error on earliest command
|
||||||
set -ex
|
set -ex
|
||||||
@@ -50,9 +54,19 @@ else
|
|||||||
copy $LOCAL_RISCV_DIR/ $SERVER:$REMOTE_RISCV_DIR
|
copy $LOCAL_RISCV_DIR/ $SERVER:$REMOTE_RISCV_DIR
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# choose what make dir to use
|
||||||
|
case $2 in
|
||||||
|
"sim")
|
||||||
|
REMOTE_MAKE_DIR=$REMOTE_SIM_DIR
|
||||||
|
;;
|
||||||
|
"fpga")
|
||||||
|
REMOTE_MAKE_DIR=$REMOTE_FPGA_DIR
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
# enter the verilator directory and build the specific config on remote server
|
# enter the verilator directory and build the specific config on remote server
|
||||||
run "export RISCV=\"$TOOLS_DIR\"; \
|
run "export RISCV=\"$TOOLS_DIR\"; \
|
||||||
make -C $REMOTE_SIM_DIR clean;"
|
make -C $REMOTE_MAKE_DIR clean;"
|
||||||
|
|
||||||
read -a keys <<< ${grouping[$1]}
|
read -a keys <<< ${grouping[$1]}
|
||||||
|
|
||||||
@@ -63,11 +77,14 @@ do
|
|||||||
export PATH=\"$REMOTE_VERILATOR_DIR/bin:\$PATH\"; \
|
export PATH=\"$REMOTE_VERILATOR_DIR/bin:\$PATH\"; \
|
||||||
export VERILATOR_ROOT=\"$REMOTE_VERILATOR_DIR\"; \
|
export VERILATOR_ROOT=\"$REMOTE_VERILATOR_DIR\"; \
|
||||||
export COURSIER_CACHE=\"$REMOTE_WORK_DIR/.coursier-cache\"; \
|
export COURSIER_CACHE=\"$REMOTE_WORK_DIR/.coursier-cache\"; \
|
||||||
make -j$REMOTE_MAKE_NPROC -C $REMOTE_SIM_DIR FIRRTL_LOGLEVEL=info JAVA_ARGS=\"$REMOTE_JAVA_ARGS\" ${mapping[$key]}"
|
make -j$REMOTE_MAKE_NPROC -C $REMOTE_MAKE_DIR FIRRTL_LOGLEVEL=info JAVA_ARGS=\"$REMOTE_JAVA_ARGS\" ${mapping[$key]}"
|
||||||
done
|
done
|
||||||
|
|
||||||
run "rm -rf $REMOTE_CHIPYARD_DIR/project"
|
run "rm -rf $REMOTE_CHIPYARD_DIR/project"
|
||||||
|
|
||||||
# copy back the final build
|
# choose to copy back results
|
||||||
mkdir -p $LOCAL_CHIPYARD_DIR
|
if [ $2 = "sim" ]; then
|
||||||
copy $SERVER:$REMOTE_CHIPYARD_DIR/ $LOCAL_CHIPYARD_DIR
|
# copy back the final build
|
||||||
|
mkdir -p $LOCAL_CHIPYARD_DIR
|
||||||
|
copy $SERVER:$REMOTE_CHIPYARD_DIR/ $LOCAL_CHIPYARD_DIR
|
||||||
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user