use remote build server
This commit is contained in:
@@ -7,8 +7,7 @@
|
|||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
if [ ! -d "$HOME/$1-install" ]; then
|
if [ ! -d "$HOME/$1-install" ]; then
|
||||||
|
cd $HOME
|
||||||
cd $HOME/
|
|
||||||
|
|
||||||
# init all submodules including the tools
|
# init all submodules including the tools
|
||||||
CHIPYARD_DIR=$HOME/project ./project/scripts/build-toolchains.sh $1
|
CHIPYARD_DIR=$HOME/project ./project/scripts/build-toolchains.sh $1
|
||||||
|
|||||||
@@ -5,11 +5,27 @@
|
|||||||
# turn echo on and error on earliest command
|
# turn echo on and error on earliest command
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
cd $HOME/project
|
# get shared variables
|
||||||
|
SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"
|
||||||
|
source $SCRIPT_DIR/defaults.sh
|
||||||
|
|
||||||
cd sims/verisim
|
# call clean on exit
|
||||||
|
trap clean EXIT
|
||||||
|
|
||||||
if [ ! -d "$HOME/project/sims/verisim/verilator" ]; then
|
if [ ! -d "$LOCAL_VERILATOR_DIR" ]; then
|
||||||
# make verilator
|
# set stricthostkeychecking to no (must happen before rsync)
|
||||||
make verilator_install
|
run "echo \"Ping $SERVER\""
|
||||||
|
|
||||||
|
clean
|
||||||
|
|
||||||
|
run "mkdir -p $REMOTE_CHIPYARD_DIR"
|
||||||
|
copy $LOCAL_CHIPYARD_DIR/ $SERVER:$REMOTE_CHIPYARD_DIR
|
||||||
|
|
||||||
|
run "make -C $REMOTE_CHIPYARD_DIR/sims/verisim VERILATOR_INSTALL_DIR=$REMOTE_VERILATOR_DIR verilator_install"
|
||||||
|
|
||||||
|
# copy so that circleci can cache
|
||||||
|
mkdir -p $LOCAL_CHIPYARD_DIR
|
||||||
|
mkdir -p $LOCAL_VERILATOR_DIR
|
||||||
|
copy $SERVER:$REMOTE_CHIPYARD_DIR/ $LOCAL_CHIPYARD_DIR
|
||||||
|
copy $SERVER:$REMOTE_VERILATOR_DIR/ $LOCAL_VERILATOR_DIR
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -7,479 +7,387 @@ version: 2
|
|||||||
jobs:
|
jobs:
|
||||||
commit-on-master-check:
|
commit-on-master-check:
|
||||||
docker:
|
docker:
|
||||||
- image: riscvboom/riscvboom-images:0.0.5
|
- image: riscvboom/riscvboom-images:0.0.10
|
||||||
environment:
|
environment:
|
||||||
JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit
|
JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit
|
||||||
TERM: dumb
|
TERM: dumb
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
# Checkout the code
|
|
||||||
- checkout
|
- checkout
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: Check commits of each submodule
|
name: Check commits of each submodule
|
||||||
command: |
|
command: |
|
||||||
.circleci/check-commit.sh
|
.circleci/check-commit.sh
|
||||||
|
|
||||||
install-riscv-toolchain:
|
install-riscv-toolchain:
|
||||||
docker:
|
docker:
|
||||||
- image: riscvboom/riscvboom-images:0.0.5
|
- image: riscvboom/riscvboom-images:0.0.10
|
||||||
environment:
|
environment:
|
||||||
JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit
|
JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit
|
||||||
TERM: dumb
|
TERM: dumb
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
# Checkout the code
|
|
||||||
- checkout
|
- checkout
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: Create hash of toolchains
|
name: Create hash of toolchains
|
||||||
command: |
|
command: |
|
||||||
.circleci/create-hash.sh
|
.circleci/create-hash.sh
|
||||||
|
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
keys:
|
keys:
|
||||||
- riscv-tools-installed-v1-{{ checksum "../riscv-tools.hash" }}
|
- riscv-tools-installed-v1-{{ checksum "../riscv-tools.hash" }}
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: Building riscv-tools toolchain
|
name: Building riscv-tools toolchain
|
||||||
command: |
|
command: |
|
||||||
.circleci/build-toolchains.sh riscv-tools
|
.circleci/build-toolchains.sh riscv-tools
|
||||||
no_output_timeout: 120m
|
no_output_timeout: 120m
|
||||||
|
|
||||||
- save_cache:
|
- save_cache:
|
||||||
key: riscv-tools-installed-v1-{{ checksum "../riscv-tools.hash" }}
|
key: riscv-tools-installed-v1-{{ checksum "../riscv-tools.hash" }}
|
||||||
paths:
|
paths:
|
||||||
- "/home/riscvuser/riscv-tools-install"
|
- "/home/riscvuser/riscv-tools-install"
|
||||||
|
|
||||||
install-esp-toolchain:
|
install-esp-toolchain:
|
||||||
docker:
|
docker:
|
||||||
- image: riscvboom/riscvboom-images:0.0.5
|
- image: riscvboom/riscvboom-images:0.0.10
|
||||||
environment:
|
environment:
|
||||||
JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit
|
JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit
|
||||||
TERM: dumb
|
TERM: dumb
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
# Checkout the code
|
|
||||||
- checkout
|
- checkout
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: Create hash of toolchains
|
name: Create hash of toolchains
|
||||||
command: |
|
command: |
|
||||||
.circleci/create-hash.sh
|
.circleci/create-hash.sh
|
||||||
|
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
keys:
|
keys:
|
||||||
- esp-tools-installed-v1-{{ checksum "../esp-tools.hash" }}
|
- esp-tools-installed-v1-{{ checksum "../esp-tools.hash" }}
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: Building esp-tools toolchain
|
name: Building esp-tools toolchain
|
||||||
command: |
|
command: |
|
||||||
.circleci/build-toolchains.sh esp-tools
|
.circleci/build-toolchains.sh esp-tools
|
||||||
no_output_timeout: 120m
|
no_output_timeout: 120m
|
||||||
|
|
||||||
- save_cache:
|
- save_cache:
|
||||||
key: esp-tools-installed-v1-{{ checksum "../esp-tools.hash" }}
|
key: esp-tools-installed-v1-{{ checksum "../esp-tools.hash" }}
|
||||||
paths:
|
paths:
|
||||||
- "/home/riscvuser/esp-tools-install"
|
- "/home/riscvuser/esp-tools-install"
|
||||||
|
|
||||||
install-verilator:
|
install-verilator:
|
||||||
docker:
|
docker:
|
||||||
- image: riscvboom/riscvboom-images:0.0.5
|
- image: riscvboom/riscvboom-images:0.0.10
|
||||||
environment:
|
environment:
|
||||||
JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit
|
JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit
|
||||||
TERM: dumb
|
TERM: dumb
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
# Checkout the code
|
- add_ssh_keys:
|
||||||
|
fingerprints:
|
||||||
|
- "3e:c3:02:5b:ed:64:8c:b7:b0:04:43:bc:83:43:73:1e"
|
||||||
- checkout
|
- checkout
|
||||||
|
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
keys:
|
keys:
|
||||||
- verilator-installed-v1-{{ checksum "sims/verisim/verilator.mk" }}
|
- verilator-installed-v1-{{ checksum "sims/verisim/verilator.mk" }}
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: Build Verilator
|
name: Build Verilator
|
||||||
command: |
|
command: |
|
||||||
.circleci/build-verilator.sh
|
.circleci/build-verilator.sh
|
||||||
no_output_timeout: 120m
|
no_output_timeout: 120m
|
||||||
|
|
||||||
- save_cache:
|
- save_cache:
|
||||||
key: verilator-installed-v1-{{ checksum "sims/verisim/verilator.mk" }}
|
key: verilator-installed-v1-{{ checksum "sims/verisim/verilator.mk" }}
|
||||||
paths:
|
paths:
|
||||||
- "/home/riscvuser/project/sims/verisim/verilator"
|
- "/home/riscvuser/verilator"
|
||||||
|
|
||||||
prepare-example:
|
prepare-example:
|
||||||
docker:
|
docker:
|
||||||
- image: riscvboom/riscvboom-images:0.0.5
|
- image: riscvboom/riscvboom-images:0.0.10
|
||||||
environment:
|
environment:
|
||||||
JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit
|
JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit
|
||||||
TERM: dumb
|
TERM: dumb
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
# Checkout the code
|
- add_ssh_keys:
|
||||||
|
fingerprints:
|
||||||
|
- "3e:c3:02:5b:ed:64:8c:b7:b0:04:43:bc:83:43:73:1e"
|
||||||
- checkout
|
- checkout
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: Create hash of toolchains
|
name: Create hash of toolchains
|
||||||
command: |
|
command: |
|
||||||
.circleci/create-hash.sh
|
.circleci/create-hash.sh
|
||||||
|
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
keys:
|
keys:
|
||||||
- riscv-tools-installed-v1-{{ checksum "../riscv-tools.hash" }}
|
- riscv-tools-installed-v1-{{ checksum "../riscv-tools.hash" }}
|
||||||
|
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
keys:
|
keys:
|
||||||
- verilator-installed-v1-{{ checksum "sims/verisim/verilator.mk" }}
|
- verilator-installed-v1-{{ checksum "sims/verisim/verilator.mk" }}
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: Building the example subproject using Verilator
|
name: Building the example subproject using Verilator
|
||||||
command: .circleci/do-rtl-build.sh SUB_PROJECT=example
|
command: .circleci/do-rtl-build.sh SUB_PROJECT=example
|
||||||
no_output_timeout: 120m
|
no_output_timeout: 120m
|
||||||
|
|
||||||
- save_cache:
|
- save_cache:
|
||||||
key: example-{{ .Branch }}-{{ .Revision }}
|
key: example-{{ .Branch }}-{{ .Revision }}
|
||||||
paths:
|
paths:
|
||||||
- "/home/riscvuser/project"
|
- "/home/riscvuser/project"
|
||||||
|
|
||||||
prepare-boomexample:
|
prepare-boomexample:
|
||||||
docker:
|
docker:
|
||||||
- image: riscvboom/riscvboom-images:0.0.5
|
- image: riscvboom/riscvboom-images:0.0.10
|
||||||
environment:
|
environment:
|
||||||
JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit
|
JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit
|
||||||
TERM: dumb
|
TERM: dumb
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
# Checkout the code
|
- add_ssh_keys:
|
||||||
|
fingerprints:
|
||||||
|
- "3e:c3:02:5b:ed:64:8c:b7:b0:04:43:bc:83:43:73:1e"
|
||||||
- checkout
|
- checkout
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: Create hash of toolchains
|
name: Create hash of toolchains
|
||||||
command: |
|
command: |
|
||||||
.circleci/create-hash.sh
|
.circleci/create-hash.sh
|
||||||
|
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
keys:
|
keys:
|
||||||
- riscv-tools-installed-v1-{{ checksum "../riscv-tools.hash" }}
|
- riscv-tools-installed-v1-{{ checksum "../riscv-tools.hash" }}
|
||||||
|
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
keys:
|
keys:
|
||||||
- verilator-installed-v1-{{ checksum "sims/verisim/verilator.mk" }}
|
- verilator-installed-v1-{{ checksum "sims/verisim/verilator.mk" }}
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: Building the boomexample subproject using Verilator
|
name: Building the boomexample subproject using Verilator
|
||||||
command: .circleci/do-rtl-build.sh SUB_PROJECT=example CONFIG=SmallDefaultBoomConfig
|
command: .circleci/do-rtl-build.sh SUB_PROJECT=example CONFIG=SmallDefaultBoomConfig
|
||||||
no_output_timeout: 120m
|
no_output_timeout: 120m
|
||||||
|
|
||||||
- save_cache:
|
- save_cache:
|
||||||
key: boomexample-{{ .Branch }}-{{ .Revision }}
|
key: boomexample-{{ .Branch }}-{{ .Revision }}
|
||||||
paths:
|
paths:
|
||||||
- "/home/riscvuser/project"
|
- "/home/riscvuser/project"
|
||||||
|
|
||||||
prepare-boomrocketexample:
|
prepare-boomrocketexample:
|
||||||
docker:
|
docker:
|
||||||
- image: riscvboom/riscvboom-images:0.0.5
|
- image: riscvboom/riscvboom-images:0.0.10
|
||||||
environment:
|
environment:
|
||||||
JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit
|
JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit
|
||||||
TERM: dumb
|
TERM: dumb
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
# Checkout the code
|
- add_ssh_keys:
|
||||||
|
fingerprints:
|
||||||
|
- "3e:c3:02:5b:ed:64:8c:b7:b0:04:43:bc:83:43:73:1e"
|
||||||
- checkout
|
- checkout
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: Create hash of toolchains
|
name: Create hash of toolchains
|
||||||
command: |
|
command: |
|
||||||
.circleci/create-hash.sh
|
.circleci/create-hash.sh
|
||||||
|
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
keys:
|
keys:
|
||||||
- riscv-tools-installed-v1-{{ checksum "../riscv-tools.hash" }}
|
- riscv-tools-installed-v1-{{ checksum "../riscv-tools.hash" }}
|
||||||
|
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
keys:
|
keys:
|
||||||
- verilator-installed-v1-{{ checksum "sims/verisim/verilator.mk" }}
|
- verilator-installed-v1-{{ checksum "sims/verisim/verilator.mk" }}
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: Building the boomrocketexample subproject using Verilator
|
name: Building the boomrocketexample subproject using Verilator
|
||||||
command: .circleci/do-rtl-build.sh SUB_PROJECT=example CONFIG=SmallDefaultBoomAndRocketConfig
|
command: .circleci/do-rtl-build.sh SUB_PROJECT=example CONFIG=SmallDefaultBoomAndRocketConfig
|
||||||
no_output_timeout: 120m
|
no_output_timeout: 120m
|
||||||
|
|
||||||
- save_cache:
|
- save_cache:
|
||||||
key: boomrocketexample-{{ .Branch }}-{{ .Revision }}
|
key: boomrocketexample-{{ .Branch }}-{{ .Revision }}
|
||||||
paths:
|
paths:
|
||||||
- "/home/riscvuser/project"
|
- "/home/riscvuser/project"
|
||||||
|
|
||||||
prepare-boom:
|
prepare-boom:
|
||||||
docker:
|
docker:
|
||||||
- image: riscvboom/riscvboom-images:0.0.5
|
- image: riscvboom/riscvboom-images:0.0.10
|
||||||
environment:
|
environment:
|
||||||
JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit
|
JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit
|
||||||
TERM: dumb
|
TERM: dumb
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
# Checkout the code
|
- add_ssh_keys:
|
||||||
|
fingerprints:
|
||||||
|
- "3e:c3:02:5b:ed:64:8c:b7:b0:04:43:bc:83:43:73:1e"
|
||||||
- checkout
|
- checkout
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: Create hash of toolchains
|
name: Create hash of toolchains
|
||||||
command: |
|
command: |
|
||||||
.circleci/create-hash.sh
|
.circleci/create-hash.sh
|
||||||
|
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
keys:
|
keys:
|
||||||
- riscv-tools-installed-v1-{{ checksum "../riscv-tools.hash" }}
|
- riscv-tools-installed-v1-{{ checksum "../riscv-tools.hash" }}
|
||||||
|
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
keys:
|
keys:
|
||||||
- verilator-installed-v1-{{ checksum "sims/verisim/verilator.mk" }}
|
- verilator-installed-v1-{{ checksum "sims/verisim/verilator.mk" }}
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: Building the boom subproject using Verilator
|
name: Building the boom subproject using Verilator
|
||||||
command: .circleci/do-rtl-build.sh SUB_PROJECT=boom
|
command: .circleci/do-rtl-build.sh SUB_PROJECT=boom
|
||||||
no_output_timeout: 120m
|
no_output_timeout: 120m
|
||||||
|
|
||||||
- save_cache:
|
- save_cache:
|
||||||
key: boom-{{ .Branch }}-{{ .Revision }}
|
key: boom-{{ .Branch }}-{{ .Revision }}
|
||||||
paths:
|
paths:
|
||||||
- "/home/riscvuser/project"
|
- "/home/riscvuser/project"
|
||||||
|
|
||||||
prepare-rocketchip:
|
prepare-rocketchip:
|
||||||
docker:
|
docker:
|
||||||
- image: riscvboom/riscvboom-images:0.0.5
|
- image: riscvboom/riscvboom-images:0.0.10
|
||||||
environment:
|
environment:
|
||||||
JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit
|
JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit
|
||||||
TERM: dumb
|
TERM: dumb
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
# Checkout the code
|
- add_ssh_keys:
|
||||||
|
fingerprints:
|
||||||
|
- "3e:c3:02:5b:ed:64:8c:b7:b0:04:43:bc:83:43:73:1e"
|
||||||
- checkout
|
- checkout
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: Create hash of toolchains
|
name: Create hash of toolchains
|
||||||
command: |
|
command: |
|
||||||
.circleci/create-hash.sh
|
.circleci/create-hash.sh
|
||||||
|
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
keys:
|
keys:
|
||||||
- riscv-tools-installed-v1-{{ checksum "../riscv-tools.hash" }}
|
- riscv-tools-installed-v1-{{ checksum "../riscv-tools.hash" }}
|
||||||
|
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
keys:
|
keys:
|
||||||
- verilator-installed-v1-{{ checksum "sims/verisim/verilator.mk" }}
|
- verilator-installed-v1-{{ checksum "sims/verisim/verilator.mk" }}
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: Building the rocketchip subproject using Verilator
|
name: Building the rocketchip subproject using Verilator
|
||||||
command: .circleci/do-rtl-build.sh SUB_PROJECT=rocketchip
|
command: .circleci/do-rtl-build.sh SUB_PROJECT=rocketchip
|
||||||
no_output_timeout: 120m
|
no_output_timeout: 120m
|
||||||
|
|
||||||
- save_cache:
|
- save_cache:
|
||||||
key: rocketchip-{{ .Branch }}-{{ .Revision }}
|
key: rocketchip-{{ .Branch }}-{{ .Revision }}
|
||||||
paths:
|
paths:
|
||||||
- "/home/riscvuser/project"
|
- "/home/riscvuser/project"
|
||||||
|
prepare-hwacha:
|
||||||
prepare-hwacha-verilog-only:
|
|
||||||
docker:
|
docker:
|
||||||
- image: riscvboom/riscvboom-images:0.0.5
|
- image: riscvboom/riscvboom-images:0.0.10
|
||||||
environment:
|
environment:
|
||||||
JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit
|
JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit
|
||||||
TERM: dumb
|
TERM: dumb
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
# Checkout the code
|
- add_ssh_keys:
|
||||||
|
fingerprints:
|
||||||
|
- "3e:c3:02:5b:ed:64:8c:b7:b0:04:43:bc:83:43:73:1e"
|
||||||
- checkout
|
- checkout
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: Create hash of toolchains
|
name: Create hash of toolchains
|
||||||
command: |
|
command: |
|
||||||
.circleci/create-hash.sh
|
.circleci/create-hash.sh
|
||||||
|
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
keys:
|
keys:
|
||||||
- riscv-tools-installed-v1-{{ checksum "../riscv-tools.hash" }}
|
- riscv-tools-installed-v1-{{ checksum "../riscv-tools.hash" }}
|
||||||
|
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
keys:
|
keys:
|
||||||
- verilator-installed-v1-{{ checksum "sims/verisim/verilator.mk" }}
|
- verilator-installed-v1-{{ checksum "sims/verisim/verilator.mk" }}
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: Building the hwacha subproject using Verilator
|
name: Building the hwacha subproject using Verilator
|
||||||
command: .circleci/do-rtl-build.sh SUB_PROJECT=hwacha verilog
|
command: .circleci/do-rtl-build.sh SUB_PROJECT=hwacha
|
||||||
no_output_timeout: 120m
|
no_output_timeout: 120m
|
||||||
|
|
||||||
- save_cache:
|
- save_cache:
|
||||||
key: hwacha-{{ .Branch }}-{{ .Revision }}
|
key: hwacha-{{ .Branch }}-{{ .Revision }}
|
||||||
paths:
|
paths:
|
||||||
- "/home/riscvuser/project"
|
- "/home/riscvuser/project"
|
||||||
|
|
||||||
example-run-benchmark-tests:
|
example-run-benchmark-tests:
|
||||||
docker:
|
docker:
|
||||||
- image: riscvboom/riscvboom-images:0.0.5
|
- image: riscvboom/riscvboom-images:0.0.10
|
||||||
environment:
|
environment:
|
||||||
JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit
|
JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit
|
||||||
TERM: dumb
|
TERM: dumb
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
# Checkout the code
|
|
||||||
- checkout
|
- checkout
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: Create hash of toolchains
|
name: Create hash of toolchains
|
||||||
command: |
|
command: |
|
||||||
.circleci/create-hash.sh
|
.circleci/create-hash.sh
|
||||||
|
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
keys:
|
keys:
|
||||||
- riscv-tools-installed-v1-{{ checksum "../riscv-tools.hash" }}
|
- riscv-tools-installed-v1-{{ checksum "../riscv-tools.hash" }}
|
||||||
|
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
keys:
|
keys:
|
||||||
- example-{{ .Branch }}-{{ .Revision }}
|
- example-{{ .Branch }}-{{ .Revision }}
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: Run example benchmark tests
|
name: Run example benchmark tests
|
||||||
command: make run-bmark-tests -C sims/verisim SUB_PROJECT=example
|
command: make run-bmark-tests -C sims/verisim SUB_PROJECT=example
|
||||||
|
|
||||||
boomexample-run-benchmark-tests:
|
boomexample-run-benchmark-tests:
|
||||||
docker:
|
docker:
|
||||||
- image: riscvboom/riscvboom-images:0.0.5
|
- image: riscvboom/riscvboom-images:0.0.10
|
||||||
environment:
|
environment:
|
||||||
JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit
|
JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit
|
||||||
TERM: dumb
|
TERM: dumb
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
# Checkout the code
|
|
||||||
- checkout
|
- checkout
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: Create hash of toolchains
|
name: Create hash of toolchains
|
||||||
command: |
|
command: |
|
||||||
.circleci/create-hash.sh
|
.circleci/create-hash.sh
|
||||||
|
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
keys:
|
keys:
|
||||||
- riscv-tools-installed-v1-{{ checksum "../riscv-tools.hash" }}
|
- riscv-tools-installed-v1-{{ checksum "../riscv-tools.hash" }}
|
||||||
|
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
keys:
|
keys:
|
||||||
- boomexample-{{ .Branch }}-{{ .Revision }}
|
- boomexample-{{ .Branch }}-{{ .Revision }}
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: Run boomexample benchmark tests
|
name: Run boomexample benchmark tests
|
||||||
command: make run-bmark-tests -C sims/verisim SUB_PROJECT=example CONFIG=SmallDefaultBoomConfig
|
command: make run-bmark-tests -C sims/verisim SUB_PROJECT=example CONFIG=SmallDefaultBoomConfig
|
||||||
|
|
||||||
boomrocketexample-run-benchmark-tests:
|
boomrocketexample-run-benchmark-tests:
|
||||||
docker:
|
docker:
|
||||||
- image: riscvboom/riscvboom-images:0.0.5
|
- image: riscvboom/riscvboom-images:0.0.10
|
||||||
environment:
|
environment:
|
||||||
JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit
|
JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit
|
||||||
TERM: dumb
|
TERM: dumb
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
# Checkout the code
|
|
||||||
- checkout
|
- checkout
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: Create hash of toolchains
|
name: Create hash of toolchains
|
||||||
command: |
|
command: |
|
||||||
.circleci/create-hash.sh
|
.circleci/create-hash.sh
|
||||||
|
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
keys:
|
keys:
|
||||||
- riscv-tools-installed-v1-{{ checksum "../riscv-tools.hash" }}
|
- riscv-tools-installed-v1-{{ checksum "../riscv-tools.hash" }}
|
||||||
|
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
keys:
|
keys:
|
||||||
- boomrocketexample-{{ .Branch }}-{{ .Revision }}
|
- boomrocketexample-{{ .Branch }}-{{ .Revision }}
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: Run boomrocketexample benchmark tests
|
name: Run boomrocketexample benchmark tests
|
||||||
command: make run-bmark-tests -C sims/verisim SUB_PROJECT=example CONFIG=SmallDefaultBoomAndRocketConfig
|
command: make run-bmark-tests -C sims/verisim SUB_PROJECT=example CONFIG=SmallDefaultBoomAndRocketConfig
|
||||||
|
|
||||||
boom-run-benchmark-tests:
|
boom-run-benchmark-tests:
|
||||||
docker:
|
docker:
|
||||||
- image: riscvboom/riscvboom-images:0.0.5
|
- image: riscvboom/riscvboom-images:0.0.10
|
||||||
environment:
|
environment:
|
||||||
JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit
|
JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit
|
||||||
TERM: dumb
|
TERM: dumb
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
# Checkout the code
|
|
||||||
- checkout
|
- checkout
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: Create hash of toolchains
|
name: Create hash of toolchains
|
||||||
command: |
|
command: |
|
||||||
.circleci/create-hash.sh
|
.circleci/create-hash.sh
|
||||||
|
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
keys:
|
keys:
|
||||||
- riscv-tools-installed-v1-{{ checksum "../riscv-tools.hash" }}
|
- riscv-tools-installed-v1-{{ checksum "../riscv-tools.hash" }}
|
||||||
|
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
keys:
|
keys:
|
||||||
- boom-{{ .Branch }}-{{ .Revision }}
|
- boom-{{ .Branch }}-{{ .Revision }}
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: Run boom benchmark tests
|
name: Run boom benchmark tests
|
||||||
command: make run-bmark-tests -C sims/verisim SUB_PROJECT=boom
|
command: make run-bmark-tests -C sims/verisim SUB_PROJECT=boom
|
||||||
|
|
||||||
rocketchip-run-benchmark-tests:
|
rocketchip-run-benchmark-tests:
|
||||||
docker:
|
docker:
|
||||||
- image: riscvboom/riscvboom-images:0.0.5
|
- image: riscvboom/riscvboom-images:0.0.10
|
||||||
environment:
|
environment:
|
||||||
JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit
|
JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit
|
||||||
TERM: dumb
|
TERM: dumb
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
# Checkout the code
|
|
||||||
- checkout
|
- checkout
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: Create hash of toolchains
|
name: Create hash of toolchains
|
||||||
command: |
|
command: |
|
||||||
.circleci/create-hash.sh
|
.circleci/create-hash.sh
|
||||||
|
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
keys:
|
keys:
|
||||||
- riscv-tools-installed-v1-{{ checksum "../riscv-tools.hash" }}
|
- riscv-tools-installed-v1-{{ checksum "../riscv-tools.hash" }}
|
||||||
|
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
keys:
|
keys:
|
||||||
- rocketchip-{{ .Branch }}-{{ .Revision }}
|
- rocketchip-{{ .Branch }}-{{ .Revision }}
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: Run rocketchip benchmark tests
|
name: Run rocketchip benchmark tests
|
||||||
command: make run-bmark-tests -C sims/verisim SUB_PROJECT=rocketchip
|
command: make run-bmark-tests -C sims/verisim SUB_PROJECT=rocketchip
|
||||||
|
hwacha-run-benchmark-tests:
|
||||||
# hwacha-run-benchmark-tests:
|
docker:
|
||||||
# docker:
|
- image: riscvboom/riscvboom-images:0.0.10
|
||||||
# - image: riscvboom/riscvboom-images:0.0.5
|
environment:
|
||||||
# environment:
|
JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit
|
||||||
# JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit
|
TERM: dumb
|
||||||
# TERM: dumb
|
steps:
|
||||||
#
|
- checkout
|
||||||
# steps:
|
- run:
|
||||||
# # Checkout the code
|
name: Create hash of toolchains
|
||||||
# - checkout
|
command: |
|
||||||
#
|
.circleci/create-hash.sh
|
||||||
# - run:
|
- restore_cache:
|
||||||
# name: Create hash of toolchains
|
keys:
|
||||||
# command: |
|
- esp-tools-installed-v1-{{ checksum "../esp-tools.hash" }}
|
||||||
# .circleci/create-hash.sh
|
- restore_cache:
|
||||||
#
|
keys:
|
||||||
# - restore_cache:
|
- hwacha-{{ .Branch }}-{{ .Revision }}
|
||||||
# keys:
|
- run:
|
||||||
# - riscv-tools-installed-v1-{{ checksum "../riscv-tools.hash" }}
|
name: Run hwacha benchmark tests
|
||||||
#
|
command: export RISCV=/home/riscvuser/esp-tools-install; export LD_LIBRARY_PATH=$RISCV/lib; make run-bmark-tests -C sims/verisim SUB_PROJECT=hwacha
|
||||||
# - restore_cache:
|
|
||||||
# keys:
|
|
||||||
# - hwacha-{{ .Branch }}-{{ .Revision }}
|
|
||||||
#
|
|
||||||
# - run:
|
|
||||||
# name: Run hwacha benchmark tests
|
|
||||||
# command: make run-bmark-tests -C sims/verisim SUB_PROJECT=hwacha
|
|
||||||
|
|
||||||
# Order and dependencies of jobs to run
|
# Order and dependencies of jobs to run
|
||||||
workflows:
|
workflows:
|
||||||
@@ -523,9 +431,8 @@ workflows:
|
|||||||
- install-riscv-toolchain
|
- install-riscv-toolchain
|
||||||
- install-verilator
|
- install-verilator
|
||||||
|
|
||||||
- prepare-hwacha-verilog-only:
|
- prepare-hwacha:
|
||||||
requires:
|
requires:
|
||||||
- install-riscv-toolchain # TODO: Remove when esp-tools is used
|
|
||||||
- install-esp-toolchain
|
- install-esp-toolchain
|
||||||
- install-verilator
|
- install-verilator
|
||||||
|
|
||||||
@@ -557,8 +464,7 @@ workflows:
|
|||||||
- install-riscv-toolchain
|
- install-riscv-toolchain
|
||||||
- prepare-rocketchip
|
- prepare-rocketchip
|
||||||
|
|
||||||
# - hwacha-run-benchmark-tests:
|
- hwacha-run-benchmark-tests:
|
||||||
# requires:
|
requires:
|
||||||
# - install-riscv-toolchain # TODO: Remove when esp-tools is used
|
- install-esp-toolchain
|
||||||
# - install-esp-toolchain
|
- prepare-hwacha
|
||||||
# - prepare-hwacha
|
|
||||||
|
|||||||
28
.circleci/defaults.sh
Executable file
28
.circleci/defaults.sh
Executable file
@@ -0,0 +1,28 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
copy () {
|
||||||
|
rsync -avzp -e 'ssh' $1 $2
|
||||||
|
}
|
||||||
|
|
||||||
|
run () {
|
||||||
|
ssh -o "StrictHostKeyChecking no" -t $SERVER $1
|
||||||
|
}
|
||||||
|
|
||||||
|
clean () {
|
||||||
|
# remove remote work dir
|
||||||
|
run "rm -rf $REMOTE_WORK_DIR"
|
||||||
|
}
|
||||||
|
|
||||||
|
# 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
|
||||||
|
REMOTE_CHIPYARD_DIR=$REMOTE_WORK_DIR/chipyard
|
||||||
|
REMOTE_VERILATOR_DIR=$REMOTE_WORK_DIR/verilator
|
||||||
|
REMOTE_SIM_DIR=$REMOTE_CHIPYARD_DIR/sims/verisim
|
||||||
|
|
||||||
|
# local variables (aka within the docker container)
|
||||||
|
LOCAL_CHECKOUT_DIR=$HOME/project
|
||||||
|
LOCAL_RISCV_DIR=$HOME/riscv-tools-install
|
||||||
|
LOCAL_CHIPYARD_DIR=$HOME/chipyard
|
||||||
|
LOCAL_VERILATOR_DIR=$HOME/verilator
|
||||||
|
LOCAL_SIM_DIR=$LOCAL_CHIPYARD_DIR/sims/verisim
|
||||||
@@ -6,15 +6,32 @@
|
|||||||
# turn echo on and error on earliest command
|
# turn echo on and error on earliest command
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
# init all submodules
|
# get shared variables
|
||||||
cd $HOME/project
|
SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"
|
||||||
./scripts/init-submodules-no-riscv-tools.sh
|
source $SCRIPT_DIR/defaults.sh
|
||||||
|
|
||||||
# enter the verisim directory and build the specific config
|
# call clean on exit
|
||||||
cd sims/verisim
|
trap clean EXIT
|
||||||
make clean
|
|
||||||
|
|
||||||
# run the particular build command
|
# set stricthostkeychecking to no (must happen before rsync)
|
||||||
make JAVA_ARGS="-Xmx2G -Xss8M" $@
|
run "echo \"Ping $SERVER\""
|
||||||
|
|
||||||
rm -rf ../../project
|
clean
|
||||||
|
|
||||||
|
# copy over riscv-tools, verilator, and chipyard to remote
|
||||||
|
run "mkdir -p $REMOTE_RISCV_DIR"
|
||||||
|
run "mkdir -p $REMOTE_CHIPYARD_DIR"
|
||||||
|
run "mkdir -p $REMOTE_VERILATOR_DIR"
|
||||||
|
copy $LOCAL_RISCV_DIR/ $SERVER:$REMOTE_RISCV_DIR
|
||||||
|
copy $LOCAL_CHIPYARD_DIR/ $SERVER:$REMOTE_CHIPYARD_DIR
|
||||||
|
copy $LOCAL_VERILATOR_DIR/ $SERVER:$REMOTE_VERILATOR_DIR
|
||||||
|
|
||||||
|
# enter the verisim directory and build the specific config on remote server
|
||||||
|
run "cd $REMOTE_CHIPYARD_DIR && ./scripts/init-submodules-no-riscv-tools.sh"
|
||||||
|
run "make -C $REMOTE_SIM_DIR clean"
|
||||||
|
run "export RISCV=\"$REMOTE_RISCV_DIR\"; make -C $REMOTE_SIM_DIR VERILATOR_INSTALL_DIR=$REMOTE_VERILATOR_DIR JAVA_ARGS=\"-Xmx8G -Xss8M\" SUB_PROJECT=boom CONFIG=$1 TOP=BoomRocketSystem"
|
||||||
|
run "rm -rf $REMOTE_CHIPYARD_DIR/project"
|
||||||
|
|
||||||
|
# copy back the final build
|
||||||
|
mkdir -p $LOCAL_CHIPYARD_DIR
|
||||||
|
copy $SERVER:$REMOTE_CHIPYARD_DIR/ $LOCAL_CHIPYARD_DIR
|
||||||
|
|||||||
Reference in New Issue
Block a user