export CARAVEL_ROOT in CI
diff --git a/.github/scripts/build/run-set-id.sh b/.github/scripts/build/run-set-id.sh
index 15edefe..a170764 100644
--- a/.github/scripts/build/run-set-id.sh
+++ b/.github/scripts/build/run-set-id.sh
@@ -15,6 +15,7 @@
# SPDX-License-Identifier: Apache-2.0
export UPRJ_ROOT=$(pwd)
+export CARAVEL_ROOT=$(pwd)/caravel
cd ..
export PDK_ROOT=$(pwd)/pdks
export IMAGE_NAME=efabless/openlane:$OPENLANE_TAG
@@ -23,7 +24,7 @@
cd $UPRJ_ROOT
LOG_FILE=out.log
-docker run -v $UPRJ_ROOT:$UPRJ_ROOT -v $PDK_ROOT:$PDK_ROOT -e UPRJ_ROOT=$UPRJ_ROOT -e PDK_ROOT=$PDK_ROOT -u $(id -u $USER):$(id -g $USER) $IMAGE_NAME bash -c "cd $UPRJ_ROOT; export USER_ID=$USER_ID; make set_user_id | tee $LOG_FILE;"
+docker run -v $UPRJ_ROOT:$UPRJ_ROOT -v $PDK_ROOT:$PDK_ROOT -e UPRJ_ROOT=$UPRJ_ROOT -e PDK_ROOT=$PDK_ROOT -e CARAVEL_ROOT=$CARAVEL_ROOT-u $(id -u $USER):$(id -g $USER) $IMAGE_NAME bash -c "cd $UPRJ_ROOT; export USER_ID=$USER_ID; make set_user_id | tee $LOG_FILE;"
cnt=$(grep "Done" $LOG_FILE -s | wc -l)
diff --git a/.github/scripts/build/run-ship.sh b/.github/scripts/build/run-ship.sh
index b132e93..974f366 100644
--- a/.github/scripts/build/run-ship.sh
+++ b/.github/scripts/build/run-ship.sh
@@ -15,18 +15,19 @@
# SPDX-License-Identifier: Apache-2.0
export UPRJ_ROOT=$(pwd)
+export CARAVEL_ROOT=$(pwd)/caravel
cd ..
export PDK_ROOT=$(pwd)/pdks
export IMAGE_NAME=efabless/openlane:$OPENLANE_TAG
cd $UPRJ_ROOT
-docker run -v $UPRJ_ROOT:$UPRJ_ROOT -v $PDK_ROOT:$PDK_ROOT -e UPRJ_ROOT=$UPRJ_ROOT -e PDK_ROOT=$PDK_ROOT -u $(id -u $USER):$(id -g $USER) $IMAGE_NAME bash -c "cd $UPRJ_ROOT; make ship;"
+docker run -v $UPRJ_ROOT:$UPRJ_ROOT -v $PDK_ROOT:$PDK_ROOT -e UPRJ_ROOT=$UPRJ_ROOT -e PDK_ROOT=$PDK_ROOT -e CARAVEL_ROOT=$CARAVEL_ROOT -u $(id -u $USER):$(id -g $USER) $IMAGE_NAME bash -c "cd $UPRJ_ROOT; make ship;"
SHIP_FILE=$UPRJ_ROOT/gds/caravel.gds
if test -f "$SHIP_FILE"; then
exit 0
else
- exit 1
+ exit 2
fi
diff --git a/.github/scripts/build/run-xor.sh b/.github/scripts/build/run-xor.sh
index 7e6a7c8..ff92358 100644
--- a/.github/scripts/build/run-xor.sh
+++ b/.github/scripts/build/run-xor.sh
@@ -15,6 +15,7 @@
# SPDX-License-Identifier: Apache-2.0
export UPRJ_ROOT=$(pwd)
+export CARAVEL_ROOT=$(pwd)/caravel
cd ..
export PDK_ROOT=$(pwd)/pdks
export IMAGE_NAME=efabless/openlane:$OPENLANE_TAG
@@ -22,6 +23,6 @@
cd $UPRJ_ROOT
LOG_FILE=out.log
-docker run -v $UPRJ_ROOT:$UPRJ_ROOT -v $PDK_ROOT:$PDK_ROOT -e UPRJ_ROOT=$UPRJ_ROOT -e PDK_ROOT=$PDK_ROOT -u $(id -u $USER):$(id -g $USER) $IMAGE_NAME bash -c "cd $UPRJ_ROOT; export USER_ID=$USER_ID; make xor-wrapper | tee $LOG_FILE;"
+docker run -v $UPRJ_ROOT:$UPRJ_ROOT -v $PDK_ROOT:$PDK_ROOT -e UPRJ_ROOT=$UPRJ_ROOT -e PDK_ROOT=$PDK_ROOT -e CARAVEL_ROOT=$CARAVEL_ROOT -u $(id -u $USER):$(id -g $USER) $IMAGE_NAME bash -c "cd $UPRJ_ROOT; export USER_ID=$USER_ID; make xor-wrapper | tee $LOG_FILE;"
exit 0
diff --git a/.github/scripts/dv/run-dv-wrapper.sh b/.github/scripts/dv/run-dv-wrapper.sh
index 8deec88..f06fa76 100644
--- a/.github/scripts/dv/run-dv-wrapper.sh
+++ b/.github/scripts/dv/run-dv-wrapper.sh
@@ -22,6 +22,8 @@
DV_TEST_IDS=(${IDS//,/ })
export TARGET_PATH=$(pwd)
+export CARAVEL_ROOT=$(pwd)/caravel
+
if [ ! -d $TARGET_PATH ]
then
echo "Directory /path/to/dir DOES NOT exists."
@@ -47,7 +49,9 @@
for id in "${DV_TEST_IDS[@]}"
do
docker run -v $TARGET_PATH:$TARGET_PATH -v $PDK_PATH:$PDK_PATH \
+ -v $CARAVEL_ROOT:$CARAVEL_ROOT \
-e TARGET_PATH=$TARGET_PATH -e PDK_PATH=$PDK_PATH \
+ -e CARAVEL_ROOT=$CARAVEL_ROOT \
-u $(id -u $USER):$(id -g $USER) efabless/dv_setup:latest \
bash -c "bash $TARGET_PATH/.github/scripts/dv/run-dv.sh $PDK_PATH $DV_PATH $id $SIM_MODE"