parallelize toolchain builds with verilator
This commit is contained in:
@@ -1,22 +1,15 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# create the riscv tools/esp tools binaries
|
# create the riscv tools/esp tools binaries
|
||||||
|
# passed in as <riscv-tools or esp-tools>
|
||||||
|
|
||||||
# turn echo on and error on earliest command
|
# turn echo on and error on earliest command
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
if [ ! -d "$HOME/esp-tools-install" ]; then
|
if [ ! -d "$HOME/$1-install" ]; then
|
||||||
|
|
||||||
cd $HOME/
|
cd $HOME/
|
||||||
|
|
||||||
# init all submodules including the tools
|
# init all submodules including the tools
|
||||||
REBAR_DIR=$HOME/project ./project/scripts/build-toolchains.sh esp-tools
|
REBAR_DIR=$HOME/project ./project/scripts/build-toolchains.sh $1
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -d "$HOME/riscv-tools-install" ]; then
|
|
||||||
|
|
||||||
cd $HOME/
|
|
||||||
|
|
||||||
# init all submodules including the tools
|
|
||||||
REBAR_DIR=$HOME/project ./project/scripts/build-toolchains.sh riscv-tools
|
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ version: 2
|
|||||||
|
|
||||||
# set of jobs to run
|
# set of jobs to run
|
||||||
jobs:
|
jobs:
|
||||||
install-toolchains:
|
install-riscv-toolchain:
|
||||||
docker:
|
docker:
|
||||||
- image: riscvboom/riscvboom-images:0.0.5
|
- image: riscvboom/riscvboom-images:0.0.5
|
||||||
environment:
|
environment:
|
||||||
@@ -25,14 +25,10 @@ jobs:
|
|||||||
keys:
|
keys:
|
||||||
- riscv-tools-installed-v1-{{ checksum "../riscv-tools.hash" }}
|
- riscv-tools-installed-v1-{{ checksum "../riscv-tools.hash" }}
|
||||||
|
|
||||||
- restore_cache:
|
|
||||||
keys:
|
|
||||||
- esp-tools-installed-v1-{{ checksum "../esp-tools.hash" }}
|
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: Building toolchains
|
name: Building riscv-tools toolchain
|
||||||
command: |
|
command: |
|
||||||
.circleci/build-toolchains.sh
|
.circleci/build-toolchains.sh riscv-tools
|
||||||
no_output_timeout: 120m
|
no_output_timeout: 120m
|
||||||
|
|
||||||
- save_cache:
|
- save_cache:
|
||||||
@@ -40,6 +36,32 @@ jobs:
|
|||||||
paths:
|
paths:
|
||||||
- "/home/riscvuser/riscv-tools-install"
|
- "/home/riscvuser/riscv-tools-install"
|
||||||
|
|
||||||
|
install-esp-toolchain:
|
||||||
|
docker:
|
||||||
|
- image: riscvboom/riscvboom-images:0.0.5
|
||||||
|
environment:
|
||||||
|
JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit
|
||||||
|
TERM: dumb
|
||||||
|
|
||||||
|
steps:
|
||||||
|
# Checkout the code
|
||||||
|
- checkout
|
||||||
|
|
||||||
|
- run:
|
||||||
|
name: Create hash of toolchains
|
||||||
|
command: |
|
||||||
|
.circleci/create-hash.sh
|
||||||
|
|
||||||
|
- restore_cache:
|
||||||
|
keys:
|
||||||
|
- esp-tools-installed-v1-{{ checksum "../esp-tools.hash" }}
|
||||||
|
|
||||||
|
- run:
|
||||||
|
name: Building esp-tools toolchain
|
||||||
|
command: |
|
||||||
|
.circleci/build-toolchains.sh esp-tools
|
||||||
|
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:
|
||||||
@@ -133,13 +155,13 @@ workflows:
|
|||||||
version: 2
|
version: 2
|
||||||
build-and-test-rebar-integration:
|
build-and-test-rebar-integration:
|
||||||
jobs:
|
jobs:
|
||||||
# Make the toolchain
|
# Make the toolchains
|
||||||
- install-toolchains
|
- install-riscv-toolchain
|
||||||
|
|
||||||
|
- install-esp-toolchain
|
||||||
|
|
||||||
# Build verilator
|
# Build verilator
|
||||||
- install-verilator:
|
- install-verilator
|
||||||
requires:
|
|
||||||
- install-toolchains
|
|
||||||
|
|
||||||
# Prepare the verilator builds
|
# Prepare the verilator builds
|
||||||
- prepare-example:
|
- prepare-example:
|
||||||
@@ -152,3 +174,4 @@ workflows:
|
|||||||
- example-run-benchmark-tests:
|
- example-run-benchmark-tests:
|
||||||
requires:
|
requires:
|
||||||
- prepare-example
|
- prepare-example
|
||||||
|
- install-riscv-toolchain
|
||||||
|
|||||||
Reference in New Issue
Block a user