EFIC-233 - update ci

update

EFIC-233 - Update CI

EFIC-233 - Update CI

EFIC-233 - Update CI
diff --git a/.github/scripts/build-pdk.sh b/.github/scripts/build-pdk.sh
deleted file mode 100644
index f65b2c5..0000000
--- a/.github/scripts/build-pdk.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-export HOME=$(pwd)
-
-git clone --depth=1 https://github.com/efabless/caravel-lite.git
-
-cd ..
-export PDK_ROOT=$(pwd)/pdks
-mkdir $PDK_ROOT
-cd $HOME/caravel-lite/ || exit
-make skywater-pdk skywater-library open_pdks build-pdk gen-sources
-
-exit 0
diff --git a/.github/scripts/build/run-set-id.sh b/.github/scripts/build/run-set-id.sh
index 56583bf..1042716 100644
--- a/.github/scripts/build/run-set-id.sh
+++ b/.github/scripts/build/run-set-id.sh
@@ -32,7 +32,7 @@
 cnt=$(grep "Done" $LOG_FILE -s | wc -l)
 
 if [[ $cnt -ne 3 ]]; then
-  exit 2
+	exit 2
 fi
 
 exit 0
diff --git a/.github/scripts/build/run-xor.sh b/.github/scripts/build/run-xor.sh
deleted file mode 100644
index e191953..0000000
--- a/.github/scripts/build/run-xor.sh
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/bash
-# SPDX-FileCopyrightText: 2020 Efabless Corporation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# SPDX-License-Identifier: Apache-2.0
-
-export UPRJ_ROOT=$(pwd)
-export CARAVEL_ROOT=$(pwd)/caravel
-cd ..
-export IMAGE_NAME=efabless/openlane:$OPENLANE_TAG
-export PDK_ROOT=$(pwd)/pdks
-
-cd $UPRJ_ROOT || exit
-
-LOG_FILE=out.log
-docker run -v $UPRJ_ROOT:$UPRJ_ROOT -v $PDK_ROOT:$PDK_ROOT -v $CARAVEL_ROOT:$CARAVEL_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;"
-
-cnt=$(grep -oP '(?<=Total XOR differences = )[0-9]+' $LOG_FILE)
-
-echo "Total XOR differences = $cnt"
-
-if [[ $cnt -ne 0 ]]; then
-  exit 2
-fi
-
-exit 0
diff --git a/.github/scripts/build_pdk.sh b/.github/scripts/build_pdk.sh
new file mode 100644
index 0000000..8317b6a
--- /dev/null
+++ b/.github/scripts/build_pdk.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+# SPDX-FileCopyrightText: 2020 Efabless Corporation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# SPDX-License-Identifier: Apache-2.0
+git clone --depth=1 https://github.com/efabless/caravel-lite.git
+
+export HOME=$(pwd)
+cd ..
+export PDK_ROOT=$(pwd)/pdks && mkdir "$PDK_ROOT"
+cd "$HOME"/caravel-lite/ || exit
+
+make skywater-pdk skywater-library open_pdks build-pdk gen-sources
+
+exit 0
diff --git a/.github/scripts/install-magic.sh b/.github/scripts/install_magic.sh
similarity index 100%
rename from .github/scripts/install-magic.sh
rename to .github/scripts/install_magic.sh
diff --git a/.github/scripts/precheck/run-precheck.sh b/.github/scripts/run_precheck.sh
similarity index 64%
rename from .github/scripts/precheck/run-precheck.sh
rename to .github/scripts/run_precheck.sh
index 59f3bd1..16091a6 100644
--- a/.github/scripts/precheck/run-precheck.sh
+++ b/.github/scripts/run_precheck.sh
@@ -13,19 +13,18 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 # SPDX-License-Identifier: Apache-2.0
-export CARAVEL_USER_PROJECT_ROOT=$(pwd)
-export CARAVEL_ROOT=$(pwd)/caravel
-export PRECHECK_ROOT=$CARAVEL_USER_PROJECT_ROOT/mpw_precheck
-export OUTPUT_DIRECTORY=$CARAVEL_USER_PROJECT_ROOT/mpw_precheck_result
+export INPUT_DIRECTORY=$(pwd)
+export PRECHECK_ROOT=$INPUT_DIRECTORY/mpw_precheck
+export OUTPUT_DIRECTORY=$INPUT_DIRECTORY/mpw_precheck_result
+export OUTPUT=$OUTPUT_DIRECTORY/logs/precheck.log
 cd ..
 export PDK_ROOT=$(pwd)/pdks
-cd $PRECHECK_ROOT || exit
+cd "$PRECHECK_ROOT" || exit
 
-docker run -v $PRECHECK_ROOT:$PRECHECK_ROOT -v $CARAVEL_USER_PROJECT_ROOT:$CARAVEL_USER_PROJECT_ROOT -v $PDK_ROOT:$PDK_ROOT -e INPUT_DIRECTORY=$INPUT_DIRECTORY -e PDK_ROOT=$PDK_ROOT -u $(id -u $USER):$(id -g $USER) efabless/mpw_precheck:latest bash -c "cd $PRECHECK_ROOT; python3 mpw_precheck.py --input_directory $INPUT_DIRECTORY --pdk_root $PDK_ROOT --output_directory $OUTPUT_DIRECTORY license makefile consistency xor magic_drc klayout_beol klayout_feol klayout_met_min_ca_density klayout_offgrid klayout_pin_label_purposes_overlapping_drawing klayout_zeroarea"
+docker run -v "$PRECHECK_ROOT":"$PRECHECK_ROOT" -v "$INPUT_DIRECTORY":"$INPUT_DIRECTORY" -v "$PDK_ROOT":"$PDK_ROOT" -e INPUT_DIRECTORY="$INPUT_DIRECTORY" -e PDK_ROOT="$PDK_ROOT" -u $(id -u "$USER"):$(id -g "$USER") efabless/mpw_precheck:latest bash -c "cd $PRECHECK_ROOT; python3 mpw_precheck.py --input_directory $INPUT_DIRECTORY --pdk_root $PDK_ROOT --output_directory $OUTPUT_DIRECTORY license makefile consistency xor magic_drc klayout_beol klayout_feol klayout_met_min_ca_density klayout_offgrid klayout_pin_label_purposes_overlapping_drawing klayout_zeroarea"
 
-output=$OUTPUT_DIRECTORY/logs/precheck.log
 
-cnt=$(grep -c "All Checks Passed" $output)
+cnt=$(grep -c "All Checks Passed" "$OUTPUT")
 if ! [[ $cnt ]]; then cnt=0; fi
 if [[ $cnt -eq 1 ]]; then exit 0; fi
 
diff --git a/.github/workflows/caravel_build.yml b/.github/workflows/caravel_build.yml
index f833478..d9cadb3 100644
--- a/.github/workflows/caravel_build.yml
+++ b/.github/workflows/caravel_build.yml
@@ -1,75 +1,53 @@
-name: Caravel Build
+# name: Caravel Build
 
-on:
-  # Runs on Every Push
-  push:
-  # Runs on Pull Requests
-  pull_request:
-  workflow_dispatch:
+# on:
+#  # Runs on Every Push
+#  push:
+#  # Runs on Pull Requests
+#  pull_request:
+#  workflow_dispatch:
 
-jobs:
-  make_ship:
-    runs-on: ubuntu-latest
-    steps:
-      - uses: actions/checkout@v2
+# jobs:
+#  make_ship:
+#    runs-on: ubuntu-latest
+#    steps:
+#      - uses: actions/checkout@v2
 
-      - name: Set up QEMU
-        uses: docker/setup-qemu-action@v1
+#      - name: Set up QEMU
+#        uses: docker/setup-qemu-action@v1
 
-      - name: Set up Docker Buildx
-        uses: docker/setup-buildx-action@v1
+#      - name: Set up Docker Buildx
+#        uses: docker/setup-buildx-action@v1
 
-      - name: Install Magic
-        run: bash ${GITHUB_WORKSPACE}/.github/scripts/install-magic.sh
+#      - name: Install Magic
+#        run: bash ${GITHUB_WORKSPACE}/.github/scripts/install_magic.sh
 
-      - name: Build PDK
-        run: bash ${GITHUB_WORKSPACE}/.github/scripts/build-pdk.sh
+#      - name: Build PDK
+#        run: bash ${GITHUB_WORKSPACE}/.github/scripts/build_pdk.sh
 
-      - name: Run make ship
-        run: bash ${GITHUB_WORKSPACE}/.github/scripts/build/run-ship.sh
-        env:
-          OPENLANE_TAG: 2021.12.17_05.07.41
+#      - name: Run make ship
+#        run: bash ${GITHUB_WORKSPACE}/.github/scripts/build/run-ship.sh
+#        env:
+#          OPENLANE_TAG: 2021.12.17_05.07.41
 
-  set_user_id:
-    runs-on: ubuntu-latest
-    steps:
-      - uses: actions/checkout@v2
+#  set_user_id:
+#    runs-on: ubuntu-latest
+#    steps:
+#      - uses: actions/checkout@v2
 
-      - name: Set up QEMU
-        uses: docker/setup-qemu-action@v1
+#      - name: Set up QEMU
+#        uses: docker/setup-qemu-action@v1
 
-      - name: Set up Docker Buildx
-        uses: docker/setup-buildx-action@v1
+#      - name: Set up Docker Buildx
+#        uses: docker/setup-buildx-action@v1
 
-      - name: Install Magic
-        run: bash ${GITHUB_WORKSPACE}/.github/scripts/install-magic.sh
+#      - name: Install Magic
+#        run: bash ${GITHUB_WORKSPACE}/.github/scripts/install_magic.sh
 
-      - name: Build PDK
-        run: bash ${GITHUB_WORKSPACE}/.github/scripts/build-pdk.sh
+#      - name: Build PDK
+#        run: bash ${GITHUB_WORKSPACE}/.github/scripts/build_pdk.sh
 
-      - name: Run Set User ID
-        run: bash ${GITHUB_WORKSPACE}/.github/scripts/build/run-set-id.sh
-        env:
-          OPENLANE_TAG: 2021.09.16_03.28.21
-
-  xor_wrapper:
-    runs-on: ubuntu-latest
-    steps:
-      - uses: actions/checkout@v2
-
-      - name: Set up QEMU
-        uses: docker/setup-qemu-action@v1
-
-      - name: Set up Docker Buildx
-        uses: docker/setup-buildx-action@v1
-
-      - name: Install Magic
-        run: bash ${GITHUB_WORKSPACE}/.github/scripts/install-magic.sh
-
-      - name: Build PDK
-        run: bash ${GITHUB_WORKSPACE}/.github/scripts/build-pdk.sh
-
-      - name: Run XOR Check
-        run: bash ${GITHUB_WORKSPACE}/.github/scripts/build/run-xor.sh
-        env:
-          OPENLANE_TAG: 2021.09.16_03.28.21
+#      - name: Run Set User ID
+#        run: bash ${GITHUB_WORKSPACE}/.github/scripts/build/run-set-id.sh
+#        env:
+#          OPENLANE_TAG: 2021.09.16_03.28.21
diff --git a/.github/workflows/user_project_ci.yml b/.github/workflows/user_project_ci.yml
index ce2ba5e..d966d14 100644
--- a/.github/workflows/user_project_ci.yml
+++ b/.github/workflows/user_project_ci.yml
@@ -21,61 +21,61 @@
         uses: docker/setup-buildx-action@v1
 
       - name: Install Magic
-        run: bash ${GITHUB_WORKSPACE}/.github/scripts/install-magic.sh
+        run: bash ${GITHUB_WORKSPACE}/.github/scripts/install_magic.sh
 
       - name: Build PDK
-        run: bash ${GITHUB_WORKSPACE}/.github/scripts/build-pdk.sh
+        run: bash ${GITHUB_WORKSPACE}/.github/scripts/build_pdk.sh
 
       - name: Install The Precheck
         run: git clone --depth=1 https://github.com/efabless/mpw_precheck.git ${GITHUB_WORKSPACE}/mpw_precheck
 
       - name: Run The Precheck
-        run: bash ${GITHUB_WORKSPACE}/.github/scripts/precheck/run-precheck.sh
+        run: bash ${GITHUB_WORKSPACE}/.github/scripts/run_precheck.sh
 
-  dv_rtl:
-    runs-on: ubuntu-latest
-    steps:
-      - uses: actions/checkout@v2
+  # dv_rtl:
+  #   runs-on: ubuntu-latest
+  #   steps:
+  #     - uses: actions/checkout@v2
 
-      - name: Set up QEMU
-        uses: docker/setup-qemu-action@v1
+  #     - name: Set up QEMU
+  #       uses: docker/setup-qemu-action@v1
 
-      - name: Set up Docker Buildx
-        uses: docker/setup-buildx-action@v1
+  #     - name: Set up Docker Buildx
+  #       uses: docker/setup-buildx-action@v1
 
-      - name: Install Magic
-        run: bash ${GITHUB_WORKSPACE}/.github/scripts/install-magic.sh
+  #     - name: Install Magic
+  #       run: bash ${GITHUB_WORKSPACE}/.github/scripts/install_magic.sh
 
-      - name: Build PDK
-        run: bash ${GITHUB_WORKSPACE}/.github/scripts/build-pdk.sh
+  #     - name: Build PDK
+  #       run: bash ${GITHUB_WORKSPACE}/.github/scripts/build_pdk.sh
 
-      - name: Install The Dockerized DV Setup
-        run: docker pull efabless/dv_setup:latest
+  #     - name: Install The Dockerized DV Setup
+  #       run: docker pull efabless/dv_setup:latest
 
-      - name: Run DV tests
-        # Run test number 0,1,2,3,4 in one job                            <test-ids>   <sim-mode>
-        run: bash ${GITHUB_WORKSPACE}/.github/scripts/dv/run-dv-wrapper.sh 0,1,2,3,4      RTL
+  #     - name: Run DV tests
+  #       # Run test number 0,1,2,3,4 in one job                            <test-ids>   <sim-mode>
+  #       run: bash ${GITHUB_WORKSPACE}/.github/scripts/dv/run-dv-wrapper.sh 0,1,2,3,4      RTL
 
-  dv_gl:
-    runs-on: ubuntu-latest
-    steps:
-      - uses: actions/checkout@v2
+  # dv_gl:
+  #   runs-on: ubuntu-latest
+  #   steps:
+  #     - uses: actions/checkout@v2
 
-      - name: Set up QEMU
-        uses: docker/setup-qemu-action@v1
+  #     - name: Set up QEMU
+  #       uses: docker/setup-qemu-action@v1
 
-      - name: Set up Docker Buildx
-        uses: docker/setup-buildx-action@v1
+  #     - name: Set up Docker Buildx
+  #       uses: docker/setup-buildx-action@v1
 
-      - name: Install Magic
-        run: bash ${GITHUB_WORKSPACE}/.github/scripts/install-magic.sh
+  #     - name: Install Magic
+  #       run: bash ${GITHUB_WORKSPACE}/.github/scripts/install_magic.sh
 
-      - name: Build PDK
-        run: bash ${GITHUB_WORKSPACE}/.github/scripts/build-pdk.sh
+  #     - name: Build PDK
+  #       run: bash ${GITHUB_WORKSPACE}/.github/scripts/build_pdk.sh
 
-      - name: Install The Dockerized DV Setup
-        run: docker pull efabless/dv_setup:latest
+  #     - name: Install The Dockerized DV Setup
+  #       run: docker pull efabless/dv_setup:latest
 
-      - name: Run DV tests
-        # Run test number 0,1,2,3,4 in one job                             <test-ids>   <sim-mode>
-        run: bash ${GITHUB_WORKSPACE}/.github/scripts/dv/run-dv-wrapper.sh 0,1,2,3,4      GL
+  #     - name: Run DV tests
+  #       # Run test number 0,1,2,3,4 in one job                             <test-ids>   <sim-mode>
+  #       run: bash ${GITHUB_WORKSPACE}/.github/scripts/dv/run-dv-wrapper.sh 0,1,2,3,4      GL
diff --git a/Makefile b/Makefile
index 6de652c..6ca4b99 100644
--- a/Makefile
+++ b/Makefile
@@ -105,15 +105,15 @@
 # Default installs to the user home directory, override by "export PRECHECK_ROOT=<precheck-installation-path>"
 .PHONY: precheck
 precheck:
-	@git clone --depth=1 --branch mpw-5 https://github.com/efabless/mpw_precheck.git $(PRECHECK_ROOT)
+	@git clone --depth=1 --branch mpw-5a https://github.com/efabless/mpw_precheck.git $(PRECHECK_ROOT)
 	@docker pull efabless/mpw_precheck:latest
 
 .PHONY: run-precheck
-run-precheck: check-precheck check-pdk check-caravel
+run-precheck: check-pdk check-precheck
 	$(eval INPUT_DIRECTORY := $(shell pwd))
 	cd $(PRECHECK_ROOT) && \
-	docker run -e INPUT_DIRECTORY=$(INPUT_DIRECTORY) -e PDK_ROOT=$(PDK_ROOT) -v $(PRECHECK_ROOT):$(PRECHECK_ROOT) -v $(INPUT_DIRECTORY):$(INPUT_DIRECTORY) -v $(PDK_ROOT):$(PDK_ROOT) \
-	-u $(shell id -u $(USER)):$(shell id -g $(USER)) efabless/mpw_precheck:latest bash -c "cd $(PRECHECK_ROOT) ; python3 mpw_precheck.py --pdk_root $(PDK_ROOT) --input_directory $(INPUT_DIRECTORY)"
+	docker run -v $(PRECHECK_ROOT):$(PRECHECK_ROOT) -v $(INPUT_DIRECTORY):$(INPUT_DIRECTORY) -v $(PDK_ROOT):$(PDK_ROOT) -e INPUT_DIRECTORY=$(INPUT_DIRECTORY) -e PDK_ROOT=$(PDK_ROOT) \
+	-u $(shell id -u $(USER)):$(shell id -g $(USER)) efabless/mpw_precheck:latest bash -c "cd $(PRECHECK_ROOT) ; python3 mpw_precheck.py --input_directory $(INPUT_DIRECTORY) --pdk_root $(PDK_ROOT)"
 
 # Clean 
 .PHONY: clean