Make the scripts run in the kokoro environment. Signed-off-by: Tim 'mithro' Ansell <tansell@google.com>
diff --git a/open_pdks/build-magic.sh b/open_pdks/build-magic.sh index 5b50516..e535a66 100755 --- a/open_pdks/build-magic.sh +++ b/open_pdks/build-magic.sh
@@ -51,10 +51,8 @@ apt-get -y autoremove rm -rf /var/lib/apt/lists/* -cd /host -echo $PWD -ls -l -cd magic +cd /host/github/magic +git describe ./configure --prefix=/host/out/magic make -j$(nproc) make install
diff --git a/open_pdks/build-open_pdks.sh b/open_pdks/build-open_pdks.sh index 13db092..4ca0fc2 100755 --- a/open_pdks/build-open_pdks.sh +++ b/open_pdks/build-open_pdks.sh
@@ -19,9 +19,8 @@ export PATH=/host/out/magic/bin:$PATH -cd /host -ls -l -cd open_pdks +cd /host/github/open_pdks +git describe POSSIBLE_TOOLS="all" # klayout magic netgen irsim openlane qflow xschem" for TTOOL in $POSSIBLE_TOOLS; do
diff --git a/open_pdks/build-skywater-pdk.sh b/open_pdks/build-skywater-pdk.sh index f4ddb44..981f95b 100755 --- a/open_pdks/build-skywater-pdk.sh +++ b/open_pdks/build-skywater-pdk.sh
@@ -17,9 +17,7 @@ set -xe -cd /host -ls -l -cd skywater-pdk +cd /host/github/skywater-pdk git describe git submodule init libraries/sky130_fd_io/latest
diff --git a/open_pdks/run.sh b/open_pdks/run.sh index ecb05f2..42dd042 100755 --- a/open_pdks/run.sh +++ b/open_pdks/run.sh
@@ -15,6 +15,23 @@ # # SPDX-License-Identifier: Apache-2.0 +CALLED=$_ +[[ "${BASH_SOURCE[0]}" != "${0}" ]] && SOURCED=1 || SOURCED=0 + +SCRIPT_SRC="$(realpath ${BASH_SOURCE[0]})" +SCRIPT_DIR="$(dirname "${SCRIPT_SRC}")" + +SCRIPT_DIR_REL="$(realpath $SCRIPT_DIR --relative-to=$PWD)" + +echo +echo " Current directory: $PWD" +echo " Script: $SCRIPT_SRC" +echo " Directory with scripts: $SCRIPT_DIR" +echo "Relative directory with scripts: $SCRIPT_DIR_REL" +echo + +find $PWD -type d | sort + set -xe # This script tries to follows the instructions in the README @ @@ -47,13 +64,13 @@ $DOCKER_CMD ls /host # Build Magic in a container from the cloned magic repository -$DOCKER_CMD bash /host/build-magic.sh +$DOCKER_CMD bash /host/$SCRIPT_DIR_REL/build-magic.sh # Run `make timing` inside the cloned skywater-pdk repository -$DOCKER_CMD bash /host/build-skywater-pdk.sh +$DOCKER_CMD bash /host/$SCRIPT_DIR_REL/build-skywater-pdk.sh # Run `./configure` targeting the output directory. -$DOCKER_CMD bash /host/build-open_pdks.sh +$DOCKER_CMD bash /host/$SCRIPT_DIR_REL/build-open_pdks.sh # Tar up result. find out/pdk-* | sort | tee pdk.files